Make the lidar streamer ready to work with main controller

This commit is contained in:
Piv
2020-04-16 21:12:12 +09:30
parent 65c19e7494
commit ed371d3a2f
9 changed files with 53 additions and 23 deletions

View File

@@ -186,7 +186,9 @@ def updateCarVelocity(oldGroup, newGroup):
tuple (DistanceChange, AngleChange)
A tuple containing how the groups' centres changed in the form (distance,angle)
"""
return (find_centre(newGroup))
old_polar = convert_cartesian_to_lidar(*find_centre(oldGroup))
new_centre = convert_cartesian_to_lidar(*find_centre(newGroup))
return (new_centre[0] - old_polar[0], new_centre[1] - old_polar[1])
def dualServoChange(newCentre, changeTuple):
@@ -197,7 +199,7 @@ def dualServoChange(newCentre, changeTuple):
Parameters
---------
newCentre
Tuple (distance,angle) of the new centre of the tracked group.
Tuple (distance, angle) of the new centre of the tracked group.
changeTuple
Tuple (distanceChange, angleChange) from the old centre to the new centre.