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

catkin rename package script - Implementation, Usefulness, Others?

asked 2014-04-01 01:09:03 -0600

eacousineau gravatar image

I've implemented a quick script to rename catkin packages (details in the README).

Does this script seem useful enough to incorporate into any core packages? Does anyone have any other existing solutions out there?

edit retag flag offensive close merge delete

Comments

The big problem with renaming a package is fixing all the references in other packages that depend on it. That is why it is best to think carefully about the name when starting out.

joq gravatar image joq  ( 2014-04-01 04:09:20 -0600 )edit
1

In general you might want to use ${PROJECT_NAME} as much as possible in your CMake code. Then you have only two line where the package name is mentioned: in the package.xml as well as the project() in CMake.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-04-01 05:49:01 -0600 )edit

@joq - Yeah, this definitely should not be used to change a package name at a whim, but it helps for an inexperienced / rushed developer (e.g. a grad student :P) who prototyped a package for internal use and wants to then distribute it with a less ambiguous name at a later date. In addition, the script is built to fix the name references in other packages - depends tags, catkin dependencies, header files, include directories, etc.

eacousineau gravatar image eacousineau  ( 2014-04-01 12:32:30 -0600 )edit

@Dirk Thomas - Will do, thanks! I looked at [templates/CMakeLists.txt.in](https://github.com/ros-infrastructure/catkin_pkg/blob/master/src/catkin_pkg/templates/CMakeLists.txt.in), and it seems like `@{name}` is used in place of `${PROJECT_NAME}`. Would it be worthwhile to change that?

eacousineau gravatar image eacousineau  ( 2014-04-02 09:00:35 -0600 )edit

The referenced template already uses ${PROJECT_NAME} all over the place. So I don't think anything needs to be changed there.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-04-02 09:50:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2014-04-01 01:27:14 -0600

makokal gravatar image

Looks quite neat, maybe you want to send a message to ros-users mailing list with this.

edit flag offensive delete link more

Comments

Cool, will do. Thanks for the suggestion!

eacousineau gravatar image eacousineau  ( 2014-04-01 02:39:52 -0600 )edit

Question Tools

Stats

Asked: 2014-04-01 01:09:03 -0600

Seen: 2,181 times

Last updated: Apr 01 '14