Ask Your Question
0

how to convert cpp program to ROS

asked 2017-04-12 03:48:17 -0500

zubair gravatar image

hi folks

i have a program which i make on eclipse in cpp language, and which contains opencv and librealsense libraries, i need to convert this to ROS,, please tell me how to do this .

thanks ya all .

edit retag flag offensive close merge delete

Comments

Providing some code will help us help you!

gstavrinos gravatar image gstavrinos  ( 2017-04-12 04:00:49 -0500 )edit

its just cpp code, normal. and i have build this project using eclipse and so i have a make file in debug folder and in src folder my cpp code. i just need to convert this project to ROS

zubair gravatar image zubair  ( 2017-04-12 04:04:12 -0500 )edit

Try creating a CMakeLists.txt file for your cpp code, using the instructions on this page.

gstavrinos gravatar image gstavrinos  ( 2017-04-12 04:07:50 -0500 )edit

What do you mean by converting it to ROS platform? Using a catkin workspace? Or do you need any other stuff in ROS as well?

huanxiner gravatar image huanxiner  ( 2017-04-12 13:47:24 -0500 )edit
1

It's not really clear what you mean by "convert". Are you trying to turn this executable into a node that has publishers, subscribers, and other ROS capabilities? Or are you simply trying to compile the exact code using catkin, the ROS build system?

jarvisschultz gravatar image jarvisschultz  ( 2017-04-12 14:07:34 -0500 )edit

hi, yes i need to make it a ros topic with this cpp file...

zubair gravatar image zubair  ( 2017-04-13 04:25:42 -0500 )edit

I'd edit your original question and supply much more information. What does your CPP code do? How are you trying to convert it to ROS? What does/doesn't work? You could also study example ROS packages that mimic what you are trying to do for inspiration (I'd suggest some, but I don't know your info)

jarvisschultz gravatar image jarvisschultz  ( 2017-04-13 08:55:53 -0500 )edit

i got it working,, i made a node out of it,, now i can run my program with rosrun ,,, thanks all guys

zubair gravatar image zubair  ( 2017-04-13 09:31:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-12 08:46:25 -0500

Airuno2L gravatar image

There are some tips on using eclipse with ROS on the IDEs page here.

edit flag offensive delete link more

Comments

sorry, but this is not i am looking for, i just need to convert my cpp program to ROS platform, i have my build and src and inside build , a make file .

zubair gravatar image zubair  ( 2017-04-12 09:39: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: 2017-04-12 03:48:17 -0500

Seen: 343 times

Last updated: Apr 12 '17