scripts/create_centerline.py Publish Centerline (racing line) Polygon msg from Cones
Pursuant to issue #1 (closed) , @kfajdsl, @rcmast3r1 and I have implemented some logic (in scripts/create_centerline.py
and scripts/midline.py
which will generate a crude racing line for Voltron to follow.
The functionality takes in two CSV's representing the GPS geodetic coordinates of cones on the outside and inside of the track. It converts these points to a Cartesian coordinate system, then uses them to generate a midline between the cones to use as a racing for Voltron to follow.
The resultant midline points are then converted to a list of Point32
(Cartesian x and y with z=0), and a message is published on the ROS topic centerline
by the publisher
member of the CenterlineCreator
Node class. The message is a PolygonStamped
message which contains a timestamp (msg.header.stamp
) and a closed polygon (msg.polygon.points
)
This functionality can be easily adjusted at a later time to generate a more optimal racing line for Voltron