Not sure how to work with the contact sensor.

asked 2019-10-04 15:44:47 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello, New to gazebo.

I am trying to add a sensor to a link and get force values. I am using a urdf. I tried the tutorial for the force torque sensor on gazebo but it didn't work. I tried the contact sensor. IT shows up in the rostopic list. However, does not show any information.

The gazebo code is here:

<gazebo reference="${name}_finger_33_sensor">
        <material>Gazebo/Black</material>
        <sensor type="contact" name="contact_sensor">
                    <always_on>true</always_on>
                    <update_rate>1.0</update_rate>
                                    <contact>
                    <collision>${name}_finger_13_sensor_collision</collision>
                    </contact>
                        <plugin name="contact_plugin" filename="libgazebo_ros_bumper.so"> 
                        <alwaysOn>true</alwaysOn>
                        <updateRate>8</updateRate>
                        <bumperTopicName>contact_sensor</bumperTopicName>
                    <frameName>${name}_finger_33_sensor</frameName>
                        </plugin>
                    </sensor>
            </gazebo>

I can see contact_sensor when I enter rostopic list in the terminal.This is what I get when i use rostopic echo image description

Thanks for the help in advance. If you also know how to import the data to use it in python kindly let me know.

edit retag flag offensive close merge delete