Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to create a sr_tactile_sensor in gazebo ?

asked 2019-06-30 08:02:53 -0500

microbot gravatar image

updated 2019-06-30 08:06:03 -0500

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>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-02 08:32:47 -0500

kumpakri gravatar image

updated 2019-07-02 08:41:22 -0500

There is no tactile type of a sensor. source

image description

problematic part of your code:

...
<gazebo reference="tactile_1">
  <sensor type="tactile" name="sr_tactile_virtual_1">
   <pose>0.0 0.0 0.0 0.0 0 0</pose>
...
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-30 08:02:53 -0500

Seen: 26 times

Last updated: Jul 02