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

Problem including geometry_msgs::Twist in ROS2

asked 2022-05-16 04:01:37 -0500

Peanpepu gravatar image

updated 2022-05-16 04:03:07 -0500

Im trying to migrate a simple code from ROS to ROS2. I want to use a variable type geometry_msgs::msg::Twist, but the only hint i found was including this:

#include <geometry_msgs/msg/point_stamped.hpp>

and this doesnt work. I have declared the variable using geometry_msgs::msg::Twist vel_msg; In ROS i used #include "geometry_msgs/Twist.h" but in ROS2 i am unable to include it correctly. Which library should i include and how should i refer to it to use it in the script. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-16 04:59:24 -0500

Peanpepu gravatar image

I found it. I have to use #include <geometry_msgs/msg/twist.hpp> and to declare the variable need to use: geometry_msgs::msg::Twist vel_msg

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-05-16 04:01:37 -0500

Seen: 794 times

Last updated: May 16 '22