Add flash light plugin on URDF [closed]

asked 2019-12-16 07:52:32 -0600

Hello,

I am doing a simulator for a submarine with uuv simulator with URDF file format.

I tried to use to plugin flash light on my code, but it seems the plugin is not imported .. !

I have no error, my code :

 <!-- Vehicle macro -->
  <xacro:macro name="submarine_base" params="namespace *gazebo">

      <link name="${namespace}/base_link">

        <inertia ixx="0.6" ixy="0" ixz="0"
                 iyy="30.0" iyz="0"
                 izz="35.0" />
        </inertial>

        <visual>
          <origin xyz="0 0 0" rpy="0 0 0"/>
          <geometry>
            <mesh filename="${visual_mesh_file}" scale="1 1 1" />
          </geometry>
        </visual>

        <collision>
          <origin xyz="0 0 0" rpy="0 0 0"/>
          <geometry>
            <mesh filename="${collision_mesh_file}" scale="1 1 1" />
          </geometry>
        </collision>
        <light>
            <id>cylinder/light_source1</id>
            <duration>0.5</duration>
            <interval>0.5</interval>
        </light>
      </link>

    <gazebo reference="${namespace}/base_link">
      <plugin name='light_control' filename='libFlashLightPlugin.so'>
          <enable>true</enable>
          <light>
            <id>cylinder/light_source1</id>
            <duration>0.5</duration>
            <interval>0.5</interval>
          </light>
       </plugin>
      <selfCollide>false</selfCollide>
    </gazebo>

    ....

  </xacro:macro>

</robot>

I have tried to put a light instance into the link and into the <gazebo>, but nothing to do ... What did I do wrong ?

Thank you very much !

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by TheGreatLebowski
close date 2019-12-17 09:12:34.476363

Comments

Have you tried this? Going off of the tag names I see in this tutorial:

<gazebo reference="${namespace}/base_link">
<light name='cylinder/light_source1' type='spot'>
</light>
  <plugin name='light_control' filename='libFlashLightPlugin.so'>
      <enable>true</enable>
      <light>
        <id>cylinder/light_source1</id>
        <duration>0.5</duration>
        <interval>0.5</interval>
      </light>
   </plugin>
  <selfCollide>false</selfCollide>
</gazebo>
johnconn gravatar imagejohnconn ( 2019-12-16 23:44:37 -0600 )edit

It works perfectly ! Thank you very much for your help !

TheGreatLebowski gravatar imageTheGreatLebowski ( 2019-12-17 05:58:34 -0600 )edit

I'm glad that worked. Make sure to close the question if you're all set!

johnconn gravatar imagejohnconn ( 2019-12-17 09:10:57 -0600 )edit