Gazebo_ros_bumper plugin returns empty state despite collision
Hi,
I am using the gazeborosbumper plugin to detect a collision. Everything seems to work fine except that I the collision rostopic always returns empty states which indicates that no collision happened.
header:
seq: 9637
stamp:
secs: 0
nsecs: 0
frame_id: "world"
states: []
=> states[] always empty
I can see the collisions when I subscripe to the contacts topic using gazebo directly:
gz topic -e /gazebo/default/physics/contacts
Code from urdf file:
<link name="collision_layer">
<visual>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.8 0.6 0.03" />
</geometry>
</visual>
<collision name="collision_layer_collision">
<origin xyz="0 0 0.1" rpy="0 0 0 " />
<geometry>
<box size="0.8 0.6 0.03" />
</geometry>
</collision>
</link>
<joint name="collision_layer_joint" type="fixed">
<origin xyz="0 0 0.1" rpy="0 0 0" />
<parent link="base_footprint"/>
<child link="collision_layer" />
</joint>
<gazebo reference="collision_layer">
<sensor name="main_bumper" type="contact">
<selfCollide>true</selfCollide>
<alwaysOn>true</alwaysOn>
<updateRate>15.0</updateRate>
<material>Gazebo/Red</material>
<contact>
<collision>collision_layer_collision_collision</collision>
</contact>
<plugin name="gazebo_ros_bumper_controller" filename="libgazebo_ros_bumper.so">
<bumperTopicName>collision_robot</bumperTopicName>
</plugin>
</sensor>
</gazebo>
Does anybody know how to fix this?
Asked by Feynman on 2018-01-23 09:58:20 UTC
Answers
I think that the name in the collision tag of the sensor is wrong.
Instead of collision_layer_collision_collision try collision_layer_collision
Asked by Brosseau.F on 2018-01-31 09:39:45 UTC
Comments