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

Revision history [back]

It's easier done than said.

You have to learn the roslaunch syntax.

The process involves a few different concepts: hardware machines, conceptual machines, tf trees (at least).

The distinction between hardware machines and conceptual machines is paramount:

  • a hardware machine is a unix machine, ie a computer running your choice of OS, with a unique identifier, to which you need to be able to ssh into.
  • a conceptual machine is one of your Naos

What does this mean? I don't know the Nao stack, so I am generalizing here: most of times you have to run nodes that are local to the specific machines (for example nodes that communicate with hardware, like motor controllers and laser drivers) and nodes that don't need to be local (for example navigation nodes: they fetch the data flowing over the network, but don't need to run on the specific machine from which they are fetching their data).

So here is a launch file example

<launch>
    <machine name="Nao01" address="Nao01.local" user="nao" default="false" env-loader="/opt/ros/<distro>/setup.sh" timeout="180" />
</launch>

This doesn't do anything but explains how you setup remote machines.

The next step is to determine where nodes will run (as said before: on the core machine, or on the remote machines).

    <launch>
        <machine name="Nao01" address="Nao01.local" user="nao" default="false" env-loader="/opt/ros/<YOUR_DISTRO>/setup.sh" timeout="180" />
        <node pkg="nao-stack" type="navigation" name="nao_navi" />

        <!-- == NAO 01 == -->
        <group ns="nao_1">
        <param name="tf_prefix" value="nao_1"/>
        <param name="robot_description" command="$(find xacro)/xacro.py $(find nao_stack)/nao.urdf" />

        <!-- Robot State Publisher -->
        <node pkg="robot_state_publisher" type="state_publisher" name="state_publisher"/>       

        <!-- Nao Nodes -->
        <node pkg="nao_stack" type="driver" name="drive" machine="Nao01"/>
        </group>
        <!-- == END NAO 01 == -->

    </launch>

This most probably won't work (paths and names are surely wrong) but should get you going.

Note the various type of nodes and where they are started.

Remember that to use roslaunch architecture your core machine MUST be able to log into the remote machines via ssh without password. That means loading the core ssh key into the remote machines, and granting it authorized_key status.

This should help you get started setting up ssh.