Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

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.

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)

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.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)