This package offers some tools, which can improve the claudi_gazebo simulation, in particular the waypoint follower.
The package offers these tools:
- Ground truth publisher
- Path plotter
- Waypoint generator
- GPS error simulator
- Wait for localization node
- Odom Ros2 republisher (deprecated)
The launch file creates a Gazebo-Ros2 bridge for the tf_message that describes the world-robot relation using the ros_gz_bridge
package. In addition, it stats the ground_truth_publisher_node, which listens to the ground truth tf topic, extracts the claudi/base_link frame and publishes the pose as a PoseStamped message relative to the map frame.
When using the gazebo bridge to forward the tf message, the message consists of many transformations, all with empty headers. To extract the claudi/base_link transformation, the node simply chooses the first transformation. For now, this is consistently the right transformation but this might change in the future.
There are two path plotter nodes, one for the ground truth position and one for the localization position.
These nodes listen to the corresponding topic, pose/base_link
and odometry/global
, respectively, and create a path message which is then published in a reduced frequency to path/ground_truth
and path/odometry/global
.
The launch file stats both nodes.
The waypoint generator can generate waypoints with variable separations in different patterns:
Line: All waypoints in a staight line. Waypoint separation and accumulated distance between waypoints can be configured.
Cosine: The waypoints follow a cosine form. Waypoint separation and distance can be configured. Distance can either be set to the accumulated distance between waypoints or to the distance in propagation direction.
Square wave: not yet implemented
todo
This node is just listening to the map topic. After the first message is received, the node shuts down. This allows to start the navigation as soon as the localization is ready by using the OnProcessExit event handler.
Not required anymore, as cpp node included in claudi_gazebo.
Node, that listens to /odom/gazebo
(ros_gz_bridge output), adjusts header.frame_id and child_frame_id, before republishing to /odom
.
- For the waypoint generator, a running gps localization with navsat_transform_node is required
- ... many packages, use rosdep to install
Clone, build and use rosdep to install dependencies.
ros2 launch wpf_tools ground_truth_publisher.launch.py
To start both nodes (default), use the launch file:
ros2 launch wpf_tools path_plotter.launch.py
To select only one path plotter node, you can either use a launch argument or just run the relevant node:
ros2 launch wpf_tools path_plotter.launch.py path_localization_enabled:=True path_ground_truth_enabled:=True
ros2 run wpf_tools path_plotter_localization
ros2 run wpf_tools path_plotter_ground_truth
Adjust the yaml config file or create a new one.
ros2 run wpf_tools waypoint_generator_node.py --ros-args --param-file <package_src_or_share>/wpf_tools/config/wp_generator.yaml
ros2 run wpf_tools waypoint_generator_node.py --ros-args --param-file ./src/wpf_tools/config/wp_generator.yaml
todo
/pose/base_link
/path/localization
/path/odometry/global
- None
/emlid/modified
- 0.1
- Initial Release