How to load a texture image of projector plugin

asked 2020-10-21 22:02:32 -0600

mm2020 gravatar image

Hello, gazebo answer.

I have been developing a robot with a projector. So I am using a projector simulation in GAZEBO. But I have a problem that it doesn’t work textureTopicNames.

I tried to change the texture image with the following command.

$ rostopic pub /ubiquitous_display/texture std_ms/String "data: 'pop_gazebo.png'"

However, the projected image by the projector does not change from the initially set “test.png”.

Is there a way to solve this problem?

  <gazebo reference="projector_gazebo_optical_frame">
    <projector name="ud_projector">
      <pose>0 0 0 0 0 0</pose>
      <texture>test.png</texture>
      <fov>0.7</fov>
      <near_clip>0.1</near_clip>
      <far_clip>5.0</far_clip>
    </projector>
  </gazebo>
  <gazebo>
     <plugin filename="libgazebo_ros_projector.so" name="projector">
         <projector>projector_gazebo_optical_frame/ud_projector</projector>
         <alwayson>true</alwayson>
         <updaterate>10.0</updaterate>
         <texturename>test.png</texturename>
         <filtertexturename>test.png</filtertexturename>
         <texturetopicname>/ubiquitous_display/texture</texturetopicname>
         <projectortopicname>/ubiquitous_display/image</projectortopicname>
     </plugin>
  </gazebo>

using GAZEBO-9 + melodic Thank you!

edit retag flag offensive close merge delete