Client config

configを書く

configを自分で書くことで、サンプルにないロボットや独自に作成したロボットがOpenRRで動くようになります。configには以下の要素を書くことができます。

また、VSCodeを使用している方はこちらから拡張機能のEvenBetterTOMLを導入することを推奨します。

Default config

デフォルトは以下のようになっています。読み込んだconfigに応じて設定が追加または上書きされます。

openrr_apps_robot_command --show-default-config
[speak_configs]

[openrr_clients_config]
self_collision_check_pairs = []

[openrr_clients_config.ik_solvers_configs]

[plugins]

robot_config

Client configに書く項目の一覧になります。リポジトリにあるサンプルもぜひご参考に。サンプルはこちらから。

PropertiesDescriptionType
joint_trajectory_clients使用するJoint trajectory clientsarray string
localization使用するLocalizationの指定。 rosurdf-vizfalse、もしくはプラグインの名前。string or boolean
move_base使用するMoveBaseの指定。 rosurdf-vizfalse、もしくはプラグインの名前。string or boolean
navigation使用するNavigationの指定。 rosurdf-vizfalse、もしくはプラグインの名前。string or boolean
openrr_clients_configOpenRR clientの設定。
ros_action_clients_configsROS Action Clientの設定。array RosControlActionClientConfig
pluginsプラグインの設定。
ros_clients_configsros_clients_configs
ros_cmd_vel_move_base_client_configROS MoveBaseの設定。.topicを付加して送りたいトピックを指定。
ros_localization_client_configROS Localizationの設定。要素の有効無効の指定。
ros_navigation_client_configROS Navigationの設定。要素の有効無効の指定。
speak_configsspeakの設定。SpeakConfig
speakers使用するSpeakersの指定。string
urdf_viz_clients_configsurdf_vizの設定。

joint_trajectory_clients

Type: array string

localization, move_base, navigation

Type: string or boolean

Example

move_base = false
navigation = "arci_ros2"

openrr_clients_config

OpenRR Clients Config

OpenRR Clients ConfigType
collision_check_clients_configsCollisionCheckClientConfig
ik_clients_configsIkClientConfig
ik_solvers_configsIkSolverConfig
joint_trajectory_clients_container_configsJointTrajectoryClientsContainerConfig
joint_posesJointsPose
self_collision_check_pairsarray string
urdf_full_pathstring
urdf_pathstring

Example

[openrr_clients_config]
urdf_path = "./twin_arms_robot.urdf"
self_collision_check_pairs = [
    "left_shoulder:left_gripper",
    "right_shoulder:right_gripper"
]

Collision Check Client Config

Collision Check Client ConfigType
client_namestring (required)
namestring (required)
self_collision_checker_configSelfCollisionCheckerConfig

Example

[[openrr_clients_config.collision_check_clients_configs]]
client_name = "arm_with_torso"
name = "arm_with_torso_collision_checked"

Self Collision Checker Config

Self Collision Checker ConfigType
predictiondouble (default 0.001)
time_interpolate_ratedouble (default 0.5)

IK Client Config

IK Client ConfigType
client_namestring (required)
namestring (required)
solver_namestring (required)

Example

[[openrr_clients_config.ik_clients_configs]]
name = "arm_with_torso_ik"
client_name = "arm_with_torso_collision_checked"
solver_name = "arm_with_torso_ik_solver"

IK Solver Config

IK Solver ConfigType
allowable_angle_error_raddouble (default 0.005)
allowable_position_error_mdouble (default 0.005)
constraintsConstraints
ik_targetstring (required)
jacobian_multiplierdouble (default 0.1)
num_max_tryuint (default 300)
root_node_namestring
use_random_ikboolean (default false)

Example

[openrr_clients_config.ik_solvers_configs.arm_with_torso_ik_solver]
ik_target = "gripper_palm_joint"
allowable_position_error_m = 0.01

Constraints

ConstraintsType
ignored_joint_namesarray string (default [])
position_xboolean (default true)
position_yboolean (default true)
position_zboolean (default true)
rotation_xboolean (default true)
rotation_yboolean (default true)
rotation_zboolean (default true)

Joint Trajectory Client Container Config

Joint Trajectory Client Container ConfigType
clients_namearray string (required)
namestring

Joints Pose

Joints PoseType
client_namestring (required)
pose_namestring (required)
positionsarray double (required)

Example

[[openrr_clients_config.joints_poses]]
pose_name = "stand by"
client_name = "arm"
positions = [0.0, 1.2, 0.0, -0.7, 0.0, -0.2, 0.0]

ros_action_clients_configs

ROS Control Action Client Config

ROS Control Action Client ConfigType
complete_allowable_errorsarray double (required)
complete_timeout_secdouble (default 10.0)
controller_namestring (required)
joint_namesarray string (required)
joint_position_difference_limitsarray double
joint_position_limiter_strategyJointPositionLimiterStrategy
joint_position_limitsJointPositionLimit
joint_velocity_limitsarray double
namestring (required)
send_partial_joints_goalboolean (default false)
state_topic_namestring (required)
wrap_with_joint_position_difference_limiterboolean (default false)
wrap_with_joint_position_limiterboolean (default false)
wrap_with_joint_velocity_limiterboolean (default false)

Joint Position Limiter Strategy

Joint Position Limiter StrategyElement
string (enum)"Clamp", "ClampWithWarn", "Error"

Joint Position Limit

Joint Position LimitType
lowerdouble
upperdouble

Example

[[urdf_viz_clients_configs]]
name = "foo"
joint_names = ["bar1", "bar2"]
joint_position_limits = [
    { lower = -3.0, upper = 3.0 },
    { lower = -2.0, upper = 1.5 },
]

plugins

plugin configType
instancesPluginInstance
path
Plugin InstanceTypeDescription
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)
typePluginInstanceKind

Plugin Instance Kind

Joint Position Limiter StrategyElement
string (enum)"JointTrajectoryClient", Localization", MoveBase", Navigation", "Speaker"

ros_clients_configs

ROS Control Client Config

ROS Control Client ConfigType
complete_allowable_errorsarray double
complete_timeout_secdouble
controller_namestring
joint_namesarray string
joint_position_limitsarray JointPositionLimit
joint_velocity_limitsarray double
namestring
send_partial_joints_goalboolean
state_topic_namestring
wrap_with_joint_position_limiterboolean (false)
wrap_with_joint_velocity_limiterboolean (false)

Joint Position Limit

Joint Position LimitType
lowerdouble
upperdouble

Example

[[ros_clients_configs]]
name = "arm"
joint_names = [
    "shoulder_joint",
    "shoulder_joint",
    "upper_arm_roll_joint",
    "elbow_flex_joint",
    "forearm_roll_joint",
    "wrist_flex_joint",
    "wrist_roll_joint",
]
complete_allowable_errors = [0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
controller_name = "arm_controller"
state_topic_name = "arm_controller/openrr/state"

ros_cmd_vel_move_base_client_config

ROS cmd_vel MoveBase Client Config

ROS cmd_vel MoveBase ConfigType
topicstring

ros_localization_client_config

ROS Localization Client Config

ROS Localization Client ConfigType
request_final_nomotion_update_hackboolean

ros_navigation_client_config

ROS Navigation Client Config

ROS Navigation Client ConfigType
clear_costmap_before_startboolean
request_final_nomotion_update_hackboolean

speak_configs

Speak Config

Speak ConfigElement
string(enum)"Print", "Audio", "Command" or "RosEspeak"
"RosEspeak"Type
configRosEspeakClientConfig
"Audio"Type
argsmap (required)
mapType
{name}string

ROS Espeak Client Config

ROS Espeak Client ConfigType
topicstring

Example (Audio)

[speak_configs."foo"]
type = "Audio"

[speak_configs."foo".args.map]
bar = "./bar.mp3" # Path to audio file
openrr_apps_robot_command --config-path {path to toml} speak foo bar

Example (ROSEspeak)

[speak_configs.espeak]
type = "RosEspeak"

[speak_configs.espeak.args.config]
topic = "/sample/message"
openrr_apps_robot_command --config-path {path to toml} -i
>  speak espeak Hello!
data: "Hello!"
---

speakers

Type: string

urdf_viz_clients_configs

URDF-Viz Web Client ConfigType
joint_namesarray string
joint_position_limitsarray JointPositionLimit
joint_velocity_limitsarray double
namestring
wrap_with_joint_position_limiterboolean (default false)
wrap_with_joint_velocity_limiterboolean (default false)

Example

[[urdf_viz_clients_configs]]
# `urdf-viz` client name
name = "arm"
# List of joints
joint_names = [
    "shoulder_yaw",
    "shoulder_pitch",
    "shoulder_roll",
    "elbow_pitch",
    "wrist_yaw",
    "wrist_pitch",
]
wrap_with_joint_position_limiter = true

# Range of joints
joint_position_limits = [
    { lower = -3.0, upper = 3.0 },
    { lower = -2.0, upper = 1.5 },
    { lower = -1.5, upper = 2.0 },
    { lower = -2.0, upper = 1.5 },
    { lower = -3.0, upper = 3.0 },
    { lower = -2.0, upper = 2.0 },
]

[openrr_clients_config]
# Path to URDF file
urdf_path = "./sample.urdf"
self_collision_check_pairs = [
    "shoulder_yaw:gripper_linear1",
]

[[openrr_clients_config.collision_check_clients_configs]]
# Collision check client name
name = "arm_collision_checked"
# `urdf-viz` client name
client_name = "arm"

[[openrr_clients_config.ik_clients_configs]]
# IK client name
name = "arm_ik"
# Collision check client name
client_name = "arm_collision_checked"
# IK solver name
solver_name = "arm_ik_solver"

[[openrr_clients_config.joints_poses]]
# Position name
pose_name = "zero"
# Collision check client name
client_name = "arm_collision_checked"
# Position that you want to set
positions = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

[openrr_clients_config.ik_solvers_configs.arm_ik_solver] # IK solver name (arm_ik_solver)
ik_target = "tool_fixed"