Ask Your Question
0

How do i get ros_lib and roscpp source files?

asked 2018-03-06 10:42:40 -0500

ogensyts gravatar image

Hi,

i want to implement roscpp to my C++ project to communicate to ROS via TCP. (microcontroller programmed in C++) Here is a little background:

Some time ago i used rosserial_client on my C++ project. To get rosserial_client source files (.h and .cpp) to my project what i did before was doing this in terminal on ROS indigo :

rosrun rosserial_client make_libraries

And it got me a nice folder named "ros_lib" containing everything i needed to port rosserial_client to my project. Worked out fine. (.h and .cpp files)

But now i want to use roscpp in my project, to use tcp communication with tcp sockets (i think i need to use transport.h). And i cannot figure out how to get roscpp and roscpp dependencies source files (.h and .cpp) to a single folder with everything working.

I tried to get roscpp from Github then doing a catkin_make on it, but could'nt find something useable after all.

How do i get ros_lib and roscpp source files (in a single folder, with everything working) to port to my C++ project? Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-03-06 11:14:45 -0500

joq gravatar image

updated 2018-03-06 13:38:30 -0500

Here are the complete source build instructions:

EDIT: To find the roscpp dependencies in your workspace, first source it, then run:

$ rosdep keys roscpp

For Kinetic, that shows:

rosgraph_msgs
rosconsole
roslang
catkin
xmlrpcpp
std_msgs
message_runtime
rostime
roscpp_serialization
roscpp_traits
message_generation
cpp_common
pkg-config
edit flag offensive delete link more

Comments

Thank you! Now, do you know which files i need to make tcp connection to my ROS Master? Is there a tutorial on how to use roscpp to connect to master via TCP?

ogensyts gravatar imageogensyts ( 2018-03-06 13:13:00 -0500 )edit

I doubt there is such a tutorial. You should look at the code.

joq gravatar imagejoq ( 2018-03-06 13:36:24 -0500 )edit

Ok thank you!

ogensyts gravatar imageogensyts ( 2018-03-06 13:42:27 -0500 )edit

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

Stats

Asked: 2018-03-06 10:40:55 -0500

Seen: 119 times

Last updated: Mar 06 '18