Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Odometry sources #36

Open
alireza-moayyedi opened this issue Nov 11, 2024 · 0 comments
Open

Duplicate Odometry sources #36

alireza-moayyedi opened this issue Nov 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@alireza-moayyedi
Copy link

alireza-moayyedi commented Nov 11, 2024

Hello,

It seems like both the ignition::gazebo::systems::DiffDrive as well as gz::sim::systems::OdometryPublisher in the template are publishing odometry messages. In case of this template, the diff drive is publishing with child frame id as chassis while the OdometryPublisher is publishing with child frame id as diff_drive. And both of them are being piped into the same topic over gz bridge (both publish by default to "/model/diff_drive/odometry" in gz and both go to "/diff_drive/odometry" over the birdge)

$ ros2 topic echo /diff_drive/odometry | grep child_frame_id
child_frame_id: diff_drive/chassis
child_frame_id: diff_drive

I was wondering what's the reason for having this duplication?

If I simply give as input a twist message with only a positive x, I see that in case of the template, the values are (almost) the same.

Screenshot from 2024-11-08 15-21-51

but I noticed that in my own robot (with different physical properties) the diff drive plugin values are slightly different than the ones of the OdometryPublisher. I believe Odometry publisher uses ground truth positions from gazebo. And in that case the difference becomes much more evident between the two odometry messages.

Screenshot from 2024-11-08 15-17-48

As a solution I simply removed the OdometryPublisher plugin and used only diff drive plugin for both odometry as well as the odom tf publishing.

Personally I would suggest to use only one source of Odometry. Either diff drive or odometry publisher plugin. Or keep both plugins but pipe the Odometry messages into different topics in both Gazebo as well as over the birdge. It may also help to be explicit about the fact that odometry publisher has ground truth information while diff drive can include physical errors such as wrong wheel radius, wheel separation or possible wheel slips.

Environment

  • OS Version: Ubuntu 24
  • Source build - Main branch - 0d57722 commit
  • ROS 2 Jazzy
  • Gazebo Harmonic 8.6.0
@alireza-moayyedi alireza-moayyedi added the bug Something isn't working label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants