Closed addy1997 closed 3 years ago
Hi,
I am a beginner in ignition gazebo. I have made .hh and .cc files already. I have also source installed the ign-plugin repository. Now, what are the next steps?
How do you generate the CmakeLists.txt file and the build folder?
Thanks
@FabianPG11 can you please help me with this?
Hey, Basically, the CMakeList contains instructions to generate build files based on the project's source and target files. In order to generate your plugin, you need the .hh .cc and CMakeList.txt files. For the last one, you need to define the CMake version, the name of the project and add the directories / packages (depending on your application). You can modify the CMakeList.txt yourself. Using the add_library() you specify the library to build, and with the target_link_library() command you specify which libraries an executable target links against.
Once you are done with it, do:
mkdir build/
cd build/
cmake ..
make
It should generate the .so file
then export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=your_path
/build
and on Ignition Gazebo just import it as a regular plugin:
<plugin
filename="yourlib.so"
name="ignition::gazebo::systems::name">
<arg> xyz</arg>
</plugin>
Hope it helps. You can follow the ign_plugin documentation: https://github.com/ignitionrobotics/ign-plugin
CMakeList documentation: http://wiki.ros.org/catkin/CMakeLists.txt
Also this one: Create System Plugins
Hi,
I am a beginner in ignition gazebo. I have made .hh and .cc files already. I have also source installed the ign-plugin repository. Now, what are the next steps?
How do you generate the CmakeLists.txt file and the build folder?
Thanks