catkin rename package script - Implementation, Usefulness, Others?
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?
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.
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.
@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.
@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?
The referenced template already uses ${PROJECT_NAME} all over the place. So I don't think anything needs to be changed there.