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

Is there a way to list automatically the dependencies of my ROS package

asked 2018-09-18 07:24:26 -0500

Hug gravatar image

updated 2018-09-18 07:24:57 -0500

Hello everyone,

I noticed that I'm able to run my Python nodes even if I didn't report the dependencies properly in CMakeLists.txt and package.xml. Many things work simply because all the required ROS packages are installed on my computer. Now assume I want to distribute my package, how to make sure that I didn't miss any dependency? Is there an automatic way to do that?

edit retag flag offensive close merge delete

Comments

I noticed that I'm able to run my Python nodes even if I didn't report the dependencies properly in CMakeLists.txt [..]

For Python nodes, which are not compiled, there are (normally) no build dependencies, so CMakeLists.txt is not involved in those cases.

Python pkgs only have run depends.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-18 16:13:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-09-18 07:29:23 -0500

mgruhler gravatar image

updated 2018-09-18 07:30:41 -0500

There are two tools that can actually help you with this.

roscompile by @David Lu figures out many issue, also missing dependencies. To quote the ReadMe:

  • Checks for dependencies by looking in the source code, message, service, action and launch files.
  • Inserts build/run/test dependencies into your package.xml
  • Inserts dependencies into your CMakeLists.txt (in both the find_package and catkin_package commands)
  • Sorts lists of dependencies (in both package.xml/CMakeLists.txt)

Also catkin_lint helps in setting the CMakeLists.txt and package.xml up correctly. The combination of both tools is pretty powerful. But you should still but some thought into what is going on...

edit flag offensive delete link more

Comments

1
David Lu gravatar image David Lu  ( 2018-09-18 07:46:26 -0500 )edit

"Approved" :-D

mgruhler gravatar image mgruhler  ( 2018-09-18 07:58:29 -0500 )edit

Wow, approved by the author... Thanks, that looks handy.

Hug gravatar image Hug  ( 2018-09-18 08:19:31 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-09-18 07:24:26 -0500

Seen: 358 times

Last updated: Sep 18 '18