If something in the above sequence didn't work, the cause is likely in your network configuration. For short tests it is handy to print out the messages. In wireless networks it is sometimes necessary to check if there is a connection and messages still come. If you are not connected to a core there is an error. Leaving the master running on hal, kill the talker and listener, then bring them up on opposite machines.įor testing you can use the rostopic tool on all machines which are connected to the core. Variation: connecting in the other direction The only requirement is that you start the master before starting any nodes. Note that the sequence of talker / listener startup doesn't matter the nodes can be started in any order. Voila: you should now see the listener on hal receiving messages from the talker on marvin. Next we'll start a talker on marvin, also configuring ROS_MASTER_URI so that the master on hal is used:Įxport ROS_MASTER_URI= rosrun rospy_tutorials talker.py Now we'll start a listener on hal, configuring ROS_MASTER_URI so that we use the master that was just started:Įxport ROS_MASTER_URI= rosrun rospy_tutorials listener.py We need to select one machine to run the master we'll go with hal. These are the machines' hostnames, which means that these are the names by which you would address them when. Say we want to run a talker / listener system across two machines, named marvin and hal. There must be complete, bi-directional connectivity between all pairs of machines, on all ports (see ROS/NetworkSetup).Įach machine must advertise itself by a name that all other machines can resolve (see ROS/NetworkSetup). Select one machine to run it on.Īll nodes must be configured to use the same master, via ROS_MASTER_URI. Deploying a ROS system across multiple machines is easy. A well-written node makes no assumptions about where in the network it runs, allowing computation to be relocated at run-time to match the available resources (there are exceptions for example, a driver node that communicate with a piece of hardware must run on the machine to which the hardware is physically connected). ROS is designed with distributed computing in mind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |