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

fatal error: can_msgs/msg/frame.hpp: No such file or directory

asked 2021-04-08 04:34:41 -0500

huhaocong gravatar image

my envirment: ubuntu 20.04 ROS2 AutowareAuto release-1.0.0

error message: Starting >>> raptor_dbw_msgs --- stderr: raptor_can_dbc_parser
In file included from /home/emgdo/AutowareAuto/src/external/new_eagle_raptor/raptor_can_dbc_parser/include/raptor_can_dbc_parser/Dbc.hpp:32, from /home/emgdo/AutowareAuto/src/external/new_eagle_raptor/raptor_can_dbc_parser/src/Dbc.cpp:29: /home/emgdo/AutowareAuto/src/external/new_eagle_raptor/raptor_can_dbc_parser/include/raptor_can_dbc_parser/DbcMessage.hpp:32:10: fatal error: can_msgs/msg/frame.hpp: No such file or directory 32 | #include <can_msgs msg="" frame.hpp=""> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2022-07-04 04:51:20 -0500

caldito gravatar image

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.

edit flag offensive delete link more
0

answered 2021-06-29 05:44:36 -0500

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/Installa... 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/...

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 <can_msgs msg="" frame.hpp="">

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.

edit flag offensive delete link more

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).

tschuette22 gravatar image tschuette22  ( 2023-05-26 08:30:45 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-04-08 03:51:24 -0500

Seen: 2,443 times

Last updated: Apr 08 '21