This package provides an interface to control a Doosan robotic arm in IsaacSim with APIs for task management, trajectory planning, and gripper control. The copilot_ui.html provides a web interface to trigger these APIs, making simulation control easy and efficient.
- ๐ฆ Clone the Repository
- ๐ ๏ธ Setting Up the Extension
- ๐ก API Interaction Through Web Interface
- ๐ Accessing the Web Interface
- ๐ก Available API Endpoints
- ๐ Fetching Task Data (
/get_task_data) - ๐ Parameter Details for
get_task_data - ๐ฎ Web Interface Usage
To clone the repository, run:
git clone <repository_url>- Open IsaacSim.
- Navigate to
Window > Extensions. - Click on the three lines (menu) icon and select
Settings. - Click the plus icon and enter the path to the extension:
~/Isaacsim-AIHand/robotics/ai/sim/exts - Search for
AI-HAND. - Select the
THIRD PARTYtab. - Enable the extension by checking
DISABLEDandAUTOLOAD.
To install the necessary dependencies, use the following commands:
~/.local/share/ov/pkg/isaac-sim-4.2.0/python.sh -m pip install python-xlib
~/.local/share/ov/pkg/isaac-sim-4.2.0/python.sh -m pip install pyautogui
~/.local/share/ov/pkg/isaac-sim-4.2.0/python.sh -m pip install openaiThe APIs can be accessed through a web interface hosted by the extension at:
http://0.0.0.0/simple_ui
- Load Scenarios: Start a scenario with a single click.
- Plan and Execute Tasks: Plan a trajectory and execute the task in the simulation.
- Move to Home and Toggle Gripper: Send the robot to the home position and toggle the gripper.
- Update Task/Scenario Name: Dynamically update the task and scenario configurations.
- Visualize Trajectories: Enable gripper and trajectory co-pilot for enhanced visual feedback.
http://0.0.0.0/simple_ui
- The interface is automatically available when the extension starts.
- Access it in your browser to control and interact with the robot.
| Method | Endpoint | Description |
|---|---|---|
PUT |
/load_scenario |
Load the selected scenario. |
PUT |
/move_to_home |
Move robot to home position. |
PUT |
/reset |
Reset system state. |
PUT |
/plan |
Plan trajectory based on selected task. |
PUT |
/execute |
Execute planned trajectory. |
PUT |
/enable_gripper_copilot |
Enable gripper co-pilot. |
PUT |
/enable_trajectory_copilot |
Enable trajectory co-pilot. |
PUT |
/select_move |
Select move operation. |
PUT |
/select_rotate |
Select rotate operation. |
PUT |
/task_name |
Set task name for execution. |
PUT |
/scenario_name |
Set scenario name. |
PUT |
/cobot_config |
Update cobot IP address and port. |
GET |
/get_task_data |
Retrieve current task data from the robot. |
GET /get_task_data
{
"objects_to_spawn": {
"ketchup": [-0.336, -0.589, 0.174],
"slice of toast": [-0.438, -0.785, 0.147]
},
"fundamental_actions": {
"grasp": {
"is_trajectory": false,
"coordinates": [-0.336, -0.589, 0.144],
"csv_data": "",
"gripper_mode_post_action": 2,
"grasp_mode": "HORIZONTAL"
},
"pour": {
"is_trajectory": true,
"coordinates": [-0.438, -0.785, 0.117],
"csv_data": "X,Y,Z,C\n-362.5,-614.7,120.05,175.4\n-362.9,-614.2,121.3,177.0",
"gripper": 0,
"grasp_mode": "HORIZONTAL"
}
}
}- Type:
Dictionary - Description: Defines objects that need to be spawned in the simulation.
- Key: Object name (e.g.,
ketchup,slice of toast). - Value: List of coordinates
[X, Y, Z]in meters.
- Type:
Dictionary - Description: Specifies actions that the robot can perform, including grasp and pour.
- Key: Task name (e.g.,
grasp,pour). - Value: Task parameters to define the action.
- Type:
Boolean - Description: Indicates whether the action is a trajectory-based task (
true) or a position-based task (false).
- Type:
List[float, float, float] - Description: Target coordinates
[X, Y, Z]in meters. - Used if
is_trajectoryisfalse.
- Type:
String - Description: CSV-formatted string defining trajectory waypoints.
- Required if
is_trajectoryistrue.
- Type:
Integer - Description: Determines gripper action after task completion.
- Possible values:
0- No change to gripper state.1- Open gripper after task.2- Close gripper after task.
- Type:
String - Description: Defines how the gripper should approach the object.
- Possible values:
"HORIZONTAL"โ Gripper approaches horizontally."VERTICAL"โ Gripper approaches vertically.
- Click on
Load Scenarioto start the selected scenario. - API:
PUT /load_scenario
- Click on
Resetto reset the simulation to the initial state. - API:
PUT /reset
- Use
Planto plan a trajectory andExecuteto execute it. - APIs:
PUT /planPUT /execute
- Move the robot to its home position.
- API:
PUT /move_to_home
- Toggle the gripper state (open/close).
- API:
PUT /toggle_gripper
- Update task or scenario name dynamically.
- APIs:
PUT /task_namePUT /scenario_name
- Enable real-time gripper and trajectory visualization.
- APIs:
PUT /enable_gripper_copilotPUT /enable_trajectory_copilot
โก Performance Tip:
- Limit trajectory points to avoid high computation times.
- Use downsampling to reduce trajectory data.
- Ensure cobot IP and port are correctly set before execution.
๐ Troubleshooting:
- Check
/docsfor API details. - Inspect
copilot_server.logfor errors.
