openrr_apps_robot_command

The openrr_apps_robot_command allows you to send several commands to the robot.

openrr_apps_robot_command [OPTIONS] [SUBCOMMAND]
OptionsDescription
-c, --config-path <CONFIG_PATH>Path to the setting file
--config <CONFIG>Set options from command line. These settings take priority over the setting file specified by --config-path
-h, --helpPrint help information
-i, --interactiveUse interactive mode
--log-directory <LOG_DIRECTORY>Path to log directory for tracing FileAppender
--show-default-configPrints the default setting as TOML
SubcommandsDescription
cancel_navigation_goalCancel navigation goal
execute_commandExecute an external command
get_navigation_current_poseGet navigation current pose
get_stateGet joint positions and end pose if applicable
helpPrint this message or the help of the given subcommand(s)
listList available clients
load_commandsLoad commands from file and execute them
move_ikMove with ik Usage of move_ik
send_base_velocitySend base velocity Usage of send_base_velocity
send_jointsSend joint positions Usage of send_joints
send_joints_poseSend predefined joint positions Usage of send_joints_pose
send_navigation_goalSend navigation goal pose Usage of send_navigation_goal
shell_completionShell completion Usage of shell_completion
speakSpeak text message

Example

Start the robot on the simulator.

urdf-viz ./openrr-planner/sample.urdf &

urdf-viz

After that, load robot command.

openrr_apps_robot_command --config-path ./openrr-apps/config/sample_robot_client_config_for_urdf_viz.toml load_commands ./openrr-apps/command/sample_cmd_urdf_viz.txt

Example (--config)

Let's add a --config argument to the previous example. You can watch it run on urdf-viz, but for simplicity I have changed load_commands to list.

urdf-viz ./openrr-planner/sample.urdf &
openrr_apps_robot_command \
    --config-path ./openrr-apps/config/sample_robot_client_config_for_urdf_viz.toml \
    list

If you run it without doing anything first, you will get output like the first half of the previous section.

Raw joint trajectory clients
    r_arm
    l_arm
Joint trajectory clients
    r_arm
    r_arm_ik
    l_arm_collision_checked
    l_arm_ik
    r_arm_collision_checked
    l_arm
Collision check clients
    l_arm_collision_checked
    r_arm_collision_checked
Ik clients
    r_arm_ik
    l_arm_ik

The --config argument can override the contents of --config-path.

urdf-viz ./openrr-planner/sample.urdf &
openrr_apps_robot_command \
    --config-path ./openrr-apps/config/sample_robot_client_config_for_urdf_viz.toml \
    --config openrr_clients_config.ik_clients_configs[0].name=\"user_defined_ik\" \
    list

When this command is executed, the output is as follows

Raw joint trajectory clients
    l_arm
    r_arm
Joint trajectory clients
    l_arm
    r_arm_collision_checked
    l_arm_collision_checked
    r_arm
    r_arm_ik
    user_defined_ik
Collision check clients
    r_arm_collision_checked
    l_arm_collision_checked
Ik clients
    r_arm_ik
    user_defined_ik

The IK client name for the left arm has been changed to user_defined_ik. Of course this can also be accomplished by directly rewriting the toml file.

If you want to run it as load_commands, you need to change l_arm_ik to user_defined_ik in openrr-apps/command/sample_cmd_urdf_viz.txt.

Usage of move_ik

openrr_apps_robot_command move_ik [OPTIONS] <NAME>

Name

IK client name

Option

OptionsDescription
-d, --duration
-h, --helpPrint help information
-i, --interpolateInterpolate target in cartesian space
-l, --local
--max_resolution_for_interpolation <MAX_RESOLUTION_FOR_INTERPOLATION>Max resolution for interpolation (default 0.5)
--min_number_of_points_for_interpolation <MIN_NUMBER_OF_POINTS_FOR_INTERPOLATION>Min number of points for interpolation (default 10)
-r, --roll Target roll
-p, --pitch Target pitch
--yaw Target yaw
-x, --x Target x coordinate
-y, --y Target y coordinate
-z, --z Target z coordinate

Usage of send_base_velocity

openrr_apps_robot_command send_base_velocity [OPTIONS] <X> <Y> <THETA>

X

Velocity in y direction

Y

Velocity in y direction

Theta

Angular velocity

OptionsDescription
-d, --duration_secs <DURATION_SECS>
-h, --helpPrint help information

Usage send_joints

openrr_apps_robot_command send_joints [OPTIONS] <NAME>

Name

Client name

Option

OptionsDescription
-d, --duration
-h, --helpPrint help information
-i, --interpolateInterpolate target in cartesian space. If you use this flag, joint values are not used as references but used in forward kinematics
-j, --joint Specify joint parameters. Like --joint 0=1.2. In accordance with the sequence in which the "joint names" are defined in the configuration, they are numbered starting at 0
--max_resolution_for_interpolation <MAX_RESOLUTION_FOR_INTERPOLATION>Max resolution for interpolation (default 0.05)
--min_number_of_points_for_interpolation <MIN_NUMBER_OF_POINTS_FOR_INTERPOLATION>in number of points for interpolation(default 10)

Usage of send_joints_pose

openrr_apps_robot_command send_joints_pose [OPTIONS] <NAME> <POSE_NAME>

Name

Client name

Pose name

Pose name

Option

OptionsDescription
-d, --duration
-h, --helpPrint help information

Usage of send_navigation_goal

openrr_apps_robot_command send_navigation_goal [OPTIONS] <X> <Y> <YAW>

Option

OptionsDescription
-f, --frame_id <FRAME_ID>
-h, --helpPrint help information
-t, --timeout_secs <TIMEOUT_SECS>Timeout second

Usage of shell_completion

openrr_apps_robot_command shell_completion <SUBCOMMAND>

Subcommand

SubcommandDescription
bash
fish
helpPrint this message or the help of the given subcommand(s)
power_shell
zsh