Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create a sr_tactile_sensor in gazebo ?

Hello,

I am quite a beginner to the gazebo. I am trying to add sr_tactile_sensor to a link in my robot in gazebo. I have tried to create a new link as a dummy for my sensor and added a fixed joint choosing the link that is supposed to be attached to sensor as parent and the dummy link as child and choose the joint to be fixed. later I have added gazebo reference to that sensor link as follows :

<gazebo reference="tactile_1"> <sensor type="tactile" name="sr_tactile_virtual_1"> <pose>0.0 0.0 0.0 0.0 0 0</pose> <visualize>true</visualize> <update_rate>10</update_rate> <ray> <range> <min>0.00</min> <max>100.0</max> </range> </ray> <plugin name="sr_tactile_virtual_1" filename="libblock_sr_tactile_virtual.so"> <topicname>/sr_tactile_sensor_1</topicname> <framename>sr_tactile_sensor_1</framename> <alwayson>true</alwayson> <gaussiannoise>0.00</gaussiannoise> <updaterate>10.0</updaterate> </plugin> </sensor> </gazebo>

Doing so I have been having an error to spawn my robot in gazebo and I believe the error is caused because of the way I have added the sensor to my robot model. So i am wondering whether I actually need to create a dummy link and dummy joint to add the sensor or can I directly add the sensor to whatever link I want it to be attached to using gazebo reference like I did above ? I have gone through the gazeboism tutorials and I was a bit confused about this. Kindly anyone please clarify me this. For the sake of clarity I am also adding the snap of my sdf file where I have created a dummy link and joint here.

<joint name="tactile_1" type="fixed"> <parent link="left_torso_1_3"/> <child link="tactile_sensor_1"/> <origin xyz="0 0 ${height_link_1_2}" rpy="0 0 0"/> <axis xyz="0 1 0"/> <dynamics damping="0.7" friction="0.0"/> </joint>

<link name="tactile_sensor_1"> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="${tactile_link} ${tactile_link} ${tactile_link}"/> </geometry> </collision>

<visual>
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <geometry>
<box size="${tactile_link} ${tactile_link} ${tactile_link}"/>
  </geometry>
  <material name="red"/>
</visual>

<inertial>
  <mass value="1e-5" />
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>

</link>

How to create a sr_tactile_sensor in gazebo ?

Hello,

I am quite a beginner to the gazebo. I am trying to add sr_tactile_sensor to a link in my robot in gazebo. I have tried to create a new link as a dummy for my sensor and added a fixed joint choosing the link that is supposed to be attached to sensor as parent and the dummy link as child and choose the joint to be fixed. later I have added gazebo reference to that sensor link as follows :

<gazebo reference="tactile_1">
   <sensor type="tactile" name="sr_tactile_virtual_1">
    <pose>0.0 0.0 0.0 0.0 0 0</pose>
     <visualize>true</visualize>
     <update_rate>10</update_rate>
      <ray>
       <range>
         <min>0.00</min>
         <max>100.0</max>
       </range>
     </ray>
     <plugin name="sr_tactile_virtual_1" filename="libblock_sr_tactile_virtual.so">
       <topicname>/sr_tactile_sensor_1</topicname>
       <framename>sr_tactile_sensor_1</framename>
       <alwayson>true</alwayson>
       <gaussiannoise>0.00</gaussiannoise>
       <updaterate>10.0</updaterate>
<topicName>/sr_tactile_sensor_1</topicName>
       <frameName>sr_tactile_sensor_1</frameName>
       <alwaysOn>true</alwaysOn>
       <gaussianNoise>0.00</gaussianNoise>
       <updateRate>10.0</updateRate>
     </plugin>
   </sensor>
 </gazebo>

</gazebo>

Doing so I have been having an error to spawn my robot in gazebo and I believe the error is caused because of the way I have added the sensor to my robot model. So i am wondering whether I actually need to create a dummy link and dummy joint to add the sensor or can I directly add the sensor to whatever link I want it to be attached to using gazebo reference like I did above ? I have gone through the gazeboism tutorials and I was a bit confused about this. Kindly anyone please clarify me this. For the sake of clarity I am also adding the snap of my sdf file where I have created a dummy link and joint here.

<joint name="tactile_1" type="fixed"> <parent link="left_torso_1_3"/> <child link="tactile_sensor_1"/> <origin xyz="0 0 ${height_link_1_2}" rpy="0 0 0"/> <axis xyz="0 1 0"/> <dynamics damping="0.7" friction="0.0"/> </joint>

<link name="tactile_sensor_1">
   <collision>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <geometry>
     <box size="${tactile_link} ${tactile_link} ${tactile_link}"/>
     </geometry>
    </collision>

</collision>

  <visual>
   <origin xyz="0 0 0" rpy="0 0 0"/>
   <geometry>
 <box size="${tactile_link} ${tactile_link} ${tactile_link}"/>
   </geometry>
   <material name="red"/>
 </visual>

 <inertial>
   <mass value="1e-5" />
   <origin xyz="0 0 0" rpy="0 0 0"/>
   <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
 </inertial>
  </link>

</link>