Robotics StackExchange | Archived questions

Set intensity for an object so gazebo_ros_laser will notice

Hey, I'm very new to ros and gazebo.

I'm trying to make the gazeboroslaser notice a reflecting Object. But when I check this->parent_ray_sensor_->GetLaserShape()->GetRetro(ja) in the gazebo_ros_laser.cpp it is set to zero.

in my urdf file i set the laser retro value to 200

    <robot name="reflector">
  <link name="test_reflector">
    <inertial>
      <origin xyz="5 5 2" /> 
      <mass value="1.0" />
      <inertia  ixx="0.0" ixy="0.0"  ixz="0.0"  iyy="0.0"  iyz="0.0"  izz="0.0" />
    </inertial>
    <visual>
      <origin xyz="5 5 2"/>
      <geometry>
        <box size="1 1 2" />
      </geometry>
      <material name="Cyan">
    <color rgba="0 1.0 1.0 1.0"/>
      </material>
      <laserRetro>200.0</laserRetro>
    </visual>
    <collision>
      <origin xyz="5 5 2"/>
      <geometry>
        <box size="1 1 2" />
      </geometry>
      <laserRetro>200.0</laserRetro>
    </collision>
  </link>
 <gazebo reference="test_reflector">
    <material>Gazebo/Grey</material>
    <laserRetro>200</laserRetro>
    <turnGravityOff>true</turnGravityOff>
 </gazebo>

could you please tell me what I'm doing wrong?

Also I would really like to know how the information I specified in the urdf-file finally gets to the class RayShape. Should this not happen somewhere in urdf2gazebo.cpp?

Thanks for your help

Asked by annah.do on 2013-10-08 08:47:16 UTC

Comments

Answers

Try wrapping the laser retro values inside a <gazebo> element. Also, change <laserRetro> to <laser_retro>. Your use of camel case in your URDF suggests that your using a very old version of Gazebo. Can you check that you're using a recent version (1.9 or greater is ideal).

Example laser retro:

<gazebo>
  <laser_retro>200</laser_retro>
</gazebo>

Asked by nkoenig on 2013-10-10 10:47:00 UTC

Comments

I'm using gazebo 1.0.2. (with ros fuerte). Unfortunately I'm kinda bound to that version for now :( I tried what you suggested. but it doesn't seem to make a difference. I wrapped the laser retro value inside a gazebo element and tried with both laserRetro and laser_retro. I also edited my code from above and replaced all the laserRetro with laser_retro but nothing. Do you have any other suggestions? Thx

Asked by annah.do on 2013-10-11 04:26:40 UTC