feat: add test tube pick task with custom assets and grasp annotations
- Add pick_test_tube task: USDC asset repackaging, grasp generation, task config - Add tools: usdc_to_obj.py, repackage_test_tube.py, fix_test_tube_materials.py - Add custom_task_guide.md: full Chinese documentation for creating custom tasks - Add crawled InternDataEngine online docs (23 pages) - Add grasp generation script (gen_tube_grasp.py) and pipeline config
This commit is contained in:
209
docs_crawled/api_controllers.md
Normal file
209
docs_crawled/api_controllers.md
Normal file
@@ -0,0 +1,209 @@
|
||||
# Source: https://internrobotics.github.io/InternDataEngine-Docs/api/controllers.html
|
||||
|
||||
# Controllers API Reference [](#controllers-api-reference)
|
||||
|
||||
This page provides API documentation for the controller module.
|
||||
|
||||
## TemplateController [](#templatecontroller)
|
||||
|
||||
Base class for all robot arm controllers.
|
||||
|
||||
### Constructor [](#constructor)
|
||||
python
|
||||
```
|
||||
TemplateController(cfg, task, robot_file: str, **kwargs)
|
||||
```
|
||||
1
|
||||
|
||||
**Parameters: **
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| `cfg ` | DictConfig | Controller configuration |
|
||||
| `task ` | BananaBaseTask | Task instance |
|
||||
| `robot_file ` | str | Path to CuRobo robot config |
|
||||
|
||||
### Properties [](#properties)
|
||||
|
||||
| Property | Type | Description |
|
||||
| `raw_js_names ` | List[str] | Joint names in CuRobo order |
|
||||
| `cmd_js_names ` | List[str] | Joint names in simulation order |
|
||||
| `arm_indices ` | np.ndarray | Arm joint indices |
|
||||
| `gripper_indices ` | np.ndarray | Gripper joint indices |
|
||||
| `_gripper_state ` | float | Gripper state (1.0=open, -1.0=closed) |
|
||||
|
||||
### Methods [](#methods)
|
||||
|
||||
#### `_configure_joint_indices(robot_file: str) `[](#configure-joint-indices-robot-file-str)
|
||||
|
||||
Configure joint names and indices. **Must be implemented by subclass. **
|
||||
|
||||
#### `_get_default_ignore_substring() -> List[str] `[](#get-default-ignore-substring-list-str)
|
||||
|
||||
Return default collision filter substrings. **Must be implemented by subclass. **
|
||||
|
||||
#### `get_gripper_action() -> np.ndarray `[](#get-gripper-action-np-ndarray)
|
||||
|
||||
Map gripper state to joint targets. **Must be implemented by subclass. **
|
||||
|
||||
#### `_load_world(use_default: bool = True) `[](#load-world-use-default-bool-true)
|
||||
|
||||
Load world configuration for motion planning.
|
||||
|
||||
**Returns: **`WorldConfig `
|
||||
|
||||
#### `_get_motion_gen_collision_cache() -> dict `[](#get-motion-gen-collision-cache-dict)
|
||||
|
||||
Return collision cache sizes.
|
||||
|
||||
**Returns: **`{"obb": int, "mesh": int} `
|
||||
|
||||
#### `_get_grasp_approach_linear_axis() -> int `[](#get-grasp-approach-linear-axis-int)
|
||||
|
||||
Return grasp approach axis (0=x, 1=y, 2=z).
|
||||
|
||||
**Returns: **`int `(default: 2)
|
||||
|
||||
#### `_get_sort_path_weights() -> Optional[List[float]] `[](#get-sort-path-weights-optional-list-float)
|
||||
|
||||
Return weights for path selection.
|
||||
|
||||
**Returns: **`List[float] `or `None `
|
||||
|
||||
#### `plan_to_pose(target_pose) `[](#plan-to-pose-target-pose)
|
||||
|
||||
Plan motion to target pose.
|
||||
|
||||
**Parameters: **
|
||||
|
||||
- `target_pose `: Tuple of (position, orientation)
|
||||
|
||||
**Returns: **`bool `- Success status
|
||||
|
||||
#### `execute_plan() `[](#execute-plan)
|
||||
|
||||
Execute the planned trajectory.
|
||||
|
||||
#### `set_gripper_state(state: float) `[](#set-gripper-state-state-float)
|
||||
|
||||
Set gripper state.
|
||||
|
||||
**Parameters: **
|
||||
|
||||
- `state `: 1.0 for open, -1.0 for closed
|
||||
|
||||
#### `get_current_joint_state() -> np.ndarray `[](#get-current-joint-state-np-ndarray)
|
||||
|
||||
Get current joint positions.
|
||||
|
||||
**Returns: **`np.ndarray `of joint positions
|
||||
|
||||
## Lift2Controller [](#lift2controller)
|
||||
|
||||
Controller for ARX-Lift2 dual-arm robot.
|
||||
python
|
||||
```
|
||||
@register_controller
|
||||
class Lift2Controller(TemplateController):
|
||||
def _get_grasp_approach_linear_axis(self) -> int:
|
||||
return 0 # x-axis
|
||||
```
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
**Features: **
|
||||
|
||||
- Dual-arm support
|
||||
- Custom world configuration
|
||||
- X-axis grasp approach
|
||||
|
||||
## SplitAlohaController [](#splitalohacontroller)
|
||||
|
||||
Controller for Agilex Split Aloha dual-arm robot.
|
||||
python
|
||||
```
|
||||
@register_controller
|
||||
class SplitAlohaController(TemplateController):
|
||||
def _get_grasp_approach_linear_axis(self) -> int:
|
||||
return 2 # z-axis
|
||||
```
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
**Features: **
|
||||
|
||||
- Dual-arm support
|
||||
- Z-axis grasp approach
|
||||
- Optional joint control
|
||||
|
||||
## Genie1Controller [](#genie1controller)
|
||||
|
||||
Controller for Genie1 dual-arm robot.
|
||||
python
|
||||
```
|
||||
@register_controller
|
||||
class Genie1Controller(TemplateController):
|
||||
def _get_sort_path_weights(self) -> List[float]:
|
||||
return [1, 1, 1, 1, 3, 3, 1]
|
||||
```
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
**Features: **
|
||||
|
||||
- 7-DOF per arm
|
||||
- Path selection weights
|
||||
- Custom world configuration
|
||||
|
||||
## FR3Controller [](#fr3controller)
|
||||
|
||||
Controller for Franka FR3 single-arm robot.
|
||||
python
|
||||
```
|
||||
@register_controller
|
||||
class FR3Controller(TemplateController):
|
||||
def _get_motion_gen_collision_cache(self):
|
||||
return {"obb": 1000, "mesh": 1000}
|
||||
```
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
**Features: **
|
||||
|
||||
- Single-arm support
|
||||
- Panda gripper
|
||||
- Larger collision cache
|
||||
|
||||
## FrankaRobotiq85Controller [](#frankarobotiq85controller)
|
||||
|
||||
Controller for Franka with Robotiq 2F-85 gripper.
|
||||
python
|
||||
```
|
||||
@register_controller
|
||||
class FrankaRobotiq85Controller(TemplateController):
|
||||
def get_gripper_action(self):
|
||||
return np.clip(
|
||||
-self._gripper_state * self._gripper_joint_position,
|
||||
0.0, 5.0
|
||||
)
|
||||
```
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
|
||||
**Features: **
|
||||
|
||||
- Single-arm support
|
||||
- Robotiq 2F-85 gripper
|
||||
- Inverted gripper mapping
|
||||
Reference in New Issue
Block a user