Gazebo | Ignition | Community
Ask Your Question
1

Laserscanner look through objects

asked 2016-06-01 18:41:36 -0500

mdingwer gravatar image

updated 2016-06-02 00:42:01 -0500

Hi,

i have also a problem with the laser scanner (lib_gazebo_ros_gpu_ray) under gazebo7, which I need for my simulation. Unlike gazebo5 the laser scanner under gazebo6 and 7 looks through the objects in the simulation.

image description

sdf file of the world:

    <?xml version="1.0"?>
    <sdf version="1.6">
      <world name="default">

    <!-- the ground plane -->
      <model name="ground_plane">
        <static>true</static>
        <link name="link">
          <collision name="collision">        
            <geometry>
              <plane>
                <normal>0 0 1</normal>
                <size>1000 1000</size>
          </plane>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>100</mu>
              <mu2>50</mu2>
            </ode>
          </friction>
        </surface>
      </collision>
      <visual name="visual">
        <geometry>
          <empty></empty>
        </geometry>
        <plugin name="GroundPlugin" filename="libGroundPlugin.so">  //Create the ground visual in the plugin
      <MapFolder>example</MapFolder>
        </plugin>
      </visual>
    </link>
  </model>


<!-- the sky -->
    <scene>
       <background>0.5 0.8 1.0 1.0</background>
       <sky></sky>
    </scene>    

<!-- the sun -->
    <include>
      <uri>model://sun</uri>
    </include>  

  </world>
</sdf>

I add the robot separately in the world. The importent part sensor part for the robot:

  <!-- hokuyo -->
  <gazebo reference="laser">
    <sensor type="gpu_ray" name="head_hokuyo_sensor">
      <pose>0 0 0 0 0 0</pose>
      <visualize>true</visualize>
      <update_rate>40</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>1000</samples>
            <resolution>1</resolution>
            <min_angle>-0.7854</min_angle>
            <max_angle>0.7854</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.01</min>
          <max>10.0</max>
          <resolution>0.1</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <!-- Noise parameters based on published spec for Hokuyo laser
               achieving "+-30mm" accuracy at range < 10m.  A mean of 0.0m and
               stddev of 0.01m will put 99.7% of samples within 0.03m of the true
               reading. -->
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_laser" filename="libgazebo_ros_gpu_laser.so">
        <topicName>scan</topicName>
        <frameName>laser</frameName>
      </plugin>
    </sensor>
  </gazebo>

Has someone a solution for this problem?

thank you.

edit: I think that I will wait for the fix (in a few weeks).

edit retag flag offensive close merge delete

Comments

The sdf you gave cannot be the same one that you have a picture of. There is no robot in the sdf you posted. Please provide the sdf for the robot as well, so we can try to help

Peter Mitrano gravatar imagePeter Mitrano ( 2016-06-01 18:54:44 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-06-01 23:45:46 -0500

chapulina gravatar image

This is probably due to this issue.

There's an open pull request to fix it.

edit flag offensive delete link more
0

answered 2018-01-29 02:40:13 -0500

BattleCroissant gravatar image

Hi, I have the opposite problem, i want the laser to look through certain objets, is there a way to do it on pourposse?

edit flag offensive delete link more

Comments

1

I'd ask this as a new question. more likely to be answered

Peter Mitrano gravatar imagePeter Mitrano ( 2018-01-29 20:23:30 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-06-01 18:41:36 -0500

Seen: 3,320 times

Last updated: Jan 29 '18