ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
5

Force torque sensor simulation

asked 2015-11-29 14:21:27 -0500

mrslvgg gravatar image

Hi all,

I'm trying to simulate a force sensor located at the tip of my robot. I'm using ros indigo with gazebo 2.2. I went through this and this tutorials and I was able to publish the contact state of a box model using libgazebo_ros_bumper.so.

What I'm interested in is to use a proper force sensor with the associated force controller. I didn't found any documentation about that in Gazebo Tutorials website and I'm asking in the case someone has had the some issue.

I also found this archive of ros_controllers in which there is a force_torque_sensor_controller but I don't know how to use it.

Thanks for your help!

edit retag flag offensive close merge delete

Comments

Hi, I am also interested to achieve something similar. Did you figure out how to realise it?

filipposanfilippo gravatar image filipposanfilippo  ( 2016-05-14 05:20:54 -0500 )edit

I answered my question

mrslvgg gravatar image mrslvgg  ( 2016-05-14 07:40:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-05-14 07:40:12 -0500

mrslvgg gravatar image

updated 2016-06-17 03:33:13 -0500

I finally figure out how to do this. Basicly, I added the ft_sensor plugin to my urdf.

Following my code:

<gazebo reference="${name}_fixed_base_joint">
    <provideFeedback>true</provideFeedback>
</gazebo>

<!-- The ft_sensor plugin -->  
<gazebo>
    <plugin name="ft_sensor" filename="libgazebo_ros_ft_sensor.so">
        <updateRate>100.0</updateRate>
        <topicName>ft_sensor_topic</topicName>
        <jointName>schunk_wsg50_fixed_base_joint</jointName>
    </plugin>
</gazebo>

some remarks:

  • this plugin works with a joint, in my case "${name}_fixed_base_joint" is the name of the joint connecting the robot to the end-effector and it is fixed type
  • have look at the plugin implementation to figure out the reference frame in which the wrench is given

Hope this can help. :)

edit flag offensive delete link more

Comments

1

I always get an error that the joint I want to cope with does not exist. Did you have the same problem before? And can you tell me how you define the inertial parameters to get a right measurement? Thanks a lot!

mizu_lily gravatar image mizu_lily  ( 2016-06-17 01:11:26 -0500 )edit

Sounds like probably you misspelled the joint name in the URDF. Consider that in my example code the parameter name contains the string schunk_wsg50. To be sure, fill both gazebo reference, and jointName tags with the correct joint name. All the inertial parameters of my robot remained untouched.

mrslvgg gravatar image mrslvgg  ( 2016-06-17 03:43:22 -0500 )edit

What type of joint are you using?

SorinV gravatar image SorinV  ( 2017-07-20 09:08:47 -0500 )edit

Sometimes I get the jointName: joint does not exist error too. It's certainly not a typo and I find that it depends on which specific joint on choose for a robot arm model with a mobile base. A potential solution: http://answers.gazebosim.org/question...

AlanSixth gravatar image AlanSixth  ( 2019-05-24 00:11:46 -0500 )edit
1

This worked for me, below is the macro for the entire joint that I add the sensor to

 <xacro:macro name="fixed_joint_macro" params="xyz name parent child limit">
  <joint name="${name}" type="prismatic">
   <parent link="${parent}"/>
   <child link="${child}"/>
   <origin rpy="0 0 0" xyz="${xyz}"/>
   <axis xyz="1 0 0"/>
   <limit effort="1000" lower="-0.0001" upper="0.0001" velocity="10"/>
  </joint>

<gazebo reference="${name}">
    <provideFeedback>true</provideFeedback>
</gazebo>

<!-- The ft_sensor plugin -->  
<gazebo>
    <plugin name="ft_sensor" filename="libgazebo_ros_ft_sensor.so">
        <updateRate>100.0</updateRate>
        <topicName>sensor_${name}</topicName>
        <jointName>${name}</jointName>
    </plugin>
</gazebo>
</xacro:macro>
JoshuaElliott gravatar image JoshuaElliott  ( 2020-12-09 15:09:15 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-11-29 14:21:27 -0500

Seen: 5,040 times

Last updated: Jun 17 '16