How do I use force sensor & bumper sensor in Gazebo?
I am designing a biped robot model in gazebo. I am trying to add force sensors on the bottom of the foot, but I don't know what parameters I need to do that.. so far this is what I have written in my urdf.xacro file. If I correct if the sensor got implemented then it should publish the sensor data, right?? .Please let me know if I am missing something or have written it wrong.
<link name="R_leg">
<inertial>
<origin xyz="0 0.0 -0.124" rpy="0 0 0 "/>
<mass value="0.15" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" />
</inertial>
<visual>
<origin xyz="0 0.0 -0.124" rpy="0 0 0 "/>
<geometry>
<box size="0.1 0.12 0.25" />
</geometry>
</visual>
<collision>
<origin xyz="0 0.0 -0.124" rpy="0 0 0 "/>
<geometry>
<box size="0.1 0.12 0.20" />
</geometry>
</collision>
</link>
<gazebo reference="R_leg">
<material>Gazebo/White</material>
<turnGravityOff>false</turnGravityOff>
</gazebo>
<link name="R_foot">
<inertial>
<origin xyz="0 0.0 -0.010" rpy="0 0 0"/>
<mass value="0.15" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" />
</inertial>
<visual>
<origin xyz="0 0.0 -0.010" rpy="0 0 0"/>
<geometry>
<box size="0.2 0.12 0.02" />
</geometry>
</visual>
<collision>
<origin xyz="0 0.0 -0.010" rpy="0 0 0"/>
<geometry>
<box size="0.2 0.12 0.02" />
</geometry>
</collision>
</link>
<gazebo reference="R_foot">
<material>Gazebo/Red</material>
<turnGravityOff>false</turnGravityOff>
</gazebo>
<joint name="R_leg3_joint" type="revolute" >
<origin xyz="0 0.0 -0.250" rpy="0 0 0" />
<parent link="R_leg" />
<child link="R_foot" />
<axis xyz="0 1 0"/>
<limit effort="30" velocity="1" lower="-1.0" upper="1.0"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
<body:empty name="R_foot_force_model_name">
<sensor:contact name="R_foot_contact_sensor">
<updateRate>15.0</updateRate>
<geom>R_foot</geom>
<controller:gazebo_ros_bumper name="R_foot_contact_controller" plugin="libgazebo_ros_bumper.so">
<alwaysOn>true</alwaysOn>
<updateRate>15.0</updateRate>
<bumperTopicName>R_foot_bumper</bumperTopicName>
<interface:bumper name="dummy_bumper_iface" />
</controller:gazebo_ros_bumper>
</sensor:contact>
</body:empty>
Second Question : I dont understand how gazebo_ros_f3d works.. cause i get force and torque zero all the time... should it not show gravity as one of the forces... this is what i have written:
<controller:gazebo_ros_f3d name="gazebo_ros_Lf_force"plugin="libgazebo_ros_f3d.so">
<alwaysOn>true</alwaysOn>
<stepTime>0.001</stepTime>
<updateRate>1000.0</updateRate>
<bodyName>L_foot</bodyName>
<topicName>L_foot_force</topicName>
<frameName>map</frameName>
<interface:position name="p3d_L_foot_force"/>
</controller:gazebo_ros_f3d>