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

Fix diffbot position integration #350

Conversation

emereum
Copy link
Contributor

@emereum emereum commented Aug 20, 2023

The hardware interface for diffbot (example 2) integrates motor position data using the 2nd motor's position for both motors. This causes odometry to report movement along a single axis only. This PR fixes the issue and restores expected odometry behaviour.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, thanks!

@christophfroehlich
Copy link
Contributor

I was wondering why this never was discovered before: The diff_drive_controller uses

  • the velocity feedback if position_feedback=false, or
  • in the default case like in this example, the change from the last position feedback devided by the time interval

for the odometry calculation, which is then transformed and published on the /tf topic.

This means, that the wrong position of the joint in the /joint_states topic isn't used anywhere.

@christophfroehlich christophfroehlich merged commit 43c9e9e into ros-controls:master Aug 20, 2023
14 checks passed
@christophfroehlich
Copy link
Contributor

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Aug 20, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 20, 2023
christophfroehlich pushed a commit that referenced this pull request Aug 20, 2023
(cherry picked from commit 43c9e9e)

Co-authored-by: Mike Emery <emerym@canva.com>
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

Successfully merging this pull request may close these issues.

2 participants