Closed budzianowski closed 6 days ago
Hello @budzianowski,
You have compiled pinocchio 3 in Debug mode. Did you have also compiled pinocchio 2 in Debug mode ? If it's not the case it's normal the assert is silent when running the same code with pinocchio 2.
Here the model.check(data)
function return False, that mean you model and data are somehow not right.
I have check your URDF and this part trigger me:
<joint name="abdomen_x" type="revolute">
<parent link="pelvis"/>
<child link="torso"/>
<origin xyz="0 0 0.35" rpy="0 0 0"/>
<axis xyz="1 0 0"/>
<limit lower="-1.047" upper="1.047" effort="600" velocity="1.0"/>
<dynamics damping="60" friction="0"/>
</joint>
<joint name="abdomen_y" type="revolute">
<parent link="pelvis"/>
<child link="torso"/>
<origin xyz="0 0 0.35" rpy="0 0 0"/>
<axis xyz="0 1 0"/>
<limit lower="-1.047" upper="1.57" effort="600" velocity="1.0"/>
<dynamics damping="60" friction="0"/>
</joint>
<joint name="abdomen_z" type="revolute">
<parent link="pelvis"/>
<child link="torso"/>
<origin xyz="0 0 0.35" rpy="0 0 0"/>
<axis xyz="0 0 1"/>
<limit lower="-0.872" upper="0.872" effort="600" velocity="1.0"/>
<dynamics damping="60" friction="0"/>
</joint>
Here, you have 3 joints that link from/to the same body. It's not right and create an invalid Model.K I don't know if URDF allow to create composite joint. You can add intermediate body (torso2, torso3) to simulate that. You can also use MJCF that support composite joint.
Thanks - I will check pin2 although I can't find any debug flags in CMakeLists?
It's the CMAKE_BUILD_TYPE variable. By default this variable is not set and assert are activated.
If you have installed pinocchio 2 from a package manager (pypi, conda, ...) it's build in release mode.
Bug description
Running the same code results in the following error in 3.0.0
Assertion failed: (model.check(data) && "data is not consistent with model."), function forwardKinematics, file kinematics.hxx, line 88.
It is hard to debug this so opening the issue.Reproduction steps
System