Skip to content

Commit fa6ea6b

Browse files
authored
add : api-ref doc (#489)
1 parent 1e55b22 commit fa6ea6b

16 files changed

Lines changed: 882 additions & 227 deletions

website/docs/api-reference/cli.mdx

Lines changed: 500 additions & 0 deletions
Large diffs are not rendered by default.

website/docs/api-reference/controls.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

website/docs/api-reference/description.mdx

Lines changed: 133 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import BlockImage from '@site/src/components/BlockImage';
1010

1111
## Overview
1212

13-
This [OpenArm description](https://github.com/enactic/openarm_description) package contains URDF/xacro description files for the OpenArm robot system,
14-
supporting both single-arm and bimanual configurations.
13+
This [OpenArm description](https://github.com/enactic/openarm_description) package contains URDF/xacro description files for the OpenArm robot system, supporting both v1.0 and v2.0 hardware in bimanual configuration.
1514

1615
## Table of Contents
1716

@@ -22,43 +21,65 @@ supporting both single-arm and bimanual configurations.
2221

2322
---
2423

25-
## Xacro Structure
24+
## Supported Robot Versions
25+
26+
| Version | `arm_type` values | Configuration style |
27+
|---|---|---|
28+
| OpenArm v1.0 | `v10`, `v1.0`, `v1_0`, `openarm_v10`, `openarm_v1.0` | Per-argument (`ee_type`, ...) |
29+
| OpenArm v2.0 | `v20`, `v2.0`, `v2_0`, `openarm_v20`, `openarm_v2.0` | Preset-based (`robot_preset`) |
2630

27-
The package follows a hierarchical xacro structure with the following organization.
31+
Both versions share the same launch file and entry point. The `arm_type` argument determines which hardware and xacro files are loaded.
2832

29-
### Robot (Overarching Structure)
33+
---
34+
35+
## Xacro Structure
3036

31-
- `robot/openarm_robot.xacro` - Main robot macro that orchestrates all components
32-
- `robot/v10.urdf.xacro` - Entry point for v1.0 arm configuration
37+
Assets are organized per robot version under `assets/robot/`:
3338

34-
### Component Structure
39+
```
40+
assets/
41+
├── robot/
42+
│ ├── openarm_v1.0/
43+
│ │ ├── config/ # Kinematics, joint limits, inertials
44+
│ │ ├── mesh/ # STL and DAE mesh files
45+
│ │ └── urdf/
46+
│ │ ├── openarm_v10.urdf.xacro # Entry point for v1.0
47+
│ │ ├── arm/
48+
│ │ ├── body/
49+
│ │ ├── ee/
50+
│ │ └── ros2_control/
51+
│ └── openarm_v2.0/
52+
│ ├── config/
53+
│ │ ├── arm/ # Joint limits, inertials, kinematics
54+
│ │ ├── body/ # Body link parameters
55+
│ │ └── robot_presets/ # Preset YAML files
56+
│ ├── meshes/ # STL and DAE mesh files
57+
│ └── urdf/
58+
│ ├── openarm_v20.urdf.xacro # Entry point for v2.0
59+
│ ├── ros2_control/
60+
│ └── utils/
61+
└── end_effector/
62+
├── parallel_link/ # Used in v1.0
63+
└── pinch_gripper/ # Used in v2.0
64+
```
3565

36-
- `arm/` - Arm kinematics, joints, and links
37-
- `openarm_arm.xacro` - Arm assembly
38-
- `openarm_macro.xacro` - Arm macro definitions
39-
- `body/` - Robot base/body components
40-
- `openarm_body.xacro` - Body assembly
41-
- `openarm_body_macro.xacro` - Body macro definitions
42-
- `ee/` - End-effector components
43-
- `openarm_hand.xacro` - OpenArm hand gripper
44-
- `openarm_hand_macro.xacro` - Hand macro definitions
45-
- `ee_with_one_link.xacro` - Simple single-link end-effector
46-
- `ros2_control/` - ROS2 Control with hardware interfaces
47-
- `openarm.ros2_control.xacro` - Single arm control interface
48-
- `openarm.bimanual.ros2_control.xacro` - Bimanual control interface
66+
### v2.0 Robot Presets
4967

50-
### Configuration Files
68+
v2.0 uses a preset-based system. A single `robot_preset` argument selects the full robot configuration:
5169

52-
- `config/arm/v10/` - v1.0 arm parameters (kinematics, limits, inertials)
53-
- `config/body/v10/` - v1.0 body parameters
54-
- `config/hand/openarm_hand/` - Hand configuration
70+
| Preset | Description |
71+
|---|---|
72+
| `default_bimanual` | Both left and right arms (default) |
73+
| `right_arm` | Right arm only |
74+
| `left_arm` | Left arm only |
75+
| `right_arm_with_pinch_gripper` | Right arm with pinch gripper |
76+
| `left_arm_with_pinch_gripper` | Left arm with pinch gripper |
5577

5678
---
5779

5880
## Installation
5981

60-
To use this package, make sure you have: [ROS2 installed](ros2/install)
61-
Then set up the workspace:
82+
To use this package, make sure you have [ROS2 installed](ros2/install). Then set up the workspace:
6283

6384
```bash
6485
# Set up environment variables if you haven't already (customize as needed)
@@ -86,130 +107,141 @@ source $ROS_WS/install/setup.bash
86107

87108
## Universal Robot Description Files (URDF)
88109

89-
The coordinate transforms of each link and joint constraints of OpenArm are defined in the URDF. ROS2 uses a XML macro language called xacro to generate these files.
110+
The coordinate transforms of each link and joint constraints of OpenArm are defined in the URDF. ROS2 uses an XML macro language called xacro to generate these files.
90111

91-
### Generate URDF Files
112+
### Visualization
92113

93-
#### Single Arm Configuration
114+
To display the robot in RViz with a simple joint state GUI:
94115

95-
```bash
96-
# Basic single arm with hand
97-
xacro $ROS_WS/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=false > openarm_single.urdf
116+
:::tip
117+
If you're receiving errors regarding the `.dae` files, try changing mesh formats to `.stl` or `.obj`.
118+
:::
98119

99-
# Single arm without end-effector
100-
xacro $ROS_WS/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=false ee_type:=none > openarm_single_no_ee.urdf
120+
#### OpenArm v2.0
101121

102-
# Single arm with ROS2 control
103-
xacro $ROS_WS/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=false ros2_control:=true can_interface:=can0 > openarm_single_control.urdf
104-
```
122+
```bash
123+
# Bimanual (default)
124+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v2.0
105125

106-
#### Bimanual Configuration
126+
# Right arm only
127+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v2.0 robot_preset:=right_arm
107128

108-
```bash
109-
# Basic bimanual setup
110-
xacro $ROS_WS/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=true > openarm_bimanual.urdf
129+
# Left arm only
130+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v2.0 robot_preset:=left_arm
111131

112-
# Bimanual with ROS2 control
113-
xacro $ROS_WS/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=true ros2_control:=true left_can_interface:=can1 right_can_interface:=can0 > openarm_bimanual_control.urdf
132+
# Right arm with pinch gripper
133+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v2.0 robot_preset:=right_arm_with_pinch_gripper
114134

115-
# Bimanual with fake hardware for simulation
116-
xacro $ROS_WS/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=true ros2_control:=true use_fake_hardware:=true > openarm_bimanual_sim.urdf
117-
```
135+
# Left arm with pinch gripper
136+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v2.0 robot_preset:=left_arm_with_pinch_gripper
118137

119-
### Visualization
120-
To display the robot in RViz with a simple joint state GUI:
138+
# Bimanual with grasp frame
139+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v2.0 emit_grasp_frame:=true
140+
```
121141

122-
:::tip
123-
If you're receiving errors regarding the `.dae` files, try changing mesh formats to `.stl` or `.obj`.
124-
:::
142+
<BlockImage src="software/description/bimanual_v2.0.png" alt="OpenArm v2.0 Bimanual URDF RViz" width="85%" />
125143

126-
#### Single Arm
144+
#### OpenArm v1.0
127145

128146
```bash
129-
# Display single arm with hand
130-
ros2 launch openarm_description display_openarm.launch.py arm_type:=v10 bimanual:=false
131-
132-
# Display single arm without end-effector
133-
ros2 launch openarm_description display_openarm.launch.py arm_type:=v10 bimanual:=false ee_type:=none
147+
ros2 launch openarm_description display_openarm.launch.py arm_type:=v1.0
134148
```
135149

136-
<BlockImage src="software/description/single-arm-urdf-rviz.png" alt="Single Arm URDF Rviz" width="65%" />
150+
<BlockImage src="software/description/bimanual_v1.0.png" alt="OpenArm v1.0 Bimanual URDF RViz" width="85%" />
137151

152+
### Generate URDF Files
138153

139-
#### Bimanual
154+
#### OpenArm v2.0
140155

141156
```bash
142-
# Display bimanual configuration
143-
ros2 launch openarm_description display_openarm.launch.py arm_type:=v10 bimanual:=true
157+
# Bimanual
158+
xacro $(ros2 pkg prefix openarm_description)/share/openarm_description/assets/robot/openarm_v2.0/urdf/openarm_v20.urdf.xacro \
159+
robot_preset:=default_bimanual > openarm_v20_bimanual.urdf
144160

145-
# Display bimanual without end-effectors
146-
ros2 launch openarm_description display_openarm.launch.py arm_type:=v10 bimanual:=true ee_type:=none
147-
```
161+
# Right arm only
162+
xacro $(ros2 pkg prefix openarm_description)/share/openarm_description/assets/robot/openarm_v2.0/urdf/openarm_v20.urdf.xacro \
163+
robot_preset:=right_arm > openarm_v20_right_arm.urdf
148164

149-
<BlockImage src="software/description/bimanual-urdf-rviz.png" alt="Bimanual URDF Rviz" width="65%" />
165+
# Right arm with pinch gripper
166+
xacro $(ros2 pkg prefix openarm_description)/share/openarm_description/assets/robot/openarm_v2.0/urdf/openarm_v20.urdf.xacro \
167+
robot_preset:=right_arm_with_pinch_gripper > openarm_v20_right_arm_pinch.urdf
168+
```
150169

151-
### Exporting URDFs
170+
#### OpenArm v1.0
152171

153-
Sometimes, it may be necessary to export a URDF for use in other applications. To generate a new URDF file, run the xacro command with arguments.
172+
```bash
173+
# Bimanual
174+
xacro $(ros2 pkg prefix openarm_description)/share/openarm_description/assets/robot/openarm_v1.0/urdf/openarm_v10.urdf.xacro \
175+
arm_type:=v10 > openarm_v10_bimanual.urdf
154176

155-
To generate a bimanual URDF:
156-
```sh
157-
URDF_OUT=openarm_bimanual.urdf
158-
xacro ~/ros2_ws/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 bimanual:=true > $URDF_OUT
159-
```
177+
# Bimanual with ROS2 control
178+
xacro $(ros2 pkg prefix openarm_description)/share/openarm_description/assets/robot/openarm_v1.0/urdf/openarm_v10.urdf.xacro \
179+
arm_type:=v10 ros2_control:=true left_can_interface:=can1 right_can_interface:=can0 > openarm_v10_bimanual_control.urdf
160180

161-
Or a single arm URDF:
162-
```sh
163-
URDF_OUT=openarm.urdf
164-
xacro ~/ros2_ws/src/openarm_description/urdf/robot/v10.urdf.xacro arm_type:=v10 > $URDF_OUT
181+
# Bimanual with fake hardware for simulation
182+
xacro $(ros2 pkg prefix openarm_description)/share/openarm_description/assets/robot/openarm_v1.0/urdf/openarm_v10.urdf.xacro \
183+
arm_type:=v10 ros2_control:=true use_fake_hardware:=true > openarm_v10_bimanual_sim.urdf
165184
```
166185

167186
---
168187

169188
## Available Arguments
170189

171-
Below are some configurable variables for the OpenArm robot description that allows customization when generating URDFs with xacro.
190+
Below are some configurable variables for the OpenArm robot description that allow customization when generating URDFs with xacro.
191+
192+
### Common Arguments
193+
194+
| Argument | Default | Description |
195+
|---|---|---|
196+
| `arm_type` | `v20` | Robot version. See [Supported Robot Versions](#supported-robot-versions) for accepted values. |
197+
| `rviz_config` | `bimanual.rviz` | RViz config file to load |
172198

173-
### Core Arguments
199+
### v2.0 Arguments
174200

175-
- `arm_type` - Arm version (eg.: "v10")
176-
- `body_type` - Body version (eg.: "v10")
177-
- `ee_type` - End-effector type (default: "openarm_hand", options: "openarm_hand", "none")
178-
- `bimanual` - Enable bimanual configuration (default: false)
201+
| Argument | Default | Description |
202+
|---|---|---|
203+
| `robot_preset` | `default_bimanual` | Robot configuration preset (see preset table above) |
204+
| `collapse_internal_empty_links` | `true` | Collapse empty intermediate links in the URDF |
205+
| `emit_grasp_frame` | `false` | Add a grasp frame link to the end-effector |
179206

180-
### ROS2 Control Arguments
207+
### v1.0 Arguments
181208

182-
- `ros2_control` - Enable ROS2 control hardware interface (default: false)
183-
- `use_fake_hardware` - Use fake hardware for simulation (default: false)
184-
- `fake_sensor_commands` - Enable fake sensor commands (default: false)
185-
- `can_interface` - CAN interface for single arm (default: "can0")
186-
- `left_can_interface` - CAN interface for left arm in bimanual setup (default: "can1")
187-
- `right_can_interface` - CAN interface for right arm in bimanual setup (default: "can0")
209+
| Argument | Default | Description |
210+
|---|---|---|
211+
| `ros2_control` | `false` | Enable ROS2 control hardware interface |
212+
| `use_fake_hardware` | `false` | Use fake hardware for simulation |
213+
| `fake_sensor_commands` | `false` | Enable fake sensor commands |
214+
| `left_can_interface` | `can1` | CAN interface for left arm |
215+
| `right_can_interface` | `can0` | CAN interface for right arm |
188216

189-
### Positioning Arguments
217+
### v1.0 Positioning Arguments
190218

191-
- `parent` - Parent frame (default: "world")
192-
- `xyz` - Position offset (default: "0 0 0")
193-
- `rpy` - Orientation offset (default: "0 0 0")
194-
- `left_arm_base_xyz` - Left arm base position (default: "0.0 0.031 0.698")
195-
- `left_arm_base_rpy` - Left arm base orientation (default: "-1.5708 0 0")
196-
- `right_arm_base_xyz` - Right arm base position (default: "0.0 -0.031 0.698")
197-
- `right_arm_base_rpy` - Right arm base orientation (default: "1.5708 0 0")
219+
| Argument | Default | Description |
220+
|---|---|---|
221+
| `parent` | `world` | Parent frame |
222+
| `xyz` | `0 0 0` | Position offset |
223+
| `rpy` | `0 0 0` | Orientation offset |
224+
| `left_arm_base_xyz` | `0.0 0.031 0.698` | Left arm base position |
225+
| `left_arm_base_rpy` | `-1.5708 0 0` | Left arm base orientation |
226+
| `right_arm_base_xyz` | `0.0 -0.031 0.698` | Right arm base position |
227+
| `right_arm_base_rpy` | `1.5708 0 0` | Right arm base orientation |
228+
229+
---
198230

199-
### Running Multiple Robots with ROS Namespaces and ROS_DOMAIN_ID
231+
## Running Multiple Robots with ROS Namespaces and ROS_DOMAIN_ID
200232

201233
When running multiple instances of OpenArm, one option is to namespace arms to control multiple sets of arms with one device.
202234

203235
For example, when running multiple instances of bimanual, it is possible to namespace packages with:
204236

205237
```sh
206-
ros2 launch openarm_description openarm.bimanual.launch.py arm_prefix:=leader right_can_interface:=can0 left_can_interface:=can1
238+
ros2 launch openarm_bringup openarm.bimanual.launch.py arm_type:=v2.0 arm_prefix:=leader right_can_interface:=can0 left_can_interface:=can1
207239
```
208240

209241
and
210242

211243
```sh
212-
ros2 launch openarm_description openarm.bimanual.launch.py arm_prefix:=follower right_can_interface:=can2 left_can_interface:=can3
244+
ros2 launch openarm_bringup openarm.bimanual.launch.py arm_type:=v2.0 arm_prefix:=follower right_can_interface:=can2 left_can_interface:=can3
213245
```
214246

215247
If network isolation is required (e.g. multiple sets of OpenArm teleoperation), the [ROS_DOMAIN_ID](https://docs.ros.org/en/humble/Concepts/Intermediate/About-Domain-ID.html) environment variable can be set.

website/docs/api-reference/index.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@ Middleware for connecting OpenArm with the broader ROS2 ecosystem. Enables compa
5656
---
5757

5858

59-
### Advanced Controls
60-
61-
**[Learn more under Controls →](controls)**
62-
63-
Control guides and algorithms for OpenArm systems. This is an active area of development where we're implementing and testing various control approaches.
64-
65-
- **In development**: System identification guide, gravity compensation, cartesian space control
66-
- **Help wanted**: Algorithm implementations, validation testing, control theory expertise
67-
68-
---
69-
7059

7160
## 🤝 Join the Community
7261

0 commit comments

Comments
 (0)