ADVRHumanoids / iit-centauro-ros-pkg

2 stars 0 forks source link

Shoulder roll joints does not include 0 among position margins so xbot2 warns about safety limit exceeded #10

Closed torydebra closed 3 years ago

torydebra commented 3 years ago

Hi, I was using this repo to run a gazebo simulation with centauro + xbot2. I am using:

roslaunch centauro_gazebo centauro_world.launch 
set_xbot2_config /.../iit-centauro-ros-pkg/centauro_config/centauro_basic.yaml 
export XBOT_ROOT=/.../iit-centauro-ros-pkg/centauro_urdf/
xbot2-core --simtime --verbose

And the output of xbot is :

[warn][rt_main] pos_ref min exceeded: 0.0 < 0.02 
[warn][jm] 'j_arm1_2' safety limit violation detected in tx (see above) 
[warn][jm] safety limits exceeded, disabling joint device 
[info][jm] joint_master: setting mask to 0 
[warn][rt_main] pos_ref max exceeded: 0.0 > -0.0138 
[warn][jm] 'j_arm2_2' safety limit violation detected in tx (see above) 
[warn][jm] safety limits exceeded, disabling joint device 
[info][jm] joint_master: setting mask to 0 
...

printed forever

2 Joints are affected:

  <!-- shoulder roll -->
  <joint name="j_arm1_2" type="revolute">
    <parent link="arm1_1"/>
    <child link="arm1_2"/>
    <origin rpy="-0.1745327 0.0 0.0" xyz="-0.09015 0.062 0.0"/>
    <axis xyz="1 0 0"/>
    <limit effort="147.0" lower="0.02" upper="3.431" velocity="3.86"/>
  </joint>
  <!-- /shoulder roll -->
  <!-- shoulder roll -->
  <joint name="j_arm2_2" type="revolute">
    <parent link="arm2_1"/>
    <child link="arm2_2"/>
    <origin rpy="0.1745327 0.0 0.0" xyz="-0.09015 -0.062 0.0"/>
    <axis xyz="1 0 0"/>
    <limit effort="147.0" lower="-3.4258" upper="-0.0138" velocity="3.86"/>
  </joint>
  <!-- /shoulder roll -->

and I think the problem is that they start at position 0 but the joint limit margins does not include the zero. Why this happen? Can I simply hack the urdf including the 0 in the margins ? @alaurenzi @EnricoMingo @liesrock

alaurenzi commented 3 years ago

Which xbot2 version? (xbot2-core --version)

torydebra commented 3 years ago
xbot2-core  version: 2.0.0 (1023266)
alaurenzi commented 3 years ago

You are running with an old version of xbot2 (11 dec 2020). A commit of a few days later (16 dec 2020) probably fixed your problem. Please update!

torydebra commented 3 years ago

Thanks, problem solved