Closed tonynajjar closed 2 years ago
Have you tried rosdep install
?
I think the dependency should be automatically found by ament_auto_find_build_dependencies()
.
Good you mention it, you are right, it works with rosdep install. But I have another setup where I need to build both packages (can_msgs and ros2_socketcan) from source and this fails, feel free to give it a try
@tonynajjar Do you mean like this? I had no error. :thinking:
$ mkdir /tmp/ws
$ cd /tmp/ws
$ git clone git@github.com:ros-industrial/ros_canopen.git -b dashing-devel
$ git clone git@github.com:autowarefoundation/ros2_socketcan.git
$ docker run --rm -it -v /tmp/ws:/ws ros:galactic
$ cd /ws
$ rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_DISTRO
#All required rosdeps installed successfully
$ colcon build
Starting >>> can_msgs
Finished <<< can_msgs [2.89s]
Starting >>> ros2_socketcan
Finished <<< ros2_socketcan [9.67s]
Summary: 2 packages finished [12.7s]
Can you make sure that ros-ROS_DISTRO-can-msgs is not installed? (e.g sudo apt remove ros-galactic-can-msgs)
Ah I just noticed that you ran rosdep, so can_msgs is certainly installed. I am on a setup where I can not run rosdep and install dependencies with apt. I need to build everything from source -> This should still work theoretically
I've tested with Docker, and no package was installed by rosdep install
, so I believe ros-galactic-can-msgs
isn't installed.
Could you create an issue and show me the steps to reproduce your problem?
(I'm not a maintainer, but) Otherwise, I believe this PR won't be accepted.
I can't seem to reproduce anymore :facepalm: I'll close this for now, I'll work on it later and if I can reproduce I will provide steps. Thanks for your support @kenji-miyake
Without this, building the package fails with error:
I'm on Galactic, Ubuntu 20