How to turn my gazebo model plugin into a ROS node that listens to a topic that contains a custom message

asked 2019-10-16 09:54:53 -0600

christophecricket gravatar image

Wordy title, sorry.

I'm trying to adapt the code from this tutorial: http://gazebosim.org/tutorials?cat=gu...

I want it, instead to subscribe to a topic containing a std_msg, to subscribe to a topic containing a custom message that I defined in a separate ROS package.

I can (probably) get the c++ code to handle this correctly by looking at tutorials for subscribing to custom messages online. However, to compile this, I would need to include my ROS package containing the custom message as a dependency somehow and I'm a total CMake noob. So, to sum up, what do I need in my CMakeLists file to support what I'm trying to do, here?

edit retag flag offensive close merge delete

Comments

I should note I tried putting the following in my CMakeLists, which didn't work (beginner_tutorials is the name of the ROS package that contains the Msg info):

find_package(catkin REQUIRED COMPONENTS beginner_tutorials)
include_directories(${catkin_INCLUDE_DIRS})
christophecricket gravatar imagechristophecricket ( 2019-10-16 10:15:47 -0600 )edit