Skip to content

ROS Integration

Dan Bohus edited this page Feb 8, 2022 · 5 revisions

The ROS Bridge may be used to integrate ROS components into a \psi system. Generally a long-running ROS system is integrated into a \psi application by constructing components utilizing the bridge to become proper publishers and subscribers over ROS protocols; exposing as emitters and receivers.

A further discussion of interoperating with ROS and a walkthrough of the below Turtle Sample was presented and recorded here during the April 2021 Platform for Situated Intelligence workshop.

Note: The RosNode.Node and related IPublisher/ISubscriber as well as the ParamClient rely on TCP sockets, and all communication happens in the clear. These communication channels are not secure, and the user must ensure the security of the network as appropriate.

Samples

After reading about the ROS bridge, the sample applications are a great way to understand how to integrate with \psi.

  • RosTurtleSample - illustrates how to connect Platform for Situated Intelligence to the turtlesim in ROS (no hardware required).
  • RosArmControlSample - illustrates how to connect Platform for Situated Intelligence to control the uArm Metal using ROS (hardware required).

Comparisons

Like \psi, ROS is an actor framework allowing loosely coupled modules to cooperate through message passing. Unlike \psi, ROS Nodes are generally separate, and possibly distributed, processes (except less common "Nodelets") and communication is over TCP sockets. By consequence, ROS systems are generally very much more course grained by comparison to \psi.

Also unlike \psi, there is a ROS Master (roscore) that coordinates Nodes. In \psi the application constructs the graph, rather than more or less "autonomous" nodes discovering one another.

For the most part, ROS message passing is much like \psi streams - unidirectional, async. However, ROS does have the concept of Services which are bidirectional, synchronous request/response messages.

Clone this wiki locally