-
Notifications
You must be signed in to change notification settings - Fork 488
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
Respect joint axes' initial_position #2827
base: gazebo11
Are you sure you want to change the base?
Respect joint axes' initial_position #2827
Conversation
It's still a work in progress because it doesn't seem to work quite right. I tried it on the Here are the model files I used: The first joint having the Is there something to be aware of during the model initialization process? |
we've actually been planning to deprecate that tag in SDFormat 1.8 (see osrf/sdformat bitbucket PR 683, since we figured the cc @azeey |
Ok, but since it will be only deprecated and should still be supported in my opinion. Is the state approach supported? I tried it with no effect. |
Yes, I just checked with these quick steps:
You can inspect the saved file to see how the |
Ok, I understood it wrong from reading the documentation. The steps you provided work. But I still think the |
Another thing I noticed: When loading a robot model, moving it in the desired configuration and saving the world, the state only contains |
I haven't tried, but there seems to be a |
That's what I've tried as well but didn't work. This is my world file. I would expect the pendulum to start in a different configuration. But changing the angle has no effect. <?xml version="1.0" ?>
<sdf version="1.7">
<world name="default">
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<model name="double_pendulum">
<include>
<uri>model://double_pendulum_with_base</uri>
</include>
</model>
<state world_name="default">
<model name="double_pendulum">
<joint name="double_pendulum_with_base::upper_joint">
<angle axis="0">-1.58</angle>
</joint>
</model>
</state>
</world>
</sdf> |
Spoiler alert: They don't
Before the model state did not load the joint states even though the code was there but only commented out. This is part of the effort of supporting the SDF's joint state feature.
Because it's currently not loaded.
Use the commented code and update it to the new API. Also extend it for more than one joint axis.
5e7548f
to
0b903d6
Compare
I reverted the commit trying to fix the The latest commits add support for the joint angle state. The example I posted before is working for me now. I also added regression tests. |
It was introduced in SDF version 1.6 and is not supported currently.
SDF version 1.6 introduced an initial_position for joint axes. This is useful for loading models in a collision free pose. Universal Robot's UR5e is penetrating the ground with the default initial configuration of all axes set to 0.0.
Now the |
@chapulina do you mind having another look or shall we close it? |
Hi, |
@chapulina @azeey just listened to the ignition community meeting and thought about this PR when talking about initial states of the models. |
SDF version 1.6 introduced an initial_position for joint axes. This is useful for loading models in a collision free pose. For example, Universal Robot's UR5e is penetrating the ground with the default initial configuration of all axes set to 0.0.
Fixes #2694