No such file or directory [sensor_msgs/LaserScan.h]
Hi there, guys, I have been writing some codes that made use of geometry_msgs lately. The way I included them in the previous algorithm was like this:
#include "geometry_msgs/Point.h"
And now I would like to use LaserScan.h, located in my system at
/opt/ros/electric/stacks/common_msgs/sensor_msgs/msg_gen/cpp/include/sensor_msgs
using
#include "geometry_msgs/Point.h"
The thing is, when I try to compile what I get is this error, showing it can't find it:
/home/alonsoj1/ros_workspace/prueba/src/talker.cpp:2:48: error: common_msgs/sensor_msgs/CameraInfo.h: No such file or directory
That's why I just link to the whole path like this to make it work:
#include "/opt/ros/electric/stacks/common_msgs/sensor_msgs/msg_gen/cpp/include/sensor_msgs/LaserScan.h"
I wonder why this is necessary, since the file Point.h (the one I used before wasn't in geometry_msgs/ path directly, but in /opt/ros/electric/stacks/common_msgs/geometry_msgs/msg_gen/cpp/include/geometry_msgs). Is there a reason for this behaviour?
Thanks,