Home | Tutorials | Wiki | Issues
Ask Your Question
0

Simulating a Structured Light Sensor in Gazebo

asked 2017-06-14 15:08:26 -0600

atomoclast gravatar image

Hello,

I am in the process of working on a system that will end up using a structured light sensor similar to the one being depicted in the image below, and I was wondering what the best way to simulate this sensor in Gazebo was/if it already has been.

One idea was to take two depth camera's and AND their pointclouds together, that way if one of the cameras were obstructed or part of either's FOV was obstructed, it would cast a shadow.

Looking for input and help to ensure we have as realistic of a simulation as possible.

Thanks in advance!

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-15 13:09:23 -0600

updated 2017-06-15 13:10:52 -0600

You can use a projector to make a simulated laser line (or any 2D texture at all), and run the real structured light algorithms on them. You can make a laser line by making the non-laser parts of the image transparent, and have the laser center fade into transparency.

sdf example:

<projector name="texture_projector">
  <pose>0 0 0 0 0.77 0</pose>
  <!-- set GAZEBO_RESOURCE_PATH to point to this (have it within media/materials/textures subdir  -->
  <texture>test_pattern.png</texture>
  <!-- this works because it is in /usr/share/gazebo-1.9/media/materials/textures/ -->
  <!--texture>stereo_projection_pattern_high_res_red.png</texture-->
  <fov>0.959931088597</fov>
  <near_clip>0.1</near_clip>
  <far_clip>10</far_clip>
</projector>

This shows a png file be projected out to infinity to on a plane:

image description

I have a probably out-of-date example here with both gazebo_ros xacro/urdf and sdf examples https://github.com/lucasw/testbot (I created that to illustrate some issues I was having with projectors, I didn't hear anything and haven't tested recently to see if newer versions work better- but either way they can be used for structured light)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-06-14 15:08:26 -0600

Seen: 366 times

Last updated: Jun 15 '17