A waypoint generator (using InteractiveMarkers in Rviz) and a waypoint server for waypoint playback. The waypoints are saved as a YAML file.
Git clone the ROS Package into the relevant workspace.
cd ~/catkin_ws/src
git clone https://github.com/quantumxt/waypointgen.git
Compile the package.
cd ~/catkin_ws
catkin_make
or
cd ~/catkin_ws
catkin build waypointgen
Utilizing interactive markers for a more visual approach in generating waypoints.
Launch the Waypoint Generator via roslaunch, which would launch the program and rviz:
$ roslaunch waypointgen setpoint_marker.launch
Next, add the InteractiveMarker in Rviz. (Topic name: /setpoint_marker/update)
Alternatively, load
wp_markers.rviz
into Rviz viarviz -d wp_markers.rviz
.
There are 3 options available in the context menu (when the marker is right-clicked):
- Get Location: Get current location of marker selected.
- Waypoint
- Add: Add new waypoint.
- Remove: Remove selected waypoint.
- Generate Waypoint List: Generate waypoint list to be used in waypoint playback.
The waypoint server would load the YAML which is specified in the roslaunch file, which would then publish the various navigation goals.
Note: The setpoint_server node subscribes to /move_base/TebLocalPlanner/GlobalPath, so change it accordingly if TebLocalPlanner Plugin is not used!
Launch the playback server via roslaunch:
$ roslaunch waypointgen setpoint_server.launch
The path of the waypoint list is specified via the list_path
param, and is set through the list_path
arguement.
<arg name="list_path" default="$(find waypointgen)/wp_list/a.yaml" />
Starting the server playback
A ROS Service call would be used to start the playback of the points, call the /trigger_play
service.
rosservice call /trigger_play <Delay in seconds>
For example, triggering the playback after 3s.
rosservice call /trigger_play 3
To run the unit test, ensure that the wayointgen package has been compiled previously.
catkin build waypointgen
After that, compile the test.
catkin test waypointgen
- Initial commit.
- Convert functions to classes.
- Refactored code.
- Replace ros topic subscription to ros service to trigger playback.
- Add ROS CI.
- Add benchmark metrics.
- Split into seperate ROS nodes.
- Refactored code.
- Removed custom msg.
- Update launch files.
- Add unit tests & rostest for utils.