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

How to rename existing package?

asked 2012-01-11 00:22:48 -0600

sam gravatar image

updated 2012-01-11 01:40:13 -0600

dornhege gravatar image

I don't want to use mv and vim to change each file manually.

How to do that?

Thank you~

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-01-11 01:19:50 -0600

dornhege gravatar image

Simply said: AFAIK there is no other way, at least no easy way.

At least no ROS-way. You can obviously use tools like sed, vim's regexp search/replace. It is usually not that much work in the package itself.

The uglier problems arise from all other packages that use the package and refer to the name. You will need to change all those, e.g. depends lines, $find lines in launch files, etc.

edit flag offensive delete link more

Comments

Agreed. It is best to pick a good package name to begin with, see http://answers.ros.org/question/2801/when-should-i-split-my-code-into-multiple-packages
joq gravatar image joq  ( 2012-01-11 02:36:46 -0600 )edit
Is there any tool possible for it in the future? Thank you~
sam gravatar image sam  ( 2012-01-12 23:33:23 -0600 )edit
I'm quite sure: No. There could be a tool to rename the package's manifest, etc., within the package, but there are just too many places for the package name. E.g. in any documentation, or any source file in any package, or any yaml or launch file in any package might be references to the package.
dornhege gravatar image dornhege  ( 2012-01-13 01:55:13 -0600 )edit

Question Tools

Stats

Asked: 2012-01-11 00:22:48 -0600

Seen: 3,338 times

Last updated: Jan 11 '12