Skip to content

Commit 7915e1d

Browse files
committed
Minor fixes on the gravity compensation demo package
mode_configs.yaml - removed launch script - removed unused mode configs argument - removed unused get_interbotix_xsarm_models import readme - updated the description about the launch script arguments - updated the dummy namespace to match the launch script logic: we used the robot name as the namespace
1 parent 4916fd4 commit 7915e1d

File tree

3 files changed

+2
-37
lines changed

3 files changed

+2
-37
lines changed

interbotix_ros_xsarms/examples/interbotix_xsarm_gravity_compensation/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Please refer to the documentations for [`mode_configs`](https://docs.trossenrobo
1111

1212
## Usage
1313

14-
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`:
14+
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, and `motor_specs` defaults to `<path_to_this_package>/config/motor_specs_<robot_model>.yaml`:
1515
```
1616
ros2 launch interbotix_xsarm_gravity_compensation interbotix_gravity_compensation.launch.py robot_model:=xxx [robot_name:=xxx] [motor_specs:=xxx]
1717
```
1818
It runs the `gravity_compensation` node and launches the xsarm_control script to bring up the arm.
1919

2020
Then, enable/disable the gravity compensation with the following service call:
2121
```
22-
ros2 service call /<robot_model>/gravity_compensation_enable std_srvs/srv/SetBool 'data: [true/false]'
22+
ros2 service call /<robot_name>/gravity_compensation_enable std_srvs/srv/SetBool 'data: [true/false]'
2323
```
2424

2525
The arm will hold itself against gravity and can be moved freely when the gravity compensation is enabled.

interbotix_ros_xsarms/examples/interbotix_xsarm_gravity_compensation/config/mode_configs.yaml

-21
This file was deleted.

interbotix_ros_xsarms/examples/interbotix_xsarm_gravity_compensation/launch/interbotix_gravity_compensation.launch.py

-14
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
from launch_ros.actions import Node
4545
from launch_ros.substitutions import FindPackageShare
4646

47-
from interbotix_xs_modules.xs_common import get_interbotix_xsarm_models
48-
4947

5048
def launch_setup(context, *args, **kwargs):
5149
# Define the launch arguments
@@ -112,16 +110,4 @@ def generate_launch_description():
112110
description="the file path to the 'motor specs' YAML file.",
113111
)
114112
)
115-
declared_arguments.append(
116-
DeclareLaunchArgument(
117-
'mode_configs',
118-
default_value=[
119-
PathJoinSubstitution([
120-
FindPackageShare('interbotix_xsarm_gravity_compensation'),
121-
'config',
122-
'mode_configs.yaml'])
123-
],
124-
description="the file path to the 'mode configs' YAML file.",
125-
)
126-
)
127113
return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)])

0 commit comments

Comments
 (0)