Giter VIP home page Giter VIP logo

prcnsi / mc_mujoco Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rohanpsingh/mc_mujoco

0.0 0.0 0.0 4.26 MB

MuJoCo interface for mc-rtc

Home Page: https://arxiv.org/abs/2209.00274

License: BSD 2-Clause "Simplified" License

Shell 0.01% C++ 61.20% C 35.97% Objective-C 1.26% Kotlin 0.01% Objective-C++ 0.76% Makefile 0.18% HTML 0.05% CMake 0.40% GLSL 0.01% Batchfile 0.07% GDB 0.01% SCSS 0.07%

mc_mujoco's Introduction

mujoco interface for mc-rtc

Screenshot from 2022-08-12 17-09-16

Usage

First, install the required apt packages:

$ sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libglew-dev

Then, assuming that you have mujoco installed under ${HOME}/.mujoco/mujoco235,

$ git clone --recursive [email protected]:rohanpsingh/mc_mujoco.git
$ cd mc_mujoco
$ mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMUJOCO_ROOT_DIR=$HOME/.mujoco/mujoco235
$ make
$ make install

Add the following line to your ~/.bashrc:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/.mujoco/mujoco235/lib:${HOME}/.mujoco/mujoco235/bin

Then, to run the interface:

$ mc_mujoco

To load additional objects in the scene

There are several steps needed to be followed:

  • First, create your object's XML file under mc_mujoco/robots. For example, longtable.xml
  • Then, create a simple config file with the xmlModelPath attribute. For example, longtable.in.yaml
  • Then, install your object by adding it to the end of mc_mujoco/robots/CMakeLists.txt. For example, add setup_env_object(box object)

Your object is now created and installed. Next you want to tell mc-mujoco to load it and place it at the desired pose.
Find ~/.config/mc_rtc/mc_mujoco/mc_mujoco.yaml (create it manually if needed) and paste the following:

objects:
  box1:
    module: "box"
    init_pos:
      translation: [3.1, 0, 0.9]
      rotation: [0, 0, 0]
  box2:
    module: "box"
    init_pos:
      translation: [3.7, 0.2, 0.9]
      rotation: [0, 0, 0]

GUI: Mouse Interaction

An object is selected by left-double-click. The user can then apply forces and torques on the selected object by holding Ctrl key and dragging the left-mouse-button for torques and right-mouse-button for forces.

Example

A basic example of what you can do using this package is here.

Citation

@inproceedings{singh2023mc,
  title={mc-mujoco: Simulating Articulated Robots with FSM Controllers in MuJoCo},
  author={Singh, Rohan P and Gergondet, Pierre and Kanehiro, Fumio},
  booktitle={2023 IEEE/SICE International Symposium on System Integration (SII)},
  pages={1--5},
  year={2023},
  organization={IEEE}
}

Credits

This package includes code from:

mc_mujoco's People

Contributors

gergondet avatar rohanpsingh avatar mmurooka 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.