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

Adding a dependency after roscreate-pkg

asked 2011-02-23 07:19:39 -0500

Murph gravatar image

If I use roscreate-pkg to create my package, but then later decide to add another dependency (in this case, rospy), is there a simple way to get things setup correctly? Or do I now have to do those steps by hand?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
9

answered 2011-02-23 07:27:38 -0500

Eric Perko gravatar image

In order to add a new dependency to an existing package, just edit the package's manifest.xml file.

You'll have to add a line like <depend package="package_name" />.

For example, to add a dependency to rospy, you would add the line <depend package="rospy" />.

edit flag offensive delete link more

Comments

According to: http://www.ros.org/wiki/roscreate "For common dependencies like roscpp and rospy, roscreate-pkg may create some additional common directory structures." - Do I need to create these?
Murph gravatar image Murph  ( 2011-02-24 02:06:43 -0500 )edit
Those directory structures are for convenience, e.g. 'src', 'include'. They are not required.
kwc gravatar image kwc  ( 2011-02-24 02:47:01 -0500 )edit

So, e.g. rosdep is useless here?!

nbro gravatar image nbro  ( 2018-04-07 19:02:20 -0500 )edit

There is no need to change the file "CMakeLists.txt"? (adding the new dependency to the find_package()?

morann gravatar image morann  ( 2018-08-19 04:38:19 -0500 )edit
2

@morann: note the date of the answer: 2011. Things have changed since then, and rosmake worked differently from how Catkin works.

Please refer to the catkin documentation for up-to-date information.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-19 04:58:43 -0500 )edit
1

@gvdhoorn Your link doesn't directly answer the question, though. Could you write a new answer?

tsbertalan gravatar image tsbertalan  ( 2019-02-25 09:32:55 -0500 )edit

I would say it actually does: see C++ catkin library dependencies fi, and all the other pages.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-25 09:36:35 -0500 )edit
1

@gvdhoorn "See all the pages in the documentation" is not an answer (and I suppose you didn't try to make it one). Yes, OP could look through the documentation, and your link is helpful for that; thanks. But if the tl;dr is "there's no easy tool, so add to CMakeLists.txt and package.xml", say so!

tsbertalan gravatar image tsbertalan  ( 2019-02-25 22:51:28 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2011-02-23 07:19:39 -0500

Seen: 16,275 times

Last updated: Feb 23 '11