Ask Your Question

Can anyone share me "roscpp_tutorials/TwoInts.h"

asked 2014-08-26 07:39:19 -0500

Oguzhan gravatar image

Hi ,I decide to learn ROS but i didn't found "roscpp_tutorials/TwoInts.h" header file. If you have this file, please share me :)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-08-26 08:21:54 -0500

Murilo F. M. gravatar image

updated 2014-08-26 08:28:19 -0500

The file you are looking for is automatically generated by the message_generation package, and even if you found the header file (.h), manually adding that to your package would be conceptually wrong.

The fact that you are not aware of that suggests you should follow the ROS Tutorials, particularly tutorial 10, which explains how to create and use ROS message and service files. Then, tutorials 14 and 16 further explain the underlying concepts.

I strongly advise you follow the ROS Tutorials (or one of those recently published books about ROS, if you fancy) if you are starting to learn ROS! :-)

edit flag offensive delete link more


Hi Mr. Murilo, what a nice suprice :) i searched at google and i found "A 5-day ROS crash course" materials. I am at Writing a Service Node in C++. Everything is ok but eclipse shows me error.

Description Resource Path Location Type Type 'day2_service::AddTwoInts::Request' could not be resolved service_node.cpp /build/[Source directory]/ros_day2/day2_service/src line 4 Semantic Error

like that lots of errors

Oguzhan gravatar imageOguzhan ( 2014-08-26 10:24:57 -0500 )edit

i found - beginner_tutorials/AddTwoInts.h is the header file generated from the srv file that we created earlier. link text

but it isn't generated how can i solve this ?

Oguzhan gravatar imageOguzhan ( 2014-08-26 10:47:04 -0500 )edit

Description Resource Path Location Type fatal error: beginner_tutorials/AddTwoInts.h: No such file or directory service_node.cpp /build/[Source directory]/ros_day2/day2_service/src line 2 C/C++ Problem

Oguzhan gravatar imageOguzhan ( 2014-08-26 10:50:52 -0500 )edit

Oh, OK. If you are following that and compiling the package named day2_service, then the header file will be inside your catkin workspace, in devel/include/day2_service. The code is essentially the same as the ROS Tutorials.

Murilo F. M. gravatar imageMurilo F. M. ( 2014-08-26 11:32:56 -0500 )edit

As for the error in Eclipse, make sure you configured the package according to this documentation.

Murilo F. M. gravatar imageMurilo F. M. ( 2014-08-26 11:34:06 -0500 )edit

answered 2014-08-26 07:56:19 -0500

Bastbeat gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-08-26 07:39:19 -0500

Seen: 355 times

Last updated: Aug 26 '14