erros in eclipse C++ by opening file from ros tutorial
Hello to all,
when i open the add_two_ints_server.cpp from this tutorial with my C++ Eclipse Editor following failures are shown:
Description Resource Path Location Type
Type 'beginner_tutorials::AddTwoInts::Request' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 4 Semantic Error
Type 'beginner_tutorials::AddTwoInts::Response' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 5 Semantic Error
Field 'sum' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 7 Semantic Error
Field 'a' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 7 Semantic Error
Field 'b' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 7 Semantic Error
Field 'ROS_INFO("request: x=%ld, y=%ld", (long int)req.a, (long int)req.b)' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 8 Semantic Error
Field 'ROS_INFO("request: x=%ld, y=%ld", (long int)req.a, (long int)req.b)' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 8 Semantic Error
Field 'ROS_INFO("sending back response: [%ld]", (long int)res.sum)' could not be resolved add_two_ints_server.cpp /beginner_tutorials/src line 9 Semantic Error
Invalid arguments '
Candidates are:
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, bool (#0::*)(#1 &, #2 &), #0 *)
ros::ServiceServer advertiseService(ros::AdvertiseServiceOptions &)
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, bool (#0::*)(ros::ServiceEvent<#1,#2> &), #0 *)
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, bool (#0::*)(#1 &, #2 &), const boost::shared_ptr<#0> &)
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, bool (#0::*)(ros::ServiceEvent<#1,#2> &), const boost::shared_ptr<#0> &)
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, bool (*)(#0 &, #1 &))
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, bool (*)(ros::ServiceEvent<#0,#1> &))
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, const boost::function<bool (#0 &, #1 &)> &, const boost::shared_ptr<const void> &)
ros::ServiceServer advertiseService(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, const boost::function<bool (#0 &)> &, const boost::shared_ptr<const void> &)
' add_two_ints_server.cpp /beginner_tutorials/src line 18 Semantic Error
What file or dependency is eclipse missing? Or are that failures with multiple origins?
edit: I followed this IDE-Tutorial.
At step "1. Reusing your shell's environment", i build an new ros-package and copied the "c++ eclipse" files in it. Then I created a launch folder and file and pasted following:
<launch>
<node pkg="eclipse2" name="eclipse" type ="eclipse"/>
</launch>
By using the command "roslaunch eclipse2 eclipse.launch" I started C++ - Eclipse. (Eclipse starts with some warnings of missing log-files)
But these failures are still there.
Also I follwed the other steps of the tutorial.
Any Suggestions?
Many Thanks in advance Dominik
Did you create the project with make eclipse-project?
Yes, i did.