"rosbot_control/rosbot_class.h" file not found, same with <ros/ros.h>

Hey there. I’m currently going through C++ for Robotics course. Half way through chapter 3 I’ve been unable to compile .cpp getting an error saying that “rosbot_control/rosbot_class.h” file not found.
I have changed the order of the “inlcude” statements to start with <ros/ros.h> and i get the same errors saying that this time <ros/ros.h> file not found.

I went through the other filed cloned from the repo and found that even the “rosbot_class” is showing errors saying “geometry_msgs/Twist.h” file not found…

I tried re cloning the repo, catkin_make, source, etc… but nothing helps. I’m stuck since I cant compile my cpps…

any help appreciated.

1 Like

I tried again this morning using the solution code from the exercise 4.1. But still Im getting the issue.
Im assuming there has to be a problem with ROS, maybe the IDE?

Hello @bernard.arriagada ,

This script you have to compile it using catkin_make, i.e. as you did with Exercise 2.1 in Chapter 2 (C++ Basics).

As I wrote in the first post “I tried re cloning the repo, catkin_make, source, etc… but nothing helps. I’m stuck since I cant compile my cpps…” I have already tried catkin_make.

Catkin_make, source, re cloning the repo, etc nothing works. I read in other posts that sometimes this issue is because ros has issues.

As you can see, even after catkin_make and source devel/setup.bash the IDE is showing error messages all over the place.
“rosbot_control/rosbot_class.h” file not found etc

Could you please advise how to reset the whole system to original configurations?

I see im not the only one that has faced this issue but I still dont see a clear way to fix it:

https://get-help.robotigniteacademy.com/t/error-in-cpp-file-ros-ros-h-not-found/5584

Don’t worry about the IDE messages, just ignore them. As long as it compiles correctly (catkin_make command doesn’t throw any error), you should be able to run the file without problems.

Oh man… Alberto… Both on my first post, and on my first response to you I clearly wrote. I CANT COMPILE MY CPPs. That’s why I’m stuck. Which is clearly stated twice. And it is in PICTURE in my 2nd post…
c’mon man.

I CANT COMPILE MY CPPs. Thats why im stuck. The whole idea of the course is to learn and practice, I cant practice because I can’t compile my cpps. All the other information is supporting information about the situation to help you help me.
Now please man… I Imagine due to time difference I’m getting only ONE answer per day… so lets make next one count.

Thank you.

Solved it myself. :+1:

Sorry for the confusion. I just went to the tutorial and compiled it using catkin_make without any problem, so I assumed that you were trying to compile it using g++ (also because of the image in the 2nd post). My bad. So what was the issue at the end?