/velocity_planner

The velocity planner is designed to take in fixed global waypoints from a map, and the current world state (vehicle location, detected obstacles, detected traffic signals) and alter the velocities of the waypoints as required.

Primary LanguagePythonMIT LicenseMIT

🧶 Velocity Planner

The velocity planner is designed to take in fixed global waypoints from a map, and the current world state (vehicle location, detected obstacles, detected traffic signals) and alter the velocities of the waypoints as required.

View in rviz of the planner output Yellow cubes: global waypoints, Purple circle: current pose, Green/red circles: local planned waypoints

Requirements

Installation

  • Go to the src directory: cd ~/colcon_ws/src
  • Clone the source code: git clone
  • Go to the root of the workspace: cd ~/colcon_ws
  • Build: colcon build --symlink-install --packages-up-to velocity_planner

Usage

Inputs

  • current location (geometry_msgs/Pose on topic /planner/current_pose)
  • global waypoints (mcav_interfaces/msg/WaypointArray on topic /planner/global_waypoints)

Outputs

  • Array of upcoming waypoints beginning at the point closest to the vehicle (mcav_interfaces/msg/WaypointArray on topic /planner/local_waypoints)

Run the planner

  • cd ~/colcon_ws && . install/setup.bash
  • ros2 launch velocity_planner velocity_planner.launch.py

Visualise global and local waypoints

  • ros2 run velocity_planner waypoint_visualiser
  • cd velocity_planner/ && rviz2 -d planner.rviz

Publishing waypoints

1. Test using fake global waypoints

  • . install/setup.bash
  • ros2 run velocity_planner fake_waypoint_publisher

or 2. Test using waypoints from a csv file

  • . install/setup.bash
  • ros2 run velocity_planner waypoint_reader town01_small_waypoints.csv

Example run

Shows planner stopping for a detected object

Screencast.from.12-02-22.13_23_05.webm.mov