How to use geometry_msgs/Twist.h ?
Hello, I'm trying to use stage with ROS. So I have modified the talker.cpp code, from the tutorial, to control the robot of the stage's tutorial. I have changed the declaration of the publisher to this:
ros::Publisher chatter_pub = n.advertise<geometry_msgs::Twist>("cmd_vel", 1000);
And I add this too:
#include <geometry_msgs/Twist.h>
My problem is that the code cant compile because this library cant be found. The error given by the compiler is :
ros_workspace/stage_controllers/src/talker.cpp:4:33: error fatal: geometry_msgs/Twist.h: No existe el archivo o el directorio compilación terminada.
Its in spanish, but it means: fatal error: geometry_msgs/Twist.h: The file or directory doesn't exist, compilation finished.
I have tried to add the route of this file to the $PATH (/opt/ros/electric/stacks/common_msgs/geometry_msgs/msg_gen/cpp/include/geometry_msgs/Twist.h) and have done all the ros.org tutorial. So where should I add this route to makes it compile? Thanks for your time
Please always copy-paste the error messages you get. It's hard to guess what's going wrong. http://www.ros.org/wiki/Support#Guidelines_for_asking_a_question_.28Please_read_before_posting.29