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

update old pos before publishing odom #599

Open
wants to merge 3 commits into
base: noetic-devel
Choose a base branch
from

Conversation

1hada
Copy link

@1hada 1hada commented May 19, 2022

The PR solves a bug where the joint state positions used by odometry are non-zero by the time a controller starts.

We have found that as our hardware interface begins, and the peripheral devices initialize, the first joint states read by the controller are nonzero.

Fixing the bug from within the odometry class is more robust than implementing a position offset in the hardware interface. The reason it’s more robust is because :

  • it allows the odometry’s velocity-accumulator to more quickly converge towards a more accurate velocity than if an erroneous value from a non zero previous joint state should have been used.

example :

  • robot initialization
  • controller stops
    it solves an edge case where the controller and it’s odometry instance are destroyed, the destruction results in a similar scenario as the robot initialization where a non-zero old position is essential to maintaining reasonable velocity values / converging to the more accurate velocity values faster.

The PR maintains undefined behavior if the hardware interface shuts down and thus creates a large change in odometry based on a hardware failure, such a case would have still existed with out the fix.

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.

1 participant