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

Integration of ROS Into a Seperate System

asked 2018-06-19 08:55:23 -0500

stuart bourne gravatar image

updated 2018-06-19 11:58:39 -0500

I have a system running ROS kinetic, specifically for asynchronous data collection. I also have a system running the computationally heavy post-processing of the collected data, which I have designed to be a multi-threaded process. I wish to have the user interact with the two systems separately, be means of a web browser interface. Being able to choose between the data collection subsystem, and the post-processing subsystem.

My primary approach was to use a python micro-framework (such as flask) to launch a python web server, and then use the python roslaunch API to interface with the ROS framework. However, as others have noted, I ran into the typical error message:

ValueError: signal only works in main thread

which is clearly caused by calling the roslaunch API from a sub thread, due to the call being made from a web server.

This leaves me wondering as to whether I am forced to integrate my entire system into the ROS framework, and use the ROSBridge Suite to handle user based interaction. A process which I am unsure about due to the synchronous nature of my processing suite.

Consequently, this has left me looking for another method to integrate ROS into non-ROS based architectures, and figured I would reach out to the community for support. Alternatively, are my concerns about the integration of a multi-threaded processing suite into ROS unwarranted? Will the industrialization of an entire ROS based architecture prove to be a difficult task?

Note: I understand this question could be viewed as open-ended, if that is the case, if you could point me towards a more design-oriented platform it would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

I wish to integrate the two systems via means of a web user interface.

can you expand a little on this part? I'm not sure I follow how a "web user interface" is used when integrating two systems.

Unless you are making the human do the integration by acting as a coordinator of both?

gvdhoorn gravatar image gvdhoorn  ( 2018-06-19 09:32:11 -0500 )edit

Also: I'm not sure what its current status is, but perhaps pyros-dev/pyros is something you can use. I believe the author ( @asmodehn ) has been working to do exactly what you describe in your post.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-19 09:40:54 -0500 )edit

Being able to choose between the data collection subsystem, and the post-processing subsystem

this, together with your question about the Python roslaunch API sounds like you are essentially looking for a way to launch two (or more) different launch files using a web server?

gvdhoorn gravatar image gvdhoorn  ( 2018-06-19 12:08:27 -0500 )edit

Yes, effectively. I wish to be able to control the context and lifeline of a series of ROS nodes for data collection. Then, under a different use case, use a post-processing algorithm from a web application, or in more generalized terms, a web user interface.

stuart bourne gravatar image stuart bourne  ( 2018-06-19 12:39:40 -0500 )edit

Taking this a bit further, it might pay to look at how to integrate coordination of your ROS applications with a container orchestration framework. That could make deployment as well as startup/shutdown easier. Docker comes to mind, but there are more.

It would decouple starting & stopping your ..

gvdhoorn gravatar image gvdhoorn  ( 2018-06-19 12:46:28 -0500 )edit

.. application from actually interacting with it.

I'm not sure I understand how you want to integrate your "multi-threaded [data] process[ing]" application with ROS, or why. If you wanted to do that in order to be able to control it from ROS, perhaps rosbridge is not such a bad idea.

But ..

gvdhoorn gravatar image gvdhoorn  ( 2018-06-19 12:48:03 -0500 )edit

.. orchestrating things would be a separate responsibility (and be implemented using different technology) from everything else.

Not saying this is a solution, but perhaps something to consider.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-19 12:49:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-26 15:55:14 -0500

stuart bourne gravatar image

To those interested in my solution,

I avoided the use of a separate web framework such as Flask due to minimal documentation of packages. This is an area I will continue to look in to, but in the mean time I have decided to use the rosbridge_suite package to communicate via my web GUI and my ROS backend. I have then used the ROS capabilities package to start and stop corresponding nodes via service calls. While this does not achieve exactly what I required, this does achieve my overall goal of handling the computational resources via means of context management in ROS.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-06-19 08:55:23 -0500

Seen: 611 times

Last updated: Jun 26 '18