problem with contact sensor. Easy question
hi to everybody, I'm trying to pull out some data from the contact point of an object, so I chose to use the Gazebo Ros Bumper plug in. This is my sdf file
<?xml version="1.0"?>
<gazebo version="1.0">
<world name="default">
<scene>
<ambient rgba="0.0 0.0 0.0 1"/>
<background rgba="1 1 1 1"/>
<shadows enabled="true"/>
</scene>
<physics type="ode" update_rate="100">
<gravity xyz="0 0 -9.8"/>
<ode>
<solver type="quick" dt="0.01" iters="100" sor="1.3"/>
</ode>
</physics>
<!-- Ground Plane -->
<include filename="ground_plane.model"/>
<model name="cylinder1">
<link name="link">
<origin pose="0 0 0.5 0 0 0"/>
<inertial mass="1.0">
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
</inertial>
<collision name="cylinder1_geom">
<geometry>
<cylinder radius="0.5" length="1.0"/>
</geometry>
</collision>
<visual name="cylinder1_vis">
<geometry>
<cylinder radius="0.5" length="1.0"/>
</geometry>
<material script="Gazebo/Grey"/>
</visual>
<sensor name='contact_sensor' type='contact' always_on='1' update_rate='1.000000' visualize='1'>
<origin pose='0 0 0.5 0 0 0'/>
<contact>
<collision name="cylinder1_geom"/>
</contact>
<plugin name="gazebo_ros_bumper" filename="libgazebo_ros_bumper.so"/>
</sensor>
</link>
</model>
<model name="cylinder">
<link name="link2">
<origin pose="0 0 1.5 0 0 0"/>
<inertial mass="1.0">
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
</inertial>
<collision name="cylinder2_geom">
<geometry>
<cylinder radius="0.3" length="1.0"/>
</geometry>
</collision>
<visual name="cylinder2_vis">
<geometry>
<cylinder radius="0.3" length="1.0"/>
</geometry>
<material script="Gazebo/Grey"/>
</visual>
</link>
</model>
<light type="directional" name="sun" cast_shadows="true">
<origin pose="0 0 10 0 0 0"/>
<diffuse rgba="1.0 1.0 1.0 1"/>
<specular rgba=".1 .1 .1 1"/>
<attenuation range="10" constant="0.8" linear="0.01" quadratic="0.0"/>
<direction xyz="0 .2 -1.0"/>
</light>
</world>
</gazebo>
the problem is that when i type : rostopic echo bumper_states
this error appears on the roslaunch terminal :
Error [ContactSensor.cc:237] Contact Sensor[contact_sensor] has no collision[cylinder1_geom]
one for each clock cycle. I don't really know where i'am wronging.I'm so sorry for the silliness of the question, but I'm new in this world so also simple things are not discounted for me. Thanks a lot in advance.
You might find better help on the gazebo answers site: http://answers.gazebosim.org/questions/
if you manage to find a solution, do post.