fatal error: can_msgs/msg/frame.hpp: No such file or directory
my envirment: ubuntu 20.04 ROS2 AutowareAuto release-1.0.0
error message:
Starting >>> raptordbwmsgs
--- stderr: raptorcandbcparser
In file included from /home/emgdo/AutowareAuto/src/external/neweagleraptor/raptorcandbcparser/include/raptorcandbcparser/Dbc.hpp:32,
from /home/emgdo/AutowareAuto/src/external/neweagleraptor/raptorcandbcparser/src/Dbc.cpp:29:
/home/emgdo/AutowareAuto/src/external/neweagleraptor/raptorcandbcparser/include/raptorcandbcparser/DbcMessage.hpp:32:10: fatal error: canmsgs/msg/frame.hpp: No such file or directory
32 | #include <canmsgs/msg/frame.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Asked by huhaocong on 2021-04-08 03:51:24 UTC
Answers
Hello, I have the same problem.
My setup is a Virtual Machine with the latest Ubuntu. I installed ROS2 according to this guide: https://docs.ros.org/en/foxy/Installation/Ubuntu-Development-Setup.html Except, that I did
colcon build
isntead of colcon build --symlink-install
The suggested command seperated my ros installation into two parts (/opt/ros and ~/ros_foxy)
I then downloaded the Autoware.Auto stuff according to this guide: https://autowarefoundation.gitlab.io/autoware.auto/AutowareAuto/installation-no-ade.html
Before I executed the colcon build fo Autoware.Auto I sourced the ../ros_foxy/install/setup.bash and the AutowareAuto/tools/ade_image/colcon-defaults.yaml
And after colcon build did his thing it throws the same error:
/AutowareAuto/src/external/new_eagle_raptor/can_dbc_parser/include/can_dbc_parser/DbcMessage.hpp:32:10: fatal error: can_msgs/msg/frame.hpp: No such file or directory
32 | #include
Which is strange, because the file is here: /var/lib/docker/overlay2/e80ce74dfaeed9ef263e0415e928a47b1a141fa8939d18b5d8ef0aeacffbcf51/diff/opt/ros/foxy/include/can_msgs/msg/frame.
Another thing is that I didn't want to isntall a Docker container, but it's there.
Asked by rosfan100 on 2021-06-29 05:44:36 UTC
Comments
I encountered the same issue when trying to build the ros2_socketcan. Manually adding find_package(can_msgs REQUIRED) to the CMake list of the package solved the issue for me (Ubuntu 22.04, ROS Humble Desktop Docker).
Asked by tschuette22 on 2023-05-26 08:30:45 UTC
You need to install the can_msgs package to your ros workspace.
sudo apt install ros-$ROS_DISTRO-can-msgs
source /opt/ros/$ROS_DISTRO/setup.bash
Make sure to clean up your local ros workspace (i.e. remove build/ install/ log/) before colcon build
.
To see all the packages you have installed to your machine:
ls /opt/ros/$ROS_DISTRO/include/
and ls /opt/ros/$ROS_DISTRO/share
.
Asked by caldito on 2022-07-04 04:51:20 UTC
Comments