Robotics StackExchange | Archived questions

Actors not seen by LIDAR sensors

I am having an issue getting some LIDAR sensors to detect actors in a world file. I am trying to use a TIM5661 in simulation to sense a moving actor, but the sensor is completely unable to sense the actor. I can see the actor moving around in Gazebo, but the sensed data from the lidar doesn't see the actor at all.

Here's the world file that I am using:

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

<include>
  <uri>model://sun</uri>
</include>
<include>
  <uri>model://ground_plane</uri>
</include>
<include>
  <uri>model://bookshelf</uri>
  <name>bs</name>
  <pose>2 2 0 0 0 0</pose>
</include>
<actor name="actor">
  <skin>
    <filename>walk.dae</filename>
  </skin>
  <animation name="walking">
    <filename>walk.dae</filename>
    <interpolate_x>true</interpolate_x>
  </animation>
  <script>
    <trajectory id="0" type="walking">
      <waypoint>
        <time>0</time>
        <pose>0 2 0 0 0 -1.57</pose>
      </waypoint>
      <waypoint>
        <time>2</time>
        <pose>0 -2 0 0 0 -1.57</pose>
      </waypoint>
      <waypoint>
        <time>2.5</time>
        <pose>0 -2 0 0 0 1.57</pose>
      </waypoint>
      <waypoint>
        <time>7</time>
        <pose>0 2 0 0 0 1.57</pose>
      </waypoint>
      <waypoint>
        <time>7.5</time>
        <pose>0 2 0 0 0 -1.57</pose>
      </waypoint>
    </trajectory>
  </script>
</actor>
</world>
</sdf>

I am launching the world with a call to gazeboros/emptyworld.launch. I also launch state publishers to visualize the data:

<launch>

<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>

 <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
 <include file="$(find gazebo_ros)/launch/empty_world.launch">
   <arg name="world_name" value="$(find adm_gazebo)/worlds/simple_test.world"/>
   <!-- more default parameters can be changed here -->
   <arg name="debug" value="$(arg debug)" />
   <arg name="gui" value="$(arg gui)" />
   <arg name="paused" value="$(arg paused)"/>
   <arg name="use_sim_time" value="$(arg use_sim_time)"/>
   <arg name="headless" value="$(arg headless)"/>
</include>

<param name="robot_description" textfile="$(find adm_gazebo)/worlds/simple_test.urdf" />
<param name="k5_adm_description" textfile="$(find adm_gazebo)/worlds/simple_test.urdf" />

<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
   <param name="use_gui" value="False"/>
</node>


</launch>

Finally, my model urdf is here:

<?xml version="1.0" ?>
<robot name="simple_test">
<link name="base_link">
    <visual>
        <geometry>
            <cylinder length="1.5" radius="0.01"/>
        </geometry>
        <material name="black"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="1.5" radius="0.01"/>
      </geometry>
    </collision>
    <inertial>
      <origin rpy="0 0 0" xyz="0.000000 0.000000 0.000000"/>
      <mass value="5"/>
      <inertia ixx=".03" ixy="-.01" ixz="-.01" iyy=".03" iyz="0.01" izz=".1"/>
    </inertial>
  </link>
    <!-- bottom-->
  <gazebo reference="base_link">
    <sensor type="ray" name="bottom_lidar_sick_tim_551">
      <pose>0 0 0 0 0 0</pose>
      <visualize>false</visualize>
      <update_rate>15</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>270</samples>
            <resolution>1</resolution>
            <min_angle>-2.35619449019</min_angle>
            <max_angle>2.35619449019</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.05</min>
          <max>10.0</max>
          <resolution>0.06</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <!-- Noise parameters based on published spec for sick tim 551
               achieving "+-20mm" accuracy at range < 10m.  A mean of 0.0m and
               stddev of 0.00666m will put 99.7% of samples within 0.02m of the true
               reading (3 sigma value). -->
          <mean>0.0</mean>
          <stddev>0.00666</stddev>
        </noise>
      </ray>
      <plugin name="bottom_lidar_sick_tim_551_controller" filename="libgazebo_ros_laser.so">
        <topicName>/scan</topicName>
        <frameName>base_link</frameName>
      </plugin>
    </sensor>
  </gazebo>

</robot>

Finally, I add the robot to the simulation with a spawn_model node:

rosrun gazebo_ros spawn_model -file simple_test.urdf -x -2 -urdf -model test

When I visualize the /scan topic, I can clearly see a bookshelf that is static in the world, but the actor is not visible at all. Any ideas? For reference, here's a few screenshots of gazebo and rviz: image description image description

Asked by mwc on 2018-07-13 18:41:03 UTC

Comments

Answers

Try changing

<sensor type="ray"

to

<sensor type="gpu_ray"

Asked by chapulina on 2018-07-17 11:16:00 UTC

Comments

Unfortunately, this does not work for me. I have tried using the gpu_ray plugin, but my machine does not have a dedicated GPU, so this plugin does not report accurate range data. I will try to find a computer with a GPU to test if this fixes my issue.

Asked by mwc on 2018-07-30 12:08:57 UTC

Yes, you'll need a computer with a good GPU. The non-gpu ray plugin will not be able to see the actors because they work within physics, but the actors are within rendering.

Asked by chapulina on 2018-07-30 12:15:56 UTC

Ah, that makes a lot of sense now. Thanks for the help!

Is there any possible way to get actors to use the physics engine so that the default ray plugin may be used?

Asked by mwc on 2018-07-30 15:54:34 UTC

You could try using this plugin which adds collisions to the actor, but the sensor will see boxes instead of the actor's actual shape: https://bitbucket.org/osrf/gazebo/pull-requests/2875/example-plugin-that-enables-collisions/diff#comment-55984848

Asked by chapulina on 2018-07-30 16:35:08 UTC

OK, I'll give that a shot! Thanks for the advice!

Asked by mwc on 2018-07-31 13:18:17 UTC