ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Making my code ros-independent

asked 2015-07-29 13:06:23 -0600

madeye gravatar image

updated 2015-07-29 15:14:14 -0600

allenh1 gravatar image

Hi,

I have a program called ORB_SLAM that is ROS dependent at the moment. So it relies on ROS and it's methods to run. I am trying to make it ROS independent.

Is there a resource where I can find the C++ code that goes behind how ROS manages nodes and performs various functions in its method calls.

For example, there a line like: while (ros::ok()) { .. } Here ros::ok() checks to see if a node has finished shutting down. Is it possible to write C++ code for this that would accomplish the same thing without using ROS?

edit retag flag offensive close merge delete

Comments

Have you considered sending the messages over tcp? You could make a ROS interpreter on one end and a command sending node on the other. A lab down the hall refused to write in ROS but needed robots, so I wrote this.

allenh1 gravatar image allenh1  ( 2015-07-29 15:17:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-08-07 15:13:51 -0600

pitosalas gravatar image

Can you say what your goal is? Because ros::ok() is checking something about a node. A node is a ROS concept so I can't see what it means to make it ROS independent. You could refactor to classes that are about the essence of your algorithm and then use them in a much smaller program that uses ROS.

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

2 followers

Stats

Asked: 2015-07-29 13:06:23 -0600

Seen: 1,182 times

Last updated: Aug 07 '18