Skip to content

astar_avoid code cleanup

  1. There are two threads running at the same time in the node. One is just to publish safety_waypoints at a predefined rate while the other generates avoidance waypoints if needed (enabled by ros param /astar_avoid/enable_avoidance). During the publish of safety_waypoints, the avoidance waypoints are copied over without a mutex protection. It is highly possible that final safety_waypoints are corrupted or incomplete. There is a mutex defined which is used during generating avoidance_waypoints but does not get used during copying to the safety_waypoints.
  2. Both the main thread and the publishing thread use the same ros::Rate instance to manage the sleep time. This is incorrect since ros::Rate::sleep() modifies an internal start_ time variable. This may cause both threads sleep with wrong duration.
  3. Lane select node should never publish two consecutive base_waypoints msgs in less that 1 ms. If it happens, lane select node should be fixed but not astar_avoid node, so extra code inside baseWaypointsCallback() to check incoming msg's timestamp is unnecessary.

See astuff/autoware.ai/core_planning!17 (merged) for more details.

Merge request reports