Giter Club home page Giter Club logo

mjctrl's Introduction

MuJoCo Controllers

Single-file pedagogical implementations of common robotics controllers in MuJoCo.

Installation

MuJoCo is the only dependency required to run the controllers.

pip install "mujoco>=3.1.0"

Usage

File Video Description
diffik.py image info Differential IK on a 6-DOF UR5e.
diffik_nullspace.py image info Differential IK with nullspace control on a 7-DoF Panda.
opspace.py image info Operational space control on a 7-DOF KUKA iiwa14.

Acknowledgements

Robot models are taken from MuJoCo Menagerie.

References

  • Samuel R. Buss 2009. Introduction to Inverse Kinematics with Jacobian Transpose, Pseudoinverse and Damped Least Squares methods. PDF
  • Oussama Khatib 1987. A Unified Approach for Motion and Force Control of Robot Manipulators: the Operational Space Formulation. PDF
  • Russ Tedrake, 2023. Robotic Manipulation: Perception, Planning, and Control. PDF

mjctrl's People

Contributors

hpoonawala avatar kevinzakka avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

mjctrl's Issues

Suggestion on Diffik_nullspace

Hey,

Amazing work!

I am trying to integrate the same with Xarm in my environment. I am facing an issue with the mj_integratePose line in the "diffik_nullspcae.py". My data.nv is of size 20 and data.nq is 19, out of which I just need only the first 7 joints. I am able to calculate the jacobian but while running the integratepose function, there is a size mismatch(as the arguments takes "model", q,qdot,dt).
Can you please suggest what can be done to avoid this?

Thanks!

Question about diffik example

Good afternoon, Kevin! Thank you very much for your materials on GitHub. If I may, I would like to ask you a small issue about the differential kinematics in the diffik.py file. I tried to experiment with the frequency parameter of the test circle trajectory. When increasing the frequency from 0.5 in your example to 1, the circle described by the mocap element begins to diverge from the reference one. Could you tell me what caused this? Do I understand correctly that by changing the frequency you can change the speed of the robot moving in a circle? And I also noticed that changing the gains for the twist computation coefficients > 1 improves the situation, but in the comments you indicated that they cannot be greater than 1. Could you also tell me where I can see their physical meaning? Thanks in advance, best regards, Anton.

Getting error when using the codebase for XArm 7

Hi,
I am trying to use your codebase to control XArm robot. Its XML is here. When I run diffik_nullspace.py after changing the path to XArm7 here, I get the error here.

operands could not be broadcast together with shapes (13,) (7,) 

There are few discrepancies that I noticed:

  1. jac = np.zeros((6, model.nv)) here. My model.nv is 13. I guess it should be rather 7 (== degree of freedom).
  2. q0 = model.key(key_name).qpos here. q0's shape is (13,) even though I feel it should be (7,).

Am I interpreting anything wrong?

Mouse Control in MuJoCo Viewer Window

Hi Kevin,

First off, thanks for making these controllers available to the community!

The examples all run smoothly on my Macbook, however, i'd like to know how you got the mouse control working in the MuJoCo Viewer Window? (specifically for dragging things around like you show in your README demos)

I've started learning MuJoCo recently, and any guidance here will be greatly appreciated : )

-- Jonathan

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.