Robotics StackExchange | Archived questions

Unable to add flash light plugin in xacro

Hello,

I read through some previous answers to try to resolve this issue I am having. Namely, I read through and tried to implement:

https://answers.ros.org/question/340018/add-flash-light-plugin-on-urdf/ https://answers.ros.org/question/348772/failed-to-add-flash-plugin-in-xacro-file/

I am dealing with a xacro file and as in the answer above, I added the follow snippet in my xacro file:

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

However, I am getting the following error: "[Err] [Scene.cc:3069] Light [uuvtest::uuvtest/base_link::light] already exists. Use topic ~/light/modify to modify it."

There is no topic /light/modify and when the sim is launched it doesn't appear in the models with the base link.

Is there something else I am missing? Like something I am supposed to download to access that libFlashLightPlugin.so file or something along those lines?

Asked by what_what_hbar on 2023-07-21 14:30:04 UTC

Comments

Answers