Skip to content

Commit

Permalink
Issue #3: Cleans up code
Browse files Browse the repository at this point in the history
- Updates the way the ori_circle variable is calculated to simplify the code a bit.
  • Loading branch information
exoticDFT committed Sep 25, 2020
1 parent ffe87b2 commit d8d12b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions script/game_ado_vehicle_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ def relevant_filter(pos_x, pos_y, yaw, object):
)
car_yaw = tf.transformations.euler_from_quaternion(quat)[2]
ori_car = [np.cos(car_yaw), np.sin(car_yaw)]
ori_circle = [-car_pos[0], -car_pos[1]]
ori_circle = ori_circle/np.linalg.norm(ori_circle)
ori_circle = np.negative(car_pos)/np.linalg.norm(car_pos)
rel_ang = np.dot(ori_circle, ori_car)

rospy.logdebug("Position of ado: {}".format(car_pos))
Expand Down

0 comments on commit d8d12b2

Please sign in to comment.