Robotics StackExchange | Archived questions

Project onto textured DAE model?

Is it possible to project an image onto a textured DAE model? In the image you can see that the white projecting sphere projects the caustic pattern onto the red gazebo primitive sphere and the ground_plane sdf but not onto my imported DAE model. Any insight as to why this is? image description

Here is the code used to make the projector:

<model name="projector_model">
  <pose>0 0 1 0.0 0.0 0</pose>
  <link name="projector_link">
    <pose>0 0 0 0.0 0.0 0.0</pose>
    <collision name="collision">
      <geometry>
        <sphere>
          <radius>0.1</radius>
        </sphere>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <sphere>
          <radius>0.1</radius>
        </sphere>
      </geometry>
      <material>
        <script>Gazebo/Grey</script>
      </material>
    </visual>
    <projector name="texture_projector">
      <pose>0 0 0 0 0 0</pose>
      <texture>Caustics.png</texture>
      <fov>10</fov>
      <near_clip>0.1</near_clip>
      <far_clip>1000</far_clip>
    </projector>
  </link>
  <static>true</static>
</model>

Then everything in spawned in this launch file:

<arg name="gui" default="true" />

<!-- start gazebo server-->
<node name="gazebo" pkg="gazebo_ros" type="gzserver" respawn="false"
args="$(find sub8_gazebo)/worlds/gripper.world" output="screen"></node>
<node name="gazebo_gui" pkg="gazebo_ros" type="gzclient" respawn="false" if="$(arg gui)" />


<node
  name="spawn_sub" pkg="gazebo_ros" type="spawn_model"
  args="-file $(find sub8_gazebo)/models/torpedo_board/torpedo_board.sdf -sdf
    -x 1 -y 1 -z .5 -model sub8"
  output="screen" />
<!-- Buoys -->
<node
  name="spawn_buoy_red" pkg="gazebo_ros" type="spawn_model"
  args="-file $(find sub8_gazebo)/models/buoys/red.sdf -sdf
    -x 0 -y 0 -z 0.5 -model red"
  output="screen" />

Asked by mattlangford on 2016-05-21 01:28:49 UTC

Comments

Answers