This project provides a simulation environment for a Hopper robot in Gazebo using ROS Kinetic, as well as Q-Learning algorithms to train the robot to perform various tasks. The project uses the OpenAI Gym package to create a gym environment for the robot simulation and implements Q-Learning algorithms to train the robot to perform various tasks.
- Follow the instructions for installing ROS Kinetic from the official ROS website based on your operating system: http://wiki.ros.org/kinetic/Installation
- Once ROS is installed, set up your ROS environment by sourcing the setup.bash file:
source /opt/ros/kinetic/setup.bash
- Install Gazebo using the following command:
sudo apt-get install gazebo9
- Install additional dependencies for Gazebo and ROS integration:
sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
- Install the OpenAI Gym package using the following command:
pip install gym
- Install additional dependencies required for the Hopper Robot Q-Learning project:
pip install numpy
- Clone this repository to your local machine:
git clone https://github.com/shiivashaakeri/Hopper_Robot_QLeaning.git
- Navigate to the root directory of your ROS workspace:
cd path/to/simulation_ws
- Build your workspace:
catkin_make
- Source the setup.bash file for your workspace:
source devel/setup.bash
- Launch the main launch file using roslaunch:
roslaunch my_hopper_training main.launch
Once the simulation is running, you can use the OpenAI Gym interface to interact with the simulation and train the robot using Q-Learning algorithms. The start_training_v2.py file contains the implementation of the Q-Learning algorithm and can be modified to train the robot for different tasks.