ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

erros in eclipse C++ by opening file from ros tutorial

asked 2012-08-30 05:05:41 -0500

viovio gravatar image

updated 2012-09-03 01:08:42 -0500

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

edit retag flag offensive close merge delete

Comments

1

Did you create the project with make eclipse-project?

dornhege gravatar image dornhege  ( 2012-08-30 05:10:23 -0500 )edit

Yes, i did.

viovio gravatar image viovio  ( 2012-09-03 00:58:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-08-30 05:29:27 -0500

dinamex gravatar image

please see the IDEs Page to use ROS code in Eclipse

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-08-30 05:05:41 -0500

Seen: 1,158 times

Last updated: Sep 03 '12