.. _namespacing-guide: Namespacing Guide ================= The robot namespacing is important in the environments that operates with multiple robots. There might be cases, where the robots are from different vendors too. In those scenarios namespacing becomes essential. The namespacing configuration is disabled by default, when a single robot is acquired from us. If multiple robots are purchased at the same time, then the following steps would have been already configured for the robots. Therefore, there is no need to use the launch arguments that would enable namespacing and add it to the robot's configuration. .. Note:: The complete namespacing support is currently only avaiable for MP-400 and partially for MPO-700. The rest will be updated soon. Convention ---------- By default all the parameter files are configured to support the namespacing "robot1" and if more than one robot is acquired from us (i.e. in a single purchase), then it would be "robot2", "robot3" and so on. In the namespacing setup, each frame broadcasted by the TF's must have the namespace prefix. For example, the odom frame of a robot should be like `robot1/odom` and for the base link it should be `robot1/base_link` and so on. Configuration for Bringup ------------------------- As partially explained in the :ref:`start-with-ros-on-the-robot`, the drivers of the robots can be easily configured and launched with the namespaces. Kinematics ********** For the robots with differential kinematics such as the MP-400 and MP-500, it is essential to setup the odom frame id to have a trailing "/" at the beginning of the frame id. For example, the odom must be inputted to `/odom` and base_link to `/base_link`. The similar steps must be adapted to mecanum and the omnidrive kinematics. Configuration for Mapping ------------------------- .. Attention: The pre-configured parameters for mapping is only available for MP-400. The naming convention for the namespacing has also been adapted for the mapping parameters. Namespaced configs can be found under `~/your_workspace/your_robot/configs/navigation/namespaced_mapping.yaml` Configuration for Navigation ---------------------------- The navigation parameters for namespacing system is also pre-configured. Namespaced configs can be found under `~/your_workspace/your_robot/configs/navigation/multi_robot_navigation.yaml` Launch the navigation with the namespacing using the following command from the terminal :: ros2 launch neo_mpo_700-2 navigation.launch.py namespace:="robot1" use_multi_robots:=True head_robot:=True params_file:=install/neo_mpo_700-2/share/neo_mpo_700-2/configs/navigation/multi_robot_navigation.yaml In case if you would like to set the `params_file` argument to `multi_robot_navigation.yaml`, then go to `~/your_workspace/your_robot/launch/navigation.launch.py` and modify the default value of the `LaunchConfiguration` pointing to the argument `params_file`. Then launch using the following command :: ros2 launch neo_mpo_700-2 navigation.launch.py namespace:="robot1" use_multi_robots:=True head_robot:=True .. Note:: Both the `use_multi_robots` and `head_robot` parameters needs to be enabled in the cases where there is only one neobotix robot. This enables the necessary namespacing for the nav2 nodes and also starts the map server for providing the necessary map for the navigation. .. Attention:: Namespacing is optional and if enabled, the parameter set for the Nav2 must be correspondingly updated. RViz for navigation can be launched with namespacing, for that use the terminal command: :: ros2 launch neo_nav2_bringup rviz_launch.py use_namespace:=True namespace:="robot1" The complete documentation for multi robot setup can be found in :ref:`multi-robot-setup`. Configuration for Docking ------------------------- Another param file in the arsenal is the namespaced_docking configs. Namespaced configs can be found under `~/your_workspace/your_robot/configs/navigation/multi_robot_navigation.yaml` More information on the docking can be found `here `_.