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

Revision history [back]

click to hide/show revision 1
initial version

I have two versions of src file in the package under the workspace

I understand it as both your src folder contains files with the same names and same CMakeList but only some lines of code differs between the two. That being said when you run catkin_make after swapping your folders catkin doesn't notice any change in your files (I don't really know how, probably CMake related, but if someone can enlighten me on this part) so if nothing has changed catkin won't rebuild everything as usual.

To avoid that you have two options :

  1. Delete the build and devel folder each time you change the src folder
  2. Change a little thing in a file so that catkin notice a change and rebuild the package

The best option is the first one but I would recommend for that kind of things to use a version-control tool such as GIT or SVN.