Colcon build not updating code in ros2_workspace/install

asked 2022-08-08 10:03:04 -0600

gustav gravatar image

Hi all

I'm working in a ros2_workspace with two packages, interface_package and line_ros2. The code I write in line_ros2 does not change the executables in install/line_ros2/lib/python3.6/site-packages/line_ros2/ after I run colcon build. It has worked on and off today and appear out of nowhere. If I change the code in install/line_ros2/lib/python3.6/site-packages/line_ros2/ and run the scripts via ros2 run, it does change but the moment I run colcon build again, the changes dissapear to the old version.

Here are the "logs":

Finished <<< interface_package [1.44s]
Starting >>> line_ros2
--- output: line_ros2
running egg_info
writing ../../build/line_ros2/line_ros2.egg-info/PKG-INFO
writing dependency_links to ../../build/line_ros2/line_ros2.egg-info/dependency_links.txt
writing entry points to ../../build/line_ros2/line_ros2.egg-info/entry_points.txt
writing requirements to ../../build/line_ros2/line_ros2.egg-info/requires.txt
writing top-level names to ../../build/line_ros2/line_ros2.egg-info/top_level.txt
reading manifest file '../../build/line_ros2/line_ros2.egg-info/SOURCES.txt'
writing manifest file '../../build/line_ros2/line_ros2.egg-info/SOURCES.txt'
running build
running build_py
running install
running install_lib
byte-compiling /root/ros2_workspace/install/line_ros2/lib/python3.6/site-packages/line_ros2/ to eQART_main_function.cpython-36.pyc
running install_data
running install_egg_info
removing '/root/ros2_workspace/install/line_ros2/lib/python3.6/site-packages/line_ros2-0.0.0-py3.6.egg-info' (and everything under it)
Copying ../../build/line_ros2/line_ros2.egg-info to /root/ros2_workspace/install/line_ros2/lib/python3.6/site-packages/line_ros2-0.0.0-py3.6.egg-info
running install_scripts
Installing main_node script to /root/ros2_workspace/install/line_ros2/lib/line_ros2
Installing motor_control_node script to /root/ros2_workspace/install/line_ros2/lib/line_ros2
writing list of installed files to '/root/ros2_workspace/build/line_ros2/install.log'
Finished <<< line_ros2 [5.09s]

Summary: 2 packages finished [7.44s]

The logs from interface_package is not interesting since there are no problems with it.

Do you know what might cause this issue?

Thanks in advance!

edit retag flag offensive close merge delete


please provide exact command your running to buil

Fetullah Atas gravatar image Fetullah Atas  ( 2022-08-09 03:22:24 -0600 )edit

I suspect you are not adding --symlink-install argument. Try it with colcon build --symlink-install

Fetullah Atas gravatar image Fetullah Atas  ( 2022-08-09 03:23:24 -0600 )edit