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

UpdateOdometryEncoder generating wrong twist data in odometry when in encoder mode for gazebo_ros_diff_drive.cpp #1552

Open
altineller opened this issue Oct 11, 2024 · 0 comments

Comments

@altineller
Copy link

Hello,

This is both a problem and fix at the same time. :)

In void GazeboRosDiffDrivePrivate::UpdateOdometryEncoder(const gazebo::common::Time & _current_time)

double v = sqrt((dx * dx) + (dy * dy)) / seconds_since_last_update;

This will always generate a positivie number,, which is used for odom_.twist.twist.linear.x = v;

I was simulating the EKF filter with gazebo when I noticed it did not work in reverse. It generates corrects results for pose, so it is not visible unless you plugin an ekf node, which uses the twist from odom.

I have not generated a fix yet, but it will be easy.

Any ideas, or recomendations greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant