ADD Light or LED Plugin - OSRF -subt_gazebo pkg

asked 2020-02-01 10:22:23 -0500

Vini71 gravatar image

updated 2020-02-02 10:54:36 -0500

gvdhoorn gravatar image

I was trying to add light or led to my robot. To be honest I found this website https://bitbucket.org/osrf/gazebo/pul... very complex, because it is all in C++ (My limitation), and I am working using Python. So I have searched deeply and found an “easier” tutorial here from Open source Robotics Foundation: https://bitbucket.org/osrf/subt/wiki/...

I was really excited to do that. However the topic “light” does not appear. This is because, on the beginning of Tutorial, they say that it is mandatory to have as a dependency the subt_gazebo pkg.

And then I downloaded and compiled this pkg from source, considering that it is not possible with Sudo apt-get (it is not provided). Ok this Package is very huge, and I am having a dependency issue, which I could not solve alone because I did not find any pkg to compile. I have downloaded all the OSRF repository https://bitbucket.org/osrf/gazebo/dow... However, I did not find a pkg written specifically "subt_gazebo" inside it. Yet I've compiled this repository from source and had the following error:

**-- ==> add_subdirectory(osrf-subt-287b0d89556f/subt_msgs)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- subt_msgs: 0 messages, 6 services
-- +++ processing catkin package: 'subt_rf_interface'
-- ==> add_subdirectory(osrf-subt-287b0d89556f/subt-communication/subt_rf_interface)
CMake Error at osrf-subt-287b0d89556f/subt-communication/subt_rf_interface/CMakeLists.txt:19 (find_package):
  By not providing "Findignition-math6.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ignition-math6", but CMake did not find one.

  Could not find a package configuration file provided by "ignition-math6"
  with any of the following names:

    ignition-math6Config.cmake
    ignition-math6-config.cmake

  Add the installation prefix of "ignition-math6" to CMAKE_PREFIX_PATH or set
  "ignition-math6_DIR" to a directory containing one of the above files.  If
  "ignition-math6" provides a separate development package or SDK, be sure it
  has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/marcus/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/marcus/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
**

So what is this error about? how to solve it? Because without solving this issue I think I cannot run the plugin

What path should I follow in order to be able to add light to my URDF?

obs: After adding the following snippet of code (plugin) to my urdf and adjust it to it, the Gazebo did not open the scenario anymore, instead the URDF keep correctly being produced by using the tool “check_urdf”

<! -- Led Plugin -->

<gazebo>
  <model name='light_model'>
    <pose>0 0 0.5 0 0 0</pose>
    <link name='light_link'>
      <visual name='light_source'>
        <pose>0 0 0 0 0 0</pose>
        <geometry>
          <sphere>
            <radius>0.025</radius>
          </sphere>
        </geometry>
        <material>
          <ambient>1 1 1 1</ambient>
          <diffuse>1 1 1 1</diffuse>
          <specular>1 1 1 1</specular>
          <emissive>0 0 0 1</emissive>
        </material>
      </visual>
      <light name='light_source' type='point'>
        <pose>0 0 0 0 0 0</pose>
        <attenuation>
          <range>0.20</range>
          <linear>0.10</linear>
        </attenuation>
        <diffuse>0 0 0 1</diffuse>
        <specular>0 ...
(more)
edit retag flag offensive close merge delete

Comments

I was trying to add light or led to my robot. To be honest I found this website https://bitbucket.org/osrf/gazebo/pul... very complex, because it is all in C++ (My limitation), and I am working using Python.

The MR you link to was merged almost 3 years ago (2017) and that functionality was included in Gazebo 7.x. Afaict, you should not need to build anything from source to use the AttachLightPlugin plugin.

You may want to ask this on the answers.gazebosim.org site.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-02 10:57:58 -0500 )edit