Robotics StackExchange | Archived questions

Physics::Joint::Position() returning incorrect values for small angles

I am modeling an elastic ball joint (composed of two revolute joints, because I am using urdf) and have an issue, where Joint angle values reported from gazebo seem to fluctuate from negative to positive for small angles at seemingly random. I saw a similar issue mentioned here before, but without a good solution or means to debug: https://answers.gazebosim.org/question/21286/physicsjointgetangle-returning-incorrect-values-close-to-0/

The picture looks relatively similar (taken from plotjuggler, y axis is joint angle in radians, x axis is seconds). Note that I am using a jointstatecontroller from gazeborospkgs to publish these values, looking at it's source it calls the newer Joint::Position method, but issue looks similar. This picture is taken after moving the platform in a direction parallel to x axis (first 17 seconds), then moving it parallel to y axis (angle at 0.1 radians) and then moving it in a few other directions.

image description

I am using these elastic joints for sensing the environment, and also need them to be accurate on small angles. What can I do to get joint accurate angles? Should I try to calculate them also from world pose of the joints, like done on the previous question?

I am able to share the project, if someone more capable is interested to take a look at why this is happening. I've already added the model to the post (it is actually urdf, but renamed to sdf, because I cannot upload an urdf). model

Also added the whole project to git, in case that is easier to look at: https://github.com/AndreasNagel/get_angle_issue_sample

Asked by dregel on 2021-04-06 03:46:55 UTC

Comments

Answers

hello, it looks like some sort of integration instability, did you try to reduce the integration timestep, and see if the oscillation amplitude reduces ? if it is really an integration instability, check that you use on every problematic joint, and try to increase the joint friction (with the damping tag, inside the dynamics tag of the joint).

Asked by Clément Rolinat on 2021-04-27 04:00:24 UTC

Comments