gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.16k stars 476 forks source link

ForceTorque sensor visualization seems to ignore <pose> #2476

Open osrf-migration opened 6 years ago

osrf-migration commented 6 years ago

Original report (archived issue) by Jordan Lack (Bitbucket: jordanlack).

The original report had attachments: incorrect_ft.png


Here is a copy/pasted block from my urdf where I declare my force/torque sensor,

<gazebo reference="left_arm_j6">
    <sensor name="left_arm_j6_ft_sensor" type="force_torque">
      <pose>0.0637 -0.202 0.0 0.0 0.0 0.0</pose>
      <always_on>true</always_on>
      <update_rate>1000.0</update_rate>
      <visualize>true</visualize>
      <force_torque>
        <frame>sensor</frame>
        <measure_direction>parent_to_child</measure_direction>
      </force_torque>
    </sensor>
  </gazebo>

but the data that i'm getting off the sensor is not rotated correctly, and instead is aligned with the joint frame.

You can see in the attached image that the F/T visualization is exactly aligned with the joint frame. Using gazebo 7.12. The above block results in the following block from the SDF,

<joint name='left_arm_j6' type='revolute'>
      <child>left_arm_j6_link</child>
      <parent>left_arm_j5_link</parent>
      <axis>
        <xyz>0 0 -1</xyz>
        <limit>
          <lower>-2.399</lower>
          <upper>1.1344</upper>
          <effort>200</effort>
          <velocity>1</velocity>
        </limit>
        <dynamics>
          <damping>100</damping>
          <friction>10</friction>
          <spring_reference>0</spring_reference>
          <spring_stiffness>0</spring_stiffness>
        </dynamics>
        <use_parent_model_frame>1</use_parent_model_frame>
      </axis>
      <physics>
        <provide_feedback>1</provide_feedback>
        <ode>
          <provide_feedback>1</provide_feedback>
          <implicit_spring_damper>1</implicit_spring_damper>
          <cfm_damping>1</cfm_damping>
          <limit>
            <cfm>0</cfm>
            <erp>0.2</erp>
          </limit>
        </ode>
      </physics>
      <sensor name='left_arm_j6_ft_sensor' type='force_torque'>
        <pose frame=''>0.06375 -0.202146 0 -1.5708 0 0</pose>
        <always_on>1</always_on>
        <update_rate>1000</update_rate>
        <visualize>1</visualize>
        <force_torque>
          <frame>sensor</frame>
          <measure_direction>parent_to_child</measure_direction>
        </force_torque>
      </sensor>
    </joint>
osrf-migration commented 6 years ago

Original comment by Jordan Lack (Bitbucket: jordanlack).


osrf-migration commented 6 years ago

Original comment by Jordan Lack (Bitbucket: jordanlack).


osrf-migration commented 6 years ago

Original comment by Jordan Lack (Bitbucket: jordanlack).


osrf-migration commented 6 years ago

Original comment by Jordan Lack (Bitbucket: jordanlack).


osrf-migration commented 6 years ago

Original comment by Jordan Lack (Bitbucket: jordanlack).


After playing with it some more actually the data I think is in the correct frame, but the visualization provided by the <visualization tag is wrong.

osrf-migration commented 6 years ago

Original comment by Silvio Traversaro (Bitbucket: traversaro).


This is not directly related to the reported issue, and you probably know that, but just in case you did not or some other reader is interested: the reported force_torque sensor SDF pose has a linear component:

<sensor name='left_arm_j6_ft_sensor' type='force_torque'>
  <pose frame=''>0.06375 -0.202146 0 -1.5708 0 0</pose>
  <always_on>1</always_on>
  <update_rate>1000</update_rate>
  <visualize>1</visualize>
  <force_torque>
    <frame>sensor</frame>
    <measure_direction>parent_to_child</measure_direction>
  </force_torque>
</sensor>

but this linear component is ignored in force_torque sensors, see https://bitbucket.org/osrf/sdformat/issues/130/position-part-of-force_torque-sensor-pose .