Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

In the OP's code, the joint's upper and lower limits are both set to 0. That might be the problem. I ran into strange behavior from the force_torque sensor when the joint hit it's limits.


Declaring the force_torque sensors within my URDF worked for me.

code:

  <robot>
    ...

   <joint name="name_of_joint" type="revolute">
     <axis xyz="0 1 0"/>
     <parent link="joint_parent_link"/>
     <child link="joint_child_link"/>
     <origin rpy="0 0 2" xyz="-1 0 0"/>
    <dynamics friction="0.01" damping="0.39"/>
     <limit upper="1.3" lower="-1.3 effort="50.0" velocity="50.0"/>
   </joint>
    ...
    <gazebo reference="name_of_joint">
      <sensor name="name_of_joint_force_torque" type="force_torque">
        <force_torque>
          <always_on>true</always_on>
          <update_rate>25.0</update_rate>
          <frame>sensor</frame>
          <measure_direction>child_to_parent</measure_direction>
        </force_torque>
      </sensor>
    </gazebo>
  </robot>

In the OP's code, the joint's upper and lower limits are both set to 0. That might be the problem. I ran into strange behavior from the force_torque sensor when the joint hit it's limits.


Declaring the force_torque sensors within my URDF worked for me.

code:

  <robot>
    ...
     <joint name="name_of_joint" type="revolute">
      <axis xyz="0 1 0"/>
      <parent link="joint_parent_link"/>
      <child link="joint_child_link"/>
      <origin rpy="0 0 2" xyz="-1 0 0"/>
     <dynamics friction="0.01" damping="0.39"/>
      <limit upper="1.3" lower="-1.3 effort="50.0" velocity="50.0"/>
    </joint>
    ...
    <gazebo reference="name_of_joint">
      <sensor name="name_of_joint_force_torque" type="force_torque">
        <force_torque>
          <always_on>true</always_on>
          <update_rate>25.0</update_rate>
          <frame>sensor</frame>
          <measure_direction>child_to_parent</measure_direction>
        </force_torque>
      </sensor>
    </gazebo>
  </robot>

In the OP's code, the joint's upper and lower limits are both set to 0. That might be the problem. I ran into strange behavior from the force_torque sensor when the joint hit it's limits.


Declaring the force_torque sensors within my URDF worked for me.

code:

  <robot>
    ...
    <joint name="name_of_joint" type="revolute">
      <axis xyz="0 1 0"/>
      <parent link="joint_parent_link"/>
      <child link="joint_child_link"/>
      <origin rpy="0 0 2" xyz="-1 0 0"/>
      <dynamics friction="0.01" damping="0.39"/>
      <limit upper="1.3" lower="-1.3 lower="-1.3" effort="50.0" velocity="50.0"/>
    </joint>
    ...
    <gazebo reference="name_of_joint">
      <sensor name="name_of_joint_force_torque" type="force_torque">
        <force_torque>
          <always_on>true</always_on>
          <update_rate>25.0</update_rate>
          <frame>sensor</frame>
          <measure_direction>child_to_parent</measure_direction>
        </force_torque>
      </sensor>
    </gazebo>
  </robot>

In the OP's code, the joint's upper and lower limits are both set to 0. That might be the problem. I ran into strange behavior from the force_torque sensor when the joint hit it's limits.


Declaring the force_torque sensors within my URDF worked for me.

code:

  <robot>
    ...
    <joint name="name_of_joint" type="revolute">
      <axis xyz="0 1 0"/>
      <parent link="joint_parent_link"/>
      <child link="joint_child_link"/>
      <origin rpy="0 0 2" xyz="-1 0 0"/>
      <dynamics friction="0.01" damping="0.39"/>
      <limit upper="1.3" lower="-1.3" effort="50.0" velocity="50.0"/>
    </joint>
    ...
    <gazebo reference="name_of_joint">
      <sensor name="name_of_joint_force_torque" type="force_torque">
        <always_on>true</always_on>
        <update_rate>25.0</update_rate>
        <force_torque>
          <always_on>true</always_on>
          <update_rate>25.0</update_rate>
          <frame>sensor</frame>
          <measure_direction>child_to_parent</measure_direction>
        </force_torque>
      </sensor>
    </gazebo>
  </robot>

force_torque sensor tutorial: http://gazebosim.org/tutorials?tut=force_torque_sensor&cat=sensors