Gazebo ROS Collision Detection
Hello all,
I am trying to get a topic with the collision by using the gazebo-ros-bumper plugin, but all of the resources I have found online have not worked for me.
Here is my xacro code for the robot arm.
<!-- ***************Robot Arms*************** -->
<xacro:include filename="$(find robsim_description)/urdf/kuka.xacro" />
<!-- ***************Robot Hands*************** -->
<xacro:include filename="$(find robsim_description)/urdf/sdhhand.xacro" />
<!-- ***************Joint*************** -->
<xacro:rev_joint_block parent="arm_extension" child="sdh_gehaeuse" xyz="0 0 0.0411" rpy="0 0 0" lower="0" upper="0"/>
<!-- ***************Gazebo Plugin************************ -->
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/robarm</robotNamespace>
</plugin>
</gazebo>
Here is the code for my kuka arm:
<xacro:macro name="link_block" params="link xyz rpy filename material">
<link name="${link}">
<visual>
<origin xyz="${xyz}" rpy="${rpy}"/>
<geometry>
<mesh filename="package://robsim_description/models/${filename}"/>
</geometry>
</visual>
<collision>
<origin xyz="${xyz}" rpy="${rpy}"/>
<geometry>
<mesh filename="package://robsim_description/models/${filename}"/>
</geometry>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
</inertial>
</link>
<gazebo reference="${link}">
<turnGravityOff>true</turnGravityOff>
<material>Gazebo/${material}</material>
</gazebo>
</xacro:macro>
<xacro:macro name="rev_joint_block" params="parent child xyz rpy lower upper">
<joint name="${parent}_${child}_joint" type="revolute">
<parent link="${parent}"/>
<child link="${child}"/>
<origin xyz="${xyz}" rpy="${rpy}"/>
<axis xyz="0 0 1" rpy="0 0 0"/>
<limit lower="${lower}" upper="${upper}" effort="300.0" velocity="1000.0"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
</xacro:macro>
<xacro:macro name="transmission_block" params="parent child">
<transmission name="${parent}_${child}_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${parent}_${child}_joint">
<hardwareInterface>PositionJointInterface</hardwareInterface>
</joint>
<actuator name="${parent}_${child}_motor">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</xacro:macro>
<!-- ***************Kuka Base Plate*************** -->
<xacro:link_block link="base_link" xyz="0 0 0.016" rpy="0 0 0" filename="kuka_base_plate.dae" material="Grey"/>
<!-- ***************Kuka A1 Joint***************** -->
<xacro:link_block link="a1" xyz="0 0 0.016" rpy="0 0 0" filename="a1.dae" material="Orange"/>
<joint name="base_a1" type="fixed">
<parent link="base_link"/>
<child link="a1"/>
</joint>
<!-- ***************Kuka A2 Joint**************** -->
<xacro:link_block link="a2" xyz="0 0 0" rpy="0 0 0" filename="a2.dae" material="Orange"/>
<xacro:rev_joint_block parent="a1" child="a2" xyz="0 0 0.3265" rpy="0 0 0" lower="-2.96706" upper="2.96706"/>
<xacro:transmission_block parent="a1" child="a2"/>
<!-- ***************Kuka E1 Joint**************** -->
<xacro:link_block link="e1" xyz="0 0 0" rpy="0 0 0" filename="e1.dae" material="Orange"/>
<xacro:rev_joint_block parent="a2" child="e1" xyz="0 0 0" rpy="1.5707 3.14159 0" lower="0" upper="3.14159"/>
<xacro:transmission_block parent="a2" child="e1"/>
<!-- ***************Kuka A3 Joint**************** -->
<xacro:link_block link="a3" xyz="0 0 0" rpy="0 0 0" filename="a3.dae" material="Orange"/>
<xacro:rev_joint_block parent="e1" child="a3" xyz="-0.4 0 0" rpy="-1.5707 0 1.5707" lower="-2.0944" upper="2.0944"/>
<xacro:transmission_block parent="e1" child="a3"/>
<!-- ***************Kuka A4 Joint**************** -->
<xacro:link_block link="a4" xyz="0 0 0" rpy="0 0 0" filename="a4.dae" material="Orange"/>
<xacro:rev_joint_block parent ...
Where is your bumper plugin defined? And I'm also trying bumper simulation now and found the wiki might not be accurate. I'll edit it once I confirm the right way.
I have tried it in several places. Including the one you suggested in the gazebo wiki site. The other ones I have tried are from here and here.