Teleop config

Write config

The previous page covered Client configurations. This page contains additional configurations for Teleop.

Items marked "required" are mandatory.

Default config

The default is as follows. Settings are added or overwritten depending on the loaded config. Since it is implemented in a HashMap, it will overwrite any already set and append for new settings.

initial_mode = ""
gamepad = "gilrs"

[control_nodes_config]

[gil_gamepad_config]
device_id = 0

[gil_gamepad_config.map]
button_map = [
    ["DPadLeft",      "DPadLeft"     ],
    ["Select",        "Select"       ],
    ["East",          "East"         ],
    ["DPadUp",        "DPadUp"       ],
    ["LeftTrigger",   "LeftTrigger"  ],
    ["DPadDown",      "DPadDown"     ],
    ["RightTrigger",  "RightTrigger" ],
    ["RightTrigger2", "RightTrigger2"],
    ["Start",         "Start"        ],
    ["LeftTrigger2",  "LeftTrigger2" ],
    ["Mode",          "Mode"         ],
    ["DPadRight",     "DPadRight"    ],
    ["South",         "South"        ],
    ["North",         "North"        ],
    ["RightThumb",    "RightThumb"   ],
    ["LeftThumb",     "LeftThumb"    ],
    ["West",          "West"         ]
]
axis_map = [
    ["LeftStickY",  "LeftStickY" ],
    ["LeftStickX",  "LeftStickX" ],
    ["RightStickX", "RightStickX"],
    ["DPadY",       "DPadY"      ],
    ["DPadX",       "DPadX"      ],
    ["RightStickY", "RightStickY"]
]
axis_value_map = [["LeftStickX", -1.0], ["RightStickX", -1.0]]

[plugins]

robot_teleop_config

Propertiestype
control_nodes_configControlNodesConfig (required)
gamepadGamepadKind(string) (default "gilrs")
gil_gamepad_configGilGamepadConfig
initial_modestring
pluginsTeleopPluginConfig
robot_config_full_pathstring
robot_config_pathstring

control_nodes_config

Control Nodes Config

Control Nodes Config
ik_node_teleop_configsarray IkNodeTeleopConfig (required)
joints_pose_sender_configJointsPoseSenderConfig (required)
joy_joint_teleop_configsarray JoyJointTeleopConfig
move_base_modestring
command_configsRobotCommandConfig

IK Node Teleop Config

IK Node Teleop Config
configIkNodeConfig (required)
joint_trajectory_client_namestring (required)
solver_namestring (required)

Joint Pose Sender Config

Joint Pose Sender Config
duration_secsdouble (default 2.0)
modestring (default "pose")

Joy Joint Teleop Config

Joy Joint Teleop Config
client_namestring
configJoyJointTeleopNodeConfig

IK Node Config

IK Node Config
modestring (required)
move_step_angulararray double (default [0.05, 0.05, 0.17])
move_step_lineararray double (default [0.01, 0.01, 0.01])
step_duration_secsdouble (default 0.1)

Joy Joint Teleop Node Config

Joy Joint Teleop Node Config
joint_stepdouble (default 0.02)
modestring (required)
step_duration_secsdouble (default 0.1)

Robot Command Config

Robot Command Config
file_pathstring (required)
namestring (required)

Example

[[control_nodes_config.command_configs]]
name = "audio bar"
file_path = "sample_audio_command.txt"

[[control_nodes_config.command_configs]]
name = "ros speak"
file_path = "sample_speak_command.txt"
openrr_apps_robot_command speak foo bar
openrr_apps_robot_command speak espeak "This is topic message"
PrintSpeaker: command audio sine
PrintSpeaker: command ros speak

gamepad

string or BuiltinGamepad ("gilrs" or "keyboard"). Default is "gilrs".

gil_gamepad_config

Gil Gamepad Config

Gil Gamepad Config
device_iduint (default 0)
mapMap

Map

Map
axis_maparray GilrsAxis Axis
axis_value_maparray Axis double
button_maparray GilrsButton Button

A comparison table with Gilrs looks like this. For reference only, as it depends on the Joystick used. If you want to assign this particular button or stick, you can change the key by following the example and mapping it to the teleop_config file.

Button and stick names follow gilrs layout.

Comparison table between GilrsAxis and Axis

GilrsAxisAxis
"LeftStickX""LeftStickX"(default)
"LeftStickY""LeftStickY"(default)
"LeftZ""LeftTrigger"
"RightStickX""RightStickX"(default)
"RightStickY""RightStickY"(default)
"RightZ""RightTrigger"
"DPadX""DPadX"(default)
"DPadY""DPadY"(default)
"Unknown""Unknown"

Comparison table between GilrsButton and Button

GilrsButtonButton
"South""South"(default)
"East""East"(default)
"North""North"(default)
"West""West"(default)
"C"
"Z"
"LeftTrigger""LeftTrigger"(default)
"LeftTrigger2""LeftTrigger2"(default)
"RightTrigger""RightTrigger"(default)
"RightTrigger2""RightTrigger2"(default)
"Select""Select"(default)
"Start""Start"(default)
"Mode""Mode"(default)
"LeftThumb""LeftThumb"(default)
"RightThumb""RightThumb"(default)
"DPadUp""DPadUp"(default)
"DPadDown""DPadDown"(default)
"DPadLeft""DPadLeft"(default)
"DPadRight""DPadRight"(default)
"Unknown""Unknown"

Example

[gil_gamepad_config.map]
axis_map = [
    # GilrsAxis      Axis (user axis)
    ['LeftStickX',  'LeftStickX'   ],
    ['LeftStickY',  'LeftStickY'   ],
    ['LeftZ',       'LeftTrigger'  ],
    ['RightStickX', 'RightStickX'  ],
    ['RightStickY', 'RightStickY'  ],
    ['RightZ',      'RightTrigger' ],
    ['DPadX',       'DPadX'        ],
    ['DPadY',       'DPadY'        ],
]
axis_value_map = [
    # Axis (user axis)  value
    ['LeftStickX',      -1.0 ],
    ['RightStickX',     -1.0 ],
    ['LeftStickY',      -1.0 ],
    ['RightStickY',     -1.0 ],
]
button_map = [
    # GilrsButton     Button(user button)
    ['East',          'South'         ],
    ['C',             'East'          ],
    ['North',         'North'         ],
    ['South',         'West'          ],
    ['West',          'LeftTrigger'   ],
    ['LeftTrigger',   'LeftTrigger2'  ],
    ['Z',             'RightTrigger'  ],
    ['RightTrigger',  'RightTrigger2' ],
    ['LeftTrigger2',  'Select'        ],
    ['RightTrigger2', 'Start'         ],
    ['Mode',          'Mode'          ],
    ['Select',        'LeftThumb'     ],
    ['Start',         'RightThumb'    ],
    ['DPadUp',        'DPadUp'        ],
    ['DPadDown',      'DPadDown'      ],
    ['DPadLeft',      'DPadLeft'      ],
    ['DPadRight',     'DPadRight'     ],
]

initial_mode

The initial_mode allows you to specify the initial mode.

Example

initial_mode = "base"

plugins

Teleop Plugin Config

Teleop Plugin ConfigDescription
argsstringArguments passed when creating this instance.
args_from_pathstringPass the contents of the specified file as an argument.
pathstring (required)Path to the plugin. If no extension is specified, the default extension for cdylib on the current OS will be selected. (linux: .so, macos: .dylib, windows: .dll)

robot_config_path

The robot_config_path specifies the relative path to the config file.

Example

robot_config_path = "sample_robot_client_config_for_urdf_viz.toml"