ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I was able to successfully change the name of my ROS/Catkin package from "PackageA" to "PackageB" by changing the following:
/workspace/src/<package_name>
/workspace/src/<package_name>/include/<package_name>
/workspace/src/<package_name>
:CMakeCache.txt
CMakeLists.txt
CMakeLists.txt.user
package.xml
main.cpp
has anything like #include <PackageA/my_custom_header.h>
then you obviously need to replace this too.Depending on your specific build environment, there may or may not be additional files with instances of "PackageA" that you need to change. But everything above should be at least the bare minimum that you have to change. After I change all of the above, I was able to run catkin_make
and everything recompiled as if "PackageB" had been it's name all along.
As jilo and Martin Gunther already stated, running rospack profile
enables roscd
to handle the name change.
FYI: I would be very careful copy-pasting any packages, since I'd had problems with this before. Depending on your environment and what you're compiling, you make get cmake errors complaining about trying to link libraries to files that already existing in other packages.
2 | No.2 Revision |
I was able to successfully change the name of my ROS/Catkin package from "PackageA" to "PackageB" by changing the following:
/workspace/src/<package_name>
/workspace/src/<package_name>/include/<package_name>
/workspace/src/<package_name>
CMakeCache.txt
CMakeLists.txt
CMakeLists.txt.user
package.xml
main.cpp
has anything like #include <PackageA/my_custom_header.h>
then you obviously need to replace this too.Depending on your specific build environment, there may or may not be additional files with instances of "PackageA" that you need to change. But everything above should be at least the bare minimum that you have to change. After I change all of the above, I was able to run catkin_make
and everything recompiled as if "PackageB" had been it's name all along.
As jilo and Martin Gunther already stated, running rospack profile
enables roscd
to handle the name change.
FYI: I would be very careful copy-pasting any packages, since I'd had problems with this before. Depending on your environment and what you're compiling, you make get cmake errors complaining about trying to link libraries to files that already existing in other packages.
3 | No.3 Revision |
I was able to successfully change the name of my ROS/Catkin package from "PackageA" to "PackageB" by changing the following:
/workspace/src/<package_name>/workspace/src/PackageA
/workspace/src/<package_name>/include/<package_name>/workspace/src/PackageA/include/PackageA
/workspace/src/<package_name>/workspace/src/PackageA
:
CMakeCache.txt
CMakeLists.txt
CMakeLists.txt.user
package.xml
main.cpp
has anything like #include <PackageA/my_custom_header.h>
then you obviously need to replace this too.Depending on your specific build environment, there may or may not be additional files with instances of "PackageA" that you need to change. But everything above should be at least the bare minimum that you have to change. After I change all of the above, I was able to run catkin_make
and everything recompiled as if "PackageB" had been it's name all along.
As jilo and Martin Gunther already stated, running rospack profile
enables roscd
to handle the name change.
FYI: I would be very careful copy-pasting any packages, since I'd had problems with this before. Depending on your environment and what you're compiling, you make get cmake errors complaining about trying to link libraries to files that already existing in other packages.
4 | No.4 Revision |
I was able to successfully change the name of my ROS/Catkin package from "PackageA" to "PackageB" by changing the following:
/workspace/src/PackageA
/workspace/src/PackageA/include/PackageA
/workspace/src/PackageA
:
CMakeCache.txt
CMakeLists.txt
CMakeLists.txt.user
package.xml
main.cpp
has anything like #include <PackageA/my_custom_header.h>
then you obviously need to replace this too.Depending on your specific build environment, there may or may not be additional files with instances of "PackageA" that you need to change. But everything above should be at least the bare minimum that you have to change. After I change all of the above, I was able to run catkin_make
and everything recompiled as if "PackageB" had been it's name all along.
As jilo and Martin Gunther already stated, running rospack profile
enables roscd
to handle the name change.
FYI: I would be very careful copy-pasting any packages, since I'd had problems with this before. Depending on your environment and what you're compiling, you make get cmake errors complaining about trying to link libraries to files that already existing in other packages.