# isaacLab.manipulation
**Repository Path**: Chaser30/isaacLab.manipulation
## Basic Information
- **Project Name**: isaacLab.manipulation
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-11-04
- **Last Updated**: 2025-01-06
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Manipulation Template for IsaacLab
[](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html)
[](https://isaac-sim.github.io/IsaacLab/)
[](https://docs.python.org/3/whatsnew/3.10.html)
[](https://releases.ubuntu.com/22.04/)
[](https://pre-commit.com/)
[](https://opensource.org/license/mit)
## Overview
This repository is based on the old version (orbit) of the orbit extension repository from isaaclab and provides a template for research on robot manipulation tasks. It is independent of isaaclab and allows for customization of the details of manipulation tasks.
## Setup
### Dependencies
This template depends on Isaac Sim and IsaacLab.
- [Isaac Sim](https://docs.omniverse.nvidia.com/isaacsim/latest/index.html)
It is recommended to install in a virtual environment. IsaacLab provides a default virtual environment that can be activated directly.
```bash
# Activate conda environment
conda activate isaaclab
```
### Download
```bash
cd isaacLab.manipulation
python -m pip install -e .
```
### Convert urdf to usd
```bash
# urdf files in isaacLab.manipulation/isaacLab/manipulation/assets/urdf
# usd files in isaacLab.manipulation/isaacLab/manipulation/assets/usd
python3 scripts/tools/convert_urdf.py urdf/your_urdf.urdf usd/your_usd.usd
```
### About isaac nucleus
If you dont want to use the assets in isaac nucleus, please comment the following code and replace it with your own assets path.
```bash
from omni.isaac.lab.utils.assets import ISAAC_NUCLEUS_DIR
# from isaacLab.manipulation.assets.config import your_robot
```
### RL Algorithm
Install [RSL_RL](https://github.com/leggedrobotics/rsl_rl) outside of the isaacLab repository, e.g. `home/code/rsl_rl`.
```bash
mkdir isaacLab.manipulation/isaacLab/manipulation/algorithms
cd isaacLab.manipulation/isaacLab/manipulation/algorithms
git clone https://github.com/leggedrobotics/rsl_rl.git
cd rsl_rl
python -m pip install -e .
## refresh index
cd isaacLab.manipulation
python -m pip install -e .
```
You can design your own RL Algorithm by editing "modules" and "algorithms" in RSL-RL
## Usage
```bash
#root of the package
cd isaacLab.manipulation
```
### 1. Convert your urdf to usd
```bash
python3 scripts/tools/convert_urdf.py urdf/your_urdf.urdf usd/your_usd.usd
```
### 2. Set up your robot or objects
```bash
cd isaacLab.manipulation/isaacLab/manipulation/assets/config
touch your_robot.py
# kinova_gipper.py is an example. You can copy the file and change robot_usd = "kinova_robotiq.usd" to your own usd and apply some changes in ArticulationCfg
```
And add env configs for each tasks
```bash
mkdir isaacLab.manipulation/isaacLab/manipulation/tasks/Robot_arm/your_tasks/config/your_robot_env
# kinova_gripper in reach task is an example
```
### 3. RL settings
You can modify *actions/rewards/observations/events/terminations* in the directory "mdp" to set up your own RL settings and you can manage them uniformly in "env_cfg" outside "mdp". These files modify the functions of the original isaaclab through rewritting and overloading.
### IMPORTANT ISSUES
1. 'RigidBodyView' object has no attribute 'get_accelerations.
Solution: Update Isaac Sim to version 4.2.0.
2. argument --cpu: conflicting option string: --cpu
Solution: Annotate the following code in *play.py* and *train.py*:
```python
parser.add_argument("--cpu", action="store_true", default=False, help="Use CPU pipeline.")
```
Then remove "use_gpu = not args_cli.cpu" in the following code:
```python
parse_env_cfg(args_cli.task, use_gpu=not args_cli.cpu, num_envs=args_cli.num_envs)
```
### 4. Train a policy.
4.1 RobotArm
```bash
python3 scripts/rsl_rl/train.py --task Template-Isaac-Reach-Kinova-v0 --num_envs 4096 --headless
```
```bash
python3 scripts/rsl_rl/train.py --task Template-Isaac-Reach-Franka-v0 --num_envs 4096 --headless
```
```bash
python3 scripts/rsl_rl/train.py --task Template-Isaac-Reach-UR10-v0 --num_envs 4096 --headless
```
4.2 Dextrous Hand
```bash
python3 scripts/rsl_rl/train.py --task Template-Isaac-Repose-Cube-Allegro-v0 --num_envs 4096 --headless
```
Isaac-Lift-Cube-Franka-v0
### 5. Play the trained policy.
5.1 RobotArm
```bash
python3 scripts/rsl_rl/play.py --task Template-Isaac-Reach-Kinova-Play-v0 --num_envs 16
```
```bash
# You can also use train.py if you dont need to add some additional configs.
python3 scripts/rsl_rl/play.py --task Template-Isaac-Reach-Franka-Play-v0 --num_envs 16
```
```bash
python3 scripts/rsl_rl/play.py --task Template-Isaac-Reach-Franka-Play-v0 --num_envs 16
```
5.2 Dextrous Hand
```bash
python3 scripts/rsl_rl/play.py --task Template-Isaac-Repose-Cube-Allegro-Play-v0 --num_envs 16
```
### 6. Continue training a exist model
replace the 3th and 4th row contents with your own model
```
python train.py --task Template-Isaac-Reach-Kinova-v0\
--resume True\
--load_run 2024-11-04_10-02-28\
--checkpoint model_999.pt\
--headless\
--num_envs 4096
```
## Author
**Author: Chaser
Email: 1059623944@qq.com**