Skip to content

Tutorial 2: TeMoto Config

Robert edited this page Apr 25, 2023 · 10 revisions

Overview

TeMoto configuration package, or TeMoto config in short, organizes all your application specific assets as a single neat ROS package. These assets include:

  • Configuration files
  • TeMoto actions
  • UMRF graphs
  • Custom scripts and source files
  • etc.

The idea is that each robot you set up TeMoto for has its dedicated TeMoto config. Therefore we highly recommend to create and use a TeMoto configuration package as the basis of your TeMoto setup.

Note: As each robot is expected to have a unique TeMoto config name, this name is by default used as a ROS namespace of robot-specific ROS nodes and topics. For example, when launching temoto.launch without any further arguments, then the name of the TeMoto config is assumed to be the namespace. See the "Launch TeMoto From Config" section of this tutorial for more details.

Generate a TeMoto Config Package

Open a terminal window and type:

rosrun temoto_workspace_generator generate_workspace <custom-temoto-config> <path>

It generates a TeMoto config package with the name at your desired location.

Since TeMoto config is a ROS package, the following makes the most sense:

# Navigate to the source folder of your catkin workspace
cd <catkin-ws>
rosrun temoto_workspace_generator generate_workspace custom_temoto_config src

# Don't forget to build and source your catkin workspace
catkin build
source devel/setup.bash

Structure of TeMoto Config

TeMoto config package has following folder structure:

custom_temoto_config/
|__temoto_actions/
|__umrf_graphs/
|__custom_temoto_config/
     |__config/
     |__launch/
     |    |__action_assistant.launch
     |    |__temoto.launch
     |__CMakeLists.txt
     |__package.xml

where

  • custom_temoto_config/custom_temoto_config: Contains the launch files to launch TeMoto and the Action Assistant, as well as config folder where, e.g., Component Manager, Robot Manager or other configuration files can be stored.

  • custom_temoto_config/temoto_actions: The default directory where the Action Assistant will generate the TeMoto Actions.

  • custom_temoto_config/umrf_graphs: The default directory where the Action Assistant will generate the UMRF graphs.

Launch TeMoto From Config

As a small warm-up exercise, let's launch TeMoto and try to understand the concept of TeMoto namespace (or ROS namespaces in general).

First launch TeMoto without specifying the namespace:

roslaunch custom_temoto_config temoto.launch

And for example if you have a look at the available ROS services you would see the name of your TeMoto config appended in front of the service names:

rosservice list

/custom_temoto_config/component_manager/fetch
/custom_temoto_config/component_manager/load_component
/custom_temoto_config/component_manager/load_pipe
/custom_temoto_config/component_manager/status
/custom_temoto_config/component_manager/unloader
/custom_temoto_config/get_umrf_graphs
/custom_temoto_config/list_components_server
/custom_temoto_config/list_pipes_server
/custom_temoto_config/start_umrf_graph
/custom_temoto_config/stop_umrf_graph
/custom_temoto_config/temoto_action_engine/get_loggers
/custom_temoto_config/temoto_action_engine/set_logger_level
/custom_temoto_config/temoto_component_manager/get_loggers
/custom_temoto_config/temoto_component_manager/set_logger_level
/custom_temoto_config/temoto_process_manager/fetch
/custom_temoto_config/temoto_process_manager/get_loggers
/custom_temoto_config/temoto_process_manager/load_external_resource
/custom_temoto_config/temoto_process_manager/set_logger_level
/custom_temoto_config/temoto_process_manager/status
/custom_temoto_config/temoto_process_manager/unloader

If you want to change the namespace to something different, maybe make it shorter or to something that resembles the name of your robot better, you can do that by using the temoto_namespace argument. First stop TeMoto via Ctrl+C and launch it again, but now under a different namespace:

roslaunch custom_temoto_config temoto.launch temoto_namespace:=robot_xyz

And now if you check the available ROS services again, you should see robot_xyz instead of custom_temoto_config:

rosservice list

/robot_xyz/component_manager/fetch
/robot_xyz/component_manager/load_component
/robot_xyz/component_manager/load_pipe
/robot_xyz/component_manager/status
/robot_xyz/component_manager/unloader
/robot_xyz/get_umrf_graphs
/robot_xyz/list_components_server
/robot_xyz/list_pipes_server
/robot_xyz/start_umrf_graph
/robot_xyz/stop_umrf_graph
/robot_xyz/temoto_action_engine/get_loggers
/robot_xyz/temoto_action_engine/set_logger_level
/robot_xyz/temoto_component_manager/get_loggers
/robot_xyz/temoto_component_manager/set_logger_level
/robot_xyz/temoto_process_manager/fetch
/robot_xyz/temoto_process_manager/get_loggers
/robot_xyz/temoto_process_manager/load_external_resource
/robot_xyz/temoto_process_manager/set_logger_level
/robot_xyz/temoto_process_manager/status
/robot_xyz/temoto_process_manager/unloader

Just to recap namespacing, TeMoto namespace is necessary if you are working with multi-robot systems. Without a unique namespace the topics and services will likey conflict with eachother. Thus namespaces are heavily utilized in TeMoto by default.


Next: Tutorial 3 - "Actions"

Clone this wiki locally