This repository contains the setup and requirements for the RL_WS environment used for Reinforcement Learning (RL) tasks.
cd RL_WSUsing Conda:
conda env create -f environment.yml
conda activate RL_WSIf Conda is not available, you can use a virtual environment and pip:
python -m venv RL_WS
source RL_WS/bin/activate
pip install -r requirements- Python: 3.9
- GPU: NVIDIA GPU with CUDA 11.8+ (optional, for accelerated training)
- Frameworks: PyTorch (supports GPU acceleration)
After setup, test the environment with:
python -c "import mujoco, gym; print('MuJoCo and Gym are ready!')"For GPU support:
python -c "import torch; print(torch.cuda.is_available())"- The
environment.ymlfile ensures full compatibility with Conda. - Use the
requirementsfile for pip-based installations.
To modify Robosuite components, we track specific files from the Conda installation path using symbolic links. The changes are stored in:
RL_WS/robosuite_installation_path_changes/-
Robosuite Environment & Manipulation Tasks
- Modify
lift_box.py(custom RL environment). - Update
__init__.pyinsideenvironments/manipulation/.
- Modify
-
Custom Robot Model (Addverb Heal)
- Modify
addverb_heal/assets insiderobosuite_models/assets/robots/. - Update
addverb_heal_robot.pyinrobosuite_models/robots/manipulators/.
- Modify
- Ensure these files remain up to date with symbolic links (
ln -s). - If needed, copy them back to the Conda path before running experiments.
This repository includes RL training scripts for dual-arm manipulation using PPO (Proximal Policy Optimization).
Modify lift_box.py inside:
RL_WS/robosuite_installation_path_changes/robosuite/environments/manipulation/lift_box.pyKey function to edit:
def reward(self, action=None):
"""
Defines the reward function for RL training.
"""
...
return reward- Training: Edit
train_ppo.pyto adjust hyperparameters (learning rate, batch size, etc.). - Testing: Modify
test_ppo.pyto visualize and debug policies. - Vectorized Environments:
make_env.pysupports multiple instances for parallel training.
python train_ppo.pypython test_ppo.py- Use TensorBoard for real-time monitoring:
tensorboard --logdir=./ppo_tensorboard --port=6006