Skip to content

hojae-io/SpineLeggedRobot2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpineLeggedRobot2D

This repository is an open-source code for the course project of the MIT 2.74 Bio-inspired Robotics class.

Title: Galloping with Spine

Here, we implemented a 2D legged robot (2 legs) with a spinal joint and investigated the benefit of the spinal joint. The code stack is written in MATLAB and includes the derivation of the dynamics equation of motion, implementation of the simulator, and convex model predictive controller(MPC).

Contributors: Ho Jae Lee, Jaeyoun Choi, Harry Lee
Video Link: https://youtu.be/XR6XnnfqJGA


User Manual

How to Run the Simulation

  1. Choose the task ('rigid' or 'spine') in main.m
  2. Run main.m
  3. (Optional) If you change the dynamics in either buildLegDynamics_sym.m or buildSpineLegDynamics_sym.m, you have to run this script first individually. It will update codegen codes.
  4. Some keyboard controls:
    • L : forward velocity command
    • H : backward velocity command
    • R : reset environment
    • V : pause simulation
    • ESC : end simulation and save data

Results

Rigid robot:

         

Spine Robot:

         

You can check more analysis results in analysis folder.

Code Explanation

main.m : Main script that initiates Environment and Controller, and runs the experiment.
setupProject.m : Setup rigid robot.
setupProject_Spine.m : Setup spine robot.
buildLegDynamics_sym.m : Generate dynamics equation of motion for rigid robot using Lagrange equation of motion.
buildSpineLegDynamics_sym.m : Generate dynamics equation of motion for spine robot using Lagrange equation of motion.
Simulator.m : Class for dynamics simulator and renderer.
Logger.m : Class data logger and video recording
Environment.m : Class for overall environment. It inherits Simulator and contains Logger.
ConvexMPCController.m : Class for convex MPC controller.

About

2D Legged Robot with Spine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published