Coder Social home page Coder Social logo

lagrange-dynamics-of-quadruped-single-leg-'s Introduction

Quadruped Robot Single-Leg Lagrangian Symbolic Formulas Generator

This MATLAB program generates symbolic Lagrangian formulas for a single leg of a quadruped robot. With just one click, the code calculates the kinetic energy, potential energy, and the torque required for each joint.

v2-4e013d6e85ff5644d284322c8881c04f_720w

Structure and Usage

  • simple: Simplified functions for the calculations
  • genTransform: Functions to generate transformation matrices

Requirements

  • MATLAB

Directory Structure

  • simple: Simplified functions for the calculations
  • genTransform: Functions to generate transformation matrices

Equations

We use the following formula for the calculations:

\frac{\mathrm{d}}{\mathrm{d} t}\left(\frac{\partial L}{\partial q}\right)-\frac{\partial L}{\partial q}=Q

After extracting the terms with ๐‘žฬˆ and ๐‘žฬ‡, we obtain the standard form:

D \ddot{q}+C \dot{q}+G=\tau

Main Script

The main script (energyOfLagrange.m) performs the following calculations:

  1. Calculate the rotational kinetic energy of the leg
  2. Calculate the translational kinetic energy of the leg
  3. Calculate the potential energy due to gravity acting on the leg
  4. Use Lagrange's equations to calculate the torque required at each joint
  5. Simplify the expressions and extract the matrices D and C, and calculate G
  6. Calculate the joint accelerations using the inverse Jacobian method

How to Run

  1. Clone the repository or download the code files
  2. Open MATLAB and navigate to the code directory
  3. Run the energyOfLagrange.m script

lagrange-dynamics-of-quadruped-single-leg-'s People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.