ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

We want to use the custom messages defined in different package and we don't understand what will be the "your_program" part in the line we have to add in CMakeList.txt

asked 2022-11-22 10:10:01 -0500

gc gravatar image

updated 2022-11-22 16:15:14 -0500

We have a package named "ros_openpose" which contains a custom message "Frame.msg" that we want to use in another package "trans_ft" of the same workspace (catkin_ws)

ROS Tutorials suggest that we have to add to the following line in CMakeList.txt in trans_ft

add_dependencies(your_program ${catkin_EXPORTED_TARGETS})

Can some one please confirm what will be "your_program" part in our case?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-23 16:44:06 -0500

ct2034 gravatar image

updated 2022-11-23 16:56:33 -0500

You would need this line only if you want to use that message in a part of ros_openpose. For example if you had a binary called your_program (in that same package) that needs this custom message.

If you want to use it in trans_ft it is sufficient to have ros_openpose as a dependency.

edit flag offensive delete link more

Comments

What do you mean by the last line. can you please elaborate it?

gc gravatar image gc  ( 2022-11-24 03:53:56 -0500 )edit

In the CMakeLists.txt of your package trans_ft, is a line that looks something like this find_package(catkin REQUIRED COMPONENTS roscpp std_msgs) and you add there ros_openpose and it looks like: find_package(catkin REQUIRED COMPONENTS roscpp std_msgs ros_openpose)

ct2034 gravatar image ct2034  ( 2022-11-24 03:57:28 -0500 )edit

Thank you for the reply but the following link mentions that we might get an error by doing that.

https://answers.ros.org/question/2062...

We are absolute beginners in ROS and we are just confused by these contrasting answers.

gc gravatar image gc  ( 2022-11-24 04:15:08 -0500 )edit

What error do you get?

ct2034 gravatar image ct2034  ( 2022-11-24 08:57:54 -0500 )edit

Question Tools

Stats

Asked: 2022-11-22 10:05:55 -0500

Seen: 48 times

Last updated: Nov 23 '22