How to connect external code with a Gazebo Plugin using catkin_make?

asked 2021-12-30 18:55:33 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am trying to build a Gazebo Plugin that will set the position of an object with SetWorldPose() but i want to get the Position Coordinates from another Program which i build with the Simulink Code Generator which works fine on its own. I am using VS Code and have gazebo-11.

My problem is that the catkin_make Compiler will not compile the Simulink Code as it doesnt recognise the includes from the Simulink Code but the g++ Compiler doesn't recognise the Gazebo Libraries. So i have two Prgroamms (Simulink Code and Gazebo Plugin) that i cannot compile together.

I just want the output from my Simulink Prgram to act as an input Paramet for the SetWorldPose() functon in my Gazebo Plugin. Is there a better way to make this work?

edit retag flag offensive close merge delete


As a potential alternative to using Simulink code generation, have you taken a look at MathWorks' Simulink Gazebo Co-Simulation plugin? If not a direct solution, perhaps it could still be interesting to look at the source code

shonigmann gravatar imageshonigmann ( 2022-01-06 11:24:53 -0600 )edit