This project is a hands-on exploration of robotics environments using the Gymnasium library, with a focus on MuJoCo-based environments. The goal is to learn how to set up, train, and evaluate reinforcement learning agents in these simulated robotic tasks.
- Understand the fundamentals of Gymnasium for robotics.
- Implement and train RL agents (e.g., using Stable Baselines3) on various robotics tasks.
- Learn how to evaluate the performance of trained agents.
- Explore different robotics environments like Fetch, ShadowHand, etc.
- Python 3.8+
- Git
-
Clone the repository (if you haven't already or for others to use):
git clone https://github.com/shubhamt2897/Gymnasium_Robotics_Tutorial.git cd Gymnasium_Robotics_Tutorial -
Create a virtual environment (recommended):
python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
-
Install dependencies: A
requirements.txtfile will be added here. For now, you can install the core libraries:pip install gymnasium[robotics] stable-baselines3[extra] # Add other specific libraries like moviepy if needed for recording # pip install moviepy
(Consider creating a
requirements.txtfile soon by runningpip freeze > requirements.txtafter installing your base packages).
This section will be updated as the project progresses. It will include instructions on:
- How to run training scripts (e.g.,
python train_agent.py --env <environment_id>). - How to run evaluation scripts (e.g.,
python evaluate_agent.py --model_path <path_to_model> --env <environment_id>). - How to use any Jupyter notebooks for experimentation.
# Placeholder for a quick example of how to load an environment
import gymnasium as gym
env = gym.make("FetchPickAndPlace-v3", render_mode="human") # Or any other env
observation, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample() # agent policy is here
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close()- Project initialized.
- Basic dependencies identified.
- Focusing on setting up the environment and initial training/evaluation scripts.
- Currently exploring ["FetchPickAndPlace-v3", "FetchSlide"and MaMuJoCo env].
- Develop a script for training an agent on a chosen robotics task.
- Develop a script for evaluating a trained agent.
- Add detailed instructions for running training and evaluation.
- Document results and observations.
- Explore more complex environments or tasks.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.