ArduPilot / ardupilot_gz

Tools for ArduPilot ROS2 integration and testing on ROS 2 humble
GNU General Public License v3.0
27 stars 19 forks source link

Copter: fix odometry transform #32

Closed srmainwaring closed 9 months ago

srmainwaring commented 9 months ago

Fix the odometry transform for both copter examples.

Dependencies

Details

As reported in #30, rviz is reporting an invalid TF error when running the examples from the README page. The issue applies to both the iris_runway.launch.py and iris_maze.launch.py examples.

The reasons are explained in: https://github.com/ArduPilot/ardupilot_gz/issues/30#issuecomment-1721549208. In brief the change to use the robot_state_publisher as the authority for TF and remove the TF prefix means that the transform from odom to base_link provided by the Gazebo OdometryPublisher is no longer published to the topic /tf.

The following changes fix the issue:

Other changes:

Testing

Both launch files are tested and the node graph, TF, and rviz are provided for each:

iris_runway.launch.py

iris-fix-odom-rviz

iris-fix-odom-tf-tree

iris-fix-odom-nodes

iris_maze.launch.py

iris-lidar-fix-odom-rviz

iris-lidar-fix-odom-tf-tree

iris-lidar-fix-odom-nodes

Other issues

A side-effect of the topic_tools transform is that occasionally an empty transform array will be published to /tf. Ardupilot AP_DDS currently reports a warning if the TF message is empty. The further items to resolve are:

iris-fix-odom-mavproxy