Gazebo | Ignition | Community
Ask Your Question

Set intensity for an object so gazebo_ros_laser will notice

asked 2013-10-08 08:47:16 -0600 gravatar image

updated 2013-10-10 10:43:35 -0600

nkoenig gravatar image

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">
      <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" />
      <origin xyz="5 5 2"/>
        <box size="1 1 2" />
      <material name="Cyan">
    <color rgba="0 1.0 1.0 1.0"/>
      <origin xyz="5 5 2"/>
        <box size="1 1 2" />
 <gazebo reference="test_reflector">

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-10 10:47:00 -0600

nkoenig gravatar image

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:

edit flag offensive delete link more


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 laserretro. I also edited my code from above and replaced all the laserRetro with laserretro but nothing. Do you have any other suggestions? Thx gravatar ( 2013-10-11 04:26:40 -0600 )edit

Question Tools

1 follower


Asked: 2013-10-08 08:47:16 -0600

Seen: 3,689 times

Last updated: Oct 10 '13