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

Revision history [back]

click to hide/show revision 1
initial version

If your using ROS1, and you don't need the robots to talk to each other, then running a separate roscore on/for each robot would be fine. As long as students set their computers to talk to their own robot using the respective ROS_MASTER_URI, then that should be enough to prevent any cross talk between the robots in classroom. If your goal is for the robots to intercommunicate, like in a corticated swarm gossiping over a common channel, then that would require some careful namespacing unser a glocal roscore or else some complex multi ros master setup.

See the wiki for more general info:
http://wiki.ros.org/ROS/Tutorials/MultipleMachines
http://wiki.ros.org/ROS/NetworkSetup
http://wiki.ros.org/multimaster_fkie

As a side note, If you happen to migrate to ROS2 that does much of the discovery for you, the same as isolation as above could be achieved by designating each robot with its own ROS_DOMAIN id, however most DDS vendors only support a range from 0-232, so that approach might limit the number of robots that could simultaneously operate independently on the same network. You could partition a sharded domain in other ways using QoS settings via DDS partitions instead of namespacing them explicitly in ROS2 topics/nodename/services etc; you just need to set and pass in the QoS setting when launching the node.

Partitions are namespaced by a string name, as opposed to a number range, so there can be arbitrary number of separate partitions. To still allow the robots to intercommunicate you could write some kind of local bridge process between two local nodes subprocess started on different domains/partitions, where one node is cordoned off to communicate with the local robot network, and that other to communicate with the rest of the robots over a shared data space on the external network (e.g. domain_id 0 could be reserved for this). Sort of like the DDS router concept.

Choosing and setting domains:
https://index.ros.org/doc/ros2/ROS-2-On-boarding-Guide/#choose-a-dds-domain-id

DDS info on domain_id and DDS routing concepts
https://community.rti.com/kb/what-maximum-number-participants-domain
https://www.rti.com/products/routing-service