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

Unable to Include Ackermann Messages in ROS2 C++ Node

asked 2019-11-28 11:23:56 -0500

mequi gravatar image

I am using ROS2 Dashing on Ubuntu 18.04 and am receiving the error fatal error: ackermann_msgs/msg/AckermannDrive.hpp: No such file or directory #include "ackermann_msgs/msg/AckermannDrive.hpp" when trying to colcon build --symlink-install a custom package with a rclcpp node. The headers files in the node are as follows

#include "rclcpp/rclcpp.hpp"

#include "sensor_msgs/msg/joy.hpp"

#include "ackermann_msgs/msg/AckermannDriveStamped.hpp"

All std_msgs, sensor_msgs, and geometry_msgs include fine and I have the lines find_package(ackermann_msgs REQUIRED) and ament_target_dependencies(usb_hw_interface rclcpp ackermann_msgs sensor_msgs) in my CMakeLists.txt and the line <depend>ackermann_msgs</depend> in my package.xml. I have scoured the internet for similar problems and have looked over my code a multitude of times without luck. I can confirm that ackermann_msgs are installed in my /opt/ros/dashing/share and that they appear when I run ros2 msg list. Any help is greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-28 12:45:27 -0500

marguedas gravatar image

Looking at the include the joy message, it looks like a lowercase_underscore pattern is used. Can you have a look at the content of /opt/ros/dashing/include/ackermann_msgs/msg ?

Looks like including ackermann_msgs/msg/ackermann_drive_stamped.hpp would be more appropriate for a c++ node.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-11-28 11:23:56 -0500

Seen: 1,340 times

Last updated: Nov 28 '19