Skip to content

pjhae/Raisim_Hexapod_and_deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raisim_Hexapod

2021 SNU URP project winner

· Implementation of walking of a Hexapod robot using RL

· Sim-to-real gap minimization through simulation parameter tuning.

Requirements

Installation : RAISIM [link] + (linux)

  1. Move to
YOUR_PATH/raisimLib/raisimGymTorch/raisimGymTorch/
  1. Clone the repository in
YOUR_PATH/raisimLib/raisimGymTorch/raisimGymTorch/
  1. Move [hexapod] directory to
YOUR_PATH/raisimLib/rsc/
  1. Set up environment
cd YOUR_PATH/raisimLib/raisimGymTorch/
python setup.py develop
  1. Train/Test
cd YOUR_PATH/raisimLib/raisimGymTorch/env/envs/hexapod_command_locomotion
(Training) python runner.py
(Test) python tester.py -w [model_PATH]
  1. (optional) Deployment
cd YOUR_PATH/raisimLib/raisimGymTorch/env/envs/hexapod_command_locomotion
python deploy.py -w [model_PATH]

0. Setup

Robot Hardware : PhantomX-MK3 [INFO]

Communication : Dynamixel SDK(#18 of AX-12A) & PC by U2D2 [INFO]

image

Solidworks to URDF : All links and joints are manually reverse engineered using assembly file from GRABCAD [link]

1. Motor parameter tuning Algorithm

ASSUMTION 1 : The main cause of the Sim-to-Real gap is the inaccuracy of motor modeling and the latency of the timestep. [Related Paper]

ASSUMTION 2 : By matching the time step of the simulation and the actual robot equally at 0.05 seconds, it can be assumed that the Sim-to-Real gap is caused only by the inaccuracy of motor modeling.

image

Setting : With the main body of the robot is fixed, the same action sequence is applied to the simulation and the actual robot.

2. Training

image

RL algorithm : PPO

State : Current Joint position(18) + Action history(18*3) + Command(3)

Command : One hot vector (100 : go-straight , 010 : turn left , 001 : turn right)

Action : Joint position(18)

  • Joint position is continuous (−150 ≤ 𝜃 ≤ 150) degree considering AX-12A motor spec sheet [INFO]

3. Results - (Motor parameter tuning)

image

4. Results - (Simulation)

rotate walking

5. Results - (Real robot deployment)

Video : YOUTUBE link

You can watch video through the link above!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages