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

Joint positions might incorrect after RESET #33

Open
dmronga opened this issue Apr 24, 2018 · 8 comments
Open

Joint positions might incorrect after RESET #33

dmronga opened this issue Apr 24, 2018 · 8 comments

Comments

@dmronga
Copy link
Contributor

dmronga commented Apr 24, 2018

One more (:
When I do a RESET, the joint positions might be flipped by 2pi. The problem occurs when I reset the simulation while one or more of the joints are located at position >pi or <-pi.
This is due to the absolute position conversion done here:

double updateAbsolutePosition( double v )
The position is shifted by 2pi if the absolute difference to the last position is bigger than pi.
Is there a good reason for doing such a conversion? If not I would suggest to remove it.

@planthaber
Copy link
Member

afaik this was done because the motors in the simulation do not support multi-rotation for position controls, so in normal operation the command values need to be between -pi and pi

@malter
Copy link
Member

malter commented Apr 27, 2018

The simulation on the develop branch handles the joint position correctly, even for multi-turn motors. I also added a develop branch for the orogen mars component where the 2pi conversion is removed. It would be great if you can test the develop branch of mars and orogen/mars to check if the simulation behaves correct for you?
We will merge the develop branch into the master until we tested all new features a bit more. ;-)

@dmronga
Copy link
Contributor Author

dmronga commented Aug 23, 2018

I finally had time to test this feature on the develop branch, seems ok to me

@dmronga
Copy link
Contributor Author

dmronga commented Feb 28, 2019

Can you merge this feature to master?

@malter
Copy link
Member

malter commented Feb 28, 2019

It should already be in the master branch since 10th of January ;-)

@dmronga
Copy link
Contributor Author

dmronga commented Feb 28, 2019

Hmm, from what I see it is not. See here. Compared to that the develop branch looks like this. It is just that I recently switched to master and now I have the same issues as before, that sometimes joints are reset to the wrong position...

@malter
Copy link
Member

malter commented Feb 28, 2019

Ahh, I see, I only checked the branch of MARS not of the orogen component ;-)

@malter
Copy link
Member

malter commented Feb 28, 2019

Merged :-)

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

3 participants