0
$\begingroup$

Rosanswers logo

(Hope this isn't overlapping with previous questions...)

On Eclipse, basic ROS files (e.g. ros::{ NodeHanle, Publisher } ) are not resolved. Is something wrong or missing in what I've done?

For example, while I'm doing this tutorial, I did followings (trying to follow IDEs page:

% roscreate-pkg drive_base_tutorial roscpp geometry_msgs
% make eclipse-project                (in the new folder)

Then add "Environment" (ROS_ROOT, ROS_PACKAGE_PATH, PYTHONPATH, PATH) on Eclipse (which was necessary for .cpp files to resolve .h files on Eclipse), then "Proejct"->"Build Project", which returns errors saying the classes are not resolved as mentioned earlier.

make from command line is successful.

I know how to manually add "include" path. I'm just wondering whether make eclipse-project isn't too nice to set include path and all other necessary configuration automatically or not, and the IDEs page can be read as it would do nice things I expect.

Environment: Ubuntu 10.10, Eclipse CDT Indigo


Originally posted by 130s on ROS Answers with karma: 10937 on 2011-10-06

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You need to run make eclipse-project again each time that you change the project dependicies. Additionally you need to restart eclipse everytime you do that.

You should have the includes showing up in eclipse, if everything is correct.


Originally posted by Achim with karma: 390 on 2011-10-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by 130s on 2011-10-07:
Though weird, I now can resolve, build and run on Eclipse the copied .cpp file from the one that had a problem. Original .cpp is still has problem but that doesn't matter. Still don't know what took the actual effect but thanks!

Comment by 130s on 2011-10-07:
@Achim thanks. Redoing "make eclipse-project" might have helped setting Environments so that include files are now able to be referred , but still classes like NodeHandle are not resolved...I can even open the files included via Eclipse by clicking file names in .cpp file. Strange.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.