colcon build doesn't save the changes in the code

721 Views Asked by At

I run ros2 (jammy distribution) on ubuntu 22.04.01 (Raspberry PI 4).

Sometimes when I run colcon build (in the terminal, after I changed the code and saved it) it doesn't save the changes.

What can be the reason for this?

I tried to delete the build, log and install packages and run colcon build again. Sometimes it solves the problem and sometimes not, but even if it solves it, it's temporary, and problem comes back again.

1

There are 1 best solutions below

0
On

I was having the same problem and while looking for a solution I found this ROS question. There, one user mentions that for applying changes when building already installed packages it necessary to use the following command:

colcon build --symlink-install

The key here is the argument "--symlink-install". Later, I found this is also mentioned in the ROS2 colcon documentation.