Skip to content

Commit

Permalink
Minor fixes on gravity compensation
Browse files Browse the repository at this point in the history
readme
- used the Github provided warning block
- added empty lines after headers

mode configs
- changed the port setting to the default /dev/ttyDXL
- merged the two mode configs file

launch
- limited choices to wx250s and aloha_wx250s
- improved readability for path concatenations

package.xml
- added dependency for interbotix_xsarm_control
  • Loading branch information
Shiming-Liang committed Oct 1, 2024
1 parent e69f2b4 commit 7632391
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# interbotix_xsarm_gravity_compensation

## Overview

This package demos the interbotix_gravity_compensation package on an Interbotix arm.
As of now, the supported arms include: WidowX-250 6DOF and ALOHA WidowX-250 6DOF.

## Configuration

Please refer to the documentations for [`mode_configs`](https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2/config.html#mode-configs) and [`motor_specs`](https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros2_packages/gravity_compensation.html#configuration) for details.

## Usage

Run the following launch command where `robot_model` is a mandatory choice between `aloha_wx250s` and `wx250s`, `robot_name` defaults to be the same as `robot_model` but can be anything, `motor_specs` defaults to `<path_to_this_package>/config/motor_specs_<robot_model>.yaml`, and `mode_configs` defaults to `<path_to_this_package>/config/mode_configs_<robot_model>.yaml`:
```
ros2 launch interbotix_xsarm_gravity_compensation interbotix_gravity_compensation.launch.py robot_model:=xxx [robot_name:=xxx] [motor_specs:=xxx]
Expand All @@ -22,6 +25,9 @@ ros2 service call /<robot_model>/gravity_compensation_enable std_srvs/srv/SetBoo
The arm will hold itself against gravity and can be moved freely when the gravity compensation is enabled.
It will lock in its current position when the gravity compensation is disabled.

**WARNING: the arm WILL torque off and drop for a short period of time while enabling/disabling. Please make sure it is in a resting position or manually held.**

**WARNING: the joints not supporting current control WILL torque off. Please make sure to use arm with at least the first three joints supporting current control, e.g., RX, WX, VX series.**
> [!WARNING]
> WARNING: the arm WILL torque off and drop for a short period of time while enabling/disabling. Please make sure it is in a resting position or manually held.
> [!WARNING]
> WARNING: the joints not supporting current control WILL torque off. Please make sure to use arm with at least the first three joints supporting current control, e.g., RX, WX, VX series.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# It should be placed in the 'config' directory of any ROS package that builds ontop of the interbotix_xs_sdk.
# Example values are shown as well. All parameters are mandatory unless stated otherwise

port: /dev/ttyDXL_awx250s # Optional; specifies the USB port that connects to the U2D2;
port: /dev/ttyDXL_awx250s # Optional; specifies the USB port that connects to the U2D2;
# if specified, it overwrites the port in the 'motor_configs' yaml file.
# if the 'port' parameter and its value are left out, the port in the 'motor_configs' yaml file is used.
# if the 'port' parameter is specified but the value is not, it defaults to '/dev/ttyDXL'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def generate_launch_description():
declared_arguments.append(
DeclareLaunchArgument(
'robot_model',
choices=get_interbotix_xsarm_models(),
choices=('wx250s', 'aloha_wx250s'),
description='model type of the Interbotix Arm such as `wx200` or `rx150`.'
)
)
Expand All @@ -104,13 +104,12 @@ def generate_launch_description():
declared_arguments.append(
DeclareLaunchArgument(
'motor_specs',
default_value=[
PathJoinSubstitution([
FindPackageShare('interbotix_xsarm_gravity_compensation'),
'config']),
"/motor_specs_",
default_value=[PathJoinSubstitution([
FindPackageShare('interbotix_xsarm_gravity_compensation'),
'config',
"motor_specs_"]),
LaunchConfiguration('robot_model'),
".yaml"
'.yaml'
],
description="the file path to the 'motor specs' YAML file.",
)
Expand All @@ -121,10 +120,8 @@ def generate_launch_description():
default_value=[
PathJoinSubstitution([
FindPackageShare('interbotix_xsarm_gravity_compensation'),
'config']),
"/mode_configs_",
LaunchConfiguration('robot_model'),
".yaml"
'config',
'mode_configs.yaml'])
],
description="the file path to the 'mode configs' YAML file.",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>
<depend>interbotix_gravity_compensation</depend>
<depend>interbotix_xsarm_control</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down

0 comments on commit 7632391

Please sign in to comment.