Autoware.Auto
|
|
Autoware.Auto is capable of recording a path of waypoints to disk and then loading and attempting to follow that path. This demonstration combines several subsystems including NDT Localization and the 3D perception stack. To test this functionality, do the following:
The following instructions assume you are running the demo inside of ADE. For instructions on setting up an ADE environment, see Installation with ADE. For instructions on setting up Autoware.Auto without ADE, see Installation w/o ADE. If running outside of ADE, replace source /opt/AutowareAuto/setup.bash
with source /<path_to_your_autoware_folder>/install/setup.bash
.
rviz
, locate the spawn point of the vehicle in the AutonomouStuff parking lot map using the point cloud as a reference. rviz
to provide an initial pose estimate for localization. rviz
will jump away from the vehicle. Re-center the view on the vehicle.ros2 action send_goal
command and hit CTRL+C
to stop recording.F12
to re-center the vehicle at the default spawn point.CTRL+C
in terminal where ros2 launch autoware_demos recordreplay_planner_demo.launch.py
is running.status::SUCCEED
to the terminal in which you ran the ros2 action send_goal
command.You can modify end conditions by tuning parameters in recordreplay_planner.param.yaml. The planner terminates planning when both of the following conditions are satisfied:
goal_distance_threshold_m
: threshold for the distance between nav_base
frame and the last point in the replayed trajectorygoal_angle_threshold_rad
: threshold for the heading angle between nav_base
frame and the last point in the replayed trajectoryBy default the above launch command will run the planner with the MPC controller. You can run the pure pursuit controller instead of the MPC controller by running the following command,
Note that the pure pursuit controller is more primitive and does not stop for objects on the path that could cause collision
To enable trajectory looping, modify recordreplay_planner.param.yaml:
loop_trajectory
to True
loop_max_gap_m
to be the maximum gap (meter) allowed between the start and end point to complete the loop, such as 10
.Note that it is better to stop the recording command while the vehicle is still driving. Otherwise the vehicle may come to a stop at the end of the trajectory and not move across to the start point. It is even better to edit the saved path file and optimize the speed and pose at the joint.