Giter Club home page Giter Club logo

robot_descriptions.py's Introduction

Robot descriptions in Python

Build Coverage PyPI version Conda Version Contributing

Import open source robot descriptions as Python modules.

Importing a description for the first time automatically downloads and caches files for future imports. Most Awesome Robot Descriptions are available. All of them load successfully in respectively MuJoCo (MJCF) or Pinocchio, iDynTree, PyBullet and yourdfpy (URDF).

Installation

PyPI

PyPI version

pip install robot_descriptions

Conda

Conda Version

conda install -c conda-forge robot_descriptions

Usage

The library provides load_robot_description functions that return an instance of a robot description directly usable in the corresponding software. For example:

from robot_descriptions.loaders.pinocchio import load_robot_description

robot = load_robot_description("upkie_description")

Loaders are implemented for the following robotics software:

Software Loader
iDynTree robot_descriptions.loaders.idyntree
MuJoCo robot_descriptions.loaders.mujoco
Pinocchio robot_descriptions.loaders.pinocchio
PyBullet robot_descriptions.loaders.pybullet
RoboMeshCat robot_descriptions.loaders.robomeshcat
yourdfpy robot_descriptions.loaders.yourdfpy

Loading will automatically download the robot description if needed, and cache it to a local directory.

Import as submodule

You can also import a robot description directly as a submodule of robot_descriptions:

from robot_descriptions import my_robot_description

The import will automatically download the robot description if you don't have it already, and cache it to a local directory. The submodule then provides the following paths:

URDF_PATH / MJCF_PATH
Path to the main URDF/MJCF file of the robot description.
PACKAGE_PATH
Path to the root of the robot description package.
REPOSITORY_PATH
Path to the working directory of the git repository hosting the robot description.

Some robot descriptions include additional fields. For instance, the iiwa14_description exports URDF_PATH_POLYTOPE_COLLISION with more detailed collision meshes.

Examples

Loading a robot description:

Visualizing a robot description:

Command line tool

The command line tool can be used to visualize any of the robot descriptions below. For example:

robot_descriptions show solo_description

Descriptions

Available robot descriptions (gallery) are listed in the following categories:

The DOF column denotes the number of actuated degrees of freedom.

Arms

Name Robot Maker DOF Format
edo_description e.DO Comau 6 URDF
fanuc_m710ic_description M-710iC Fanuc 6 URDF
gen2_description Gen2 (Jaco) Kinova 6 URDF
gen3_description Gen3 (Jaco) Kinova 6 URDF
gen3_mj_description Gen3 (Jaco) Kinova 7 MJCF
iiwa14_description iiwa 14 KUKA 7 URDF
iiwa14_mj_description iiwa 14 KUKA 7 MJCF
iiwa7_description iiwa 7 KUKA 7 URDF
panda_description Panda Franka Emika 8 URDF
panda_mj_description Panda Franka Emika 8 MJCF
poppy_ergo_jr_description Poppy Ergo Jr Poppy Project 6 URDF
sawyer_mj_description Sawyer Rethink Robotics 7 MJCF
ur10_description UR10 Universal Robots 6 URDF
ur10e_mj_description UR10e Universal Robots 6 MJCF
ur3_description UR3 Universal Robots 6 URDF
ur5_description UR5 Universal Robots 6 URDF
ur5e_mj_description UR5e Universal Robots 6 MJCF
viper_mj_description Viper Trossen Robotics 7 MJCF
xarm7_mj_description xArm7 UFACTORY 7 MJCF
z1_description Z1 UNITREE Robotics 6 URDF

Bipeds

Name Robot Maker DOF Format
bolt_description Bolt ODRI 6 URDF
cassie_description Cassie Agility Robotics 16 URDF
cassie_mj_description Cassie Agility Robotics 16 MJCF
rhea_description Rhea Gabrael Levine 7 URDF
spryped_description Spryped Benjamin Bokser 8 URDF
upkie_description Upkie Tast's Robots 6 URDF

Dual arms

Name Robot Maker DOF Format
aloha_mj_description Aloha 2 Trossen Robotics 14 MJCF
baxter_description Baxter Rethink Robotics 15 URDF
nextage_description NEXTAGE Kawada Robotics 15 URDF
poppy_torso_description Poppy Torso Poppy Project 13 URDF
yumi_description YuMi ABB 16 URDF

Drones

Name Robot Maker DOF Format
cf2_description Crazyflie 2.0 Bitcraze 0 URDF
cf2_mj_description Crazyflie 2.0 Bitcraze 6 MJCF
skydio_x2_description Skydio X2 Skydio 6 URDF
skydio_x2_mj_description Skydio X2 Skydio 6 MJCF

Educational

Name Robot DOF Format
double_pendulum_description Double Pendulum 2 URDF
finger_edu_description FingerEdu 3 URDF
simple_humanoid_description Simple Humanoid 29 URDF
trifinger_edu_description TriFingerEdu 9 URDF

End effectors

Name Robot Maker DOF Format
allegro_hand_description Allegro Hand Wonik Robotics 16 URDF
allegro_hand_mj_description Allegro Hand Wonik Robotics 16 MJCF
barrett_hand_description BarrettHand Barrett Technology 8 URDF
robotiq_2f85_description Robotiq 2F-85 Robotiq 1 URDF
robotiq_2f85_mj_description Robotiq 2F-85 Robotiq 1 MJCF
shadow_hand_mj_description Shadow Hand The Shadow Robot Company 24 MJCF

Humanoids

Name Robot Maker DOF Format
atlas_drc_description Atlas DRC (v3) Boston Dynamics 30 URDF
atlas_v4_description Atlas v4 Boston Dynamics 30 URDF
draco3_description Draco3 Apptronik 25 URDF
ergocub_description ergoCub IIT 57 URDF
h1_description H1 UNITREE Robotics 25 URDF
h1_mj_description H1 UNITREE Robotics 25 MJCF
icub_description iCub IIT 32 URDF
jaxon_description JAXON JSK 38 URDF
jvrc_description JVRC-1 AIST 34 URDF
jvrc_mj_description JVRC-1 AIST 34 MJCF
op3_mj_description OP3 ROBOTIS 20 MJCF
r2_description Robonaut 2 NASA JSC Robotics 56 URDF
romeo_description Romeo Aldebaran Robotics 37 URDF
sigmaban_description SigmaBan Rhoban 20 URDF
talos_description TALOS PAL Robotics 32 URDF
valkyrie_description Valkyrie NASA JSC Robotics 59 URDF

Mobile manipulators

Name Robot Maker DOF Format
eve_r3_description Eve R3 Halodi 23 URDF
fetch_description Fetch Fetch Robotics 14 URDF
ginger_description Ginger Paaila Technology 49 URDF
pepper_description Pepper SoftBank Robotics 17 URDF
pr2_description PR2 Willow Garage 32 URDF
reachy_description Reachy Pollen Robotics 21 URDF
stretch_description Stretch RE1 Hello Robot 14 URDF
sretch_mj_description Stretch 2 Hello Robot 14 MJCF
tiago_description TIAGo PAL Robotics 48 URDF

Quadrupeds

Name Robot Maker DOF Format
a1_description A1 UNITREE Robotics 12 URDF
a1_mj_description A1 UNITREE Robotics 12 MJCF
aliengo_description Aliengo UNITREE Robotics 12 URDF
aliengo_mj_description Aliengo UNITREE Robotics 12 MJCF
anymal_b_description ANYmal B ANYbotics 12 URDF
anymal_b_mj_description ANYmal B ANYbotics 12 MJCF
anymal_c_description ANYmal C ANYbotics 12 URDF
anymal_c_mj_description ANYmal C ANYbotics 12 MJCF
b1_description B1 UNITREE Robotics 12 URDF
go1_description Go1 UNITREE Robotics 12 URDF
go1_mj_description Go1 UNITREE Robotics 12 MJCF
go2_description Go2 UNITREE Robotics 12 URDF
go2_mj_description Go2 UNITREE Robotics 12 MJCF
hyq_description HyQ IIT 12 URDF
laikago_description Laikago UNITREE Robotics 12 MJCF, URDF
mini_cheetah_description Mini Cheetah MIT 12 URDF
minitaur_description Minitaur Ghost Robotics 16 URDF
solo_description Solo ODRI 12 URDF

Contributing

New robot descriptions are welcome! Check out the guidelines then open a PR.

Thanks

Thanks to the maintainers of all the git repositories that made these robot descriptions available.

Citation

If you use this project in your works, please cite as follows:

@software{robot_descriptions_py,
  author = {Caron, Stéphane and Romualdi, Giulio and Kozlov, Lev and Ordoñez Apraez, Daniel Felipe and Tadashi Kussaba, Hugo and Bang, Seung Hyeon and Zakka, Kevin and Schramm, Fabian},
  license = {Apache-2.0},
  title = {{robot_descriptions.py: Robot descriptions in Python}},
  url = {https://github.com/robot-descriptions/robot_descriptions.py},
  version = {1.10.0},
  year = {2024}
}

See also

robot_descriptions.py's People

Contributors

danfoa avatar fabinsch avatar giulioromualdi avatar htadashi avatar kevinzakka avatar lvjonok avatar shbang91 avatar stephane-caron 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

robot_descriptions.py's Issues

Add variant keyword to `load_robot_description`

Some descriptions have variants (like the "left" and "right" versions of the Allegro hand) that are currently only available when importing submodules. We could add a variant keyword argument to load_robot_description so that users can access it from there as well.

Wheeled robots

The README specifies there's wheeled robots but the hyperlink does not show any. Why is this?

Loading Solo and Bolt in Pinocchio 2.6.4

From @Danfoa at #6 (comment):

STL: ASCII file is empty or invalid; no data loaded
Hint: the mesh directory may be wrong.
...
  File ".../envs/robotics/lib/python3.7/site-packages/pinocchio/robot_wrapper.py", line 21, in initFromURDF
    model, collision_model, visual_model = buildModelsFromUrdf(filename, package_dirs, root_joint, verbose, meshLoader)
  File ".../envs/robotics/lib/python3.7/site-packages/pinocchio/shortcuts.py", line 45, in buildModelsFromUrdf
    geom_model = pin.buildGeomFromUrdf(model, filename, geometry_type, package_dirs)
ValueError: Argument geometry_model should be a GeometryModel

Missing dependency package `yourdfpy`

Good Day,

This issue is just to call attention to a missing dependency during package build and install. Specifically, yourdfpy package is missing as a description and throws an error when using the CLI.

I will submit a pull request with the change soon if it is not easily fixed.

PS: THANKS for this package, you save hours of pain in the ass to any newcomer in robotics.

Bumping version of example-robot-data repository

First of all, thank you so much for maintaining this valuable repository!

It would be possible to bump the version of example-robot-data in

"example-robot-data": Repository(
url="https://github.com/Gepetto/example-robot-data.git",
commit="9ba565ca1491efa92ebac38cdd499e5b1c256bf1", # v4.0.3
cache_path="example-robot-data",
),

to release 4.0.9 (commit d0d9098d752014aec3725b07766962acf06c5418)?

Unfortunately, the version v4.0.3 does not include the inertial parameters in the Franka panda robot, limiting the usage of the URDF file for some applications.

Broken README links

All links under Examples give me a "Not found" page if I'm on the master branch. This does not occur if I switch to a tag, say, v0.2.0.

Perhaps it is because the repository name ends with .py?

Some descriptions don't load properly in Pinocchio

Some URDF descriptions don't load properly in Pinocchio. At present, the descriptions that don't load properly are:

Description Pinocchio 2.6.4 Pinocchio 2.6.10
cf2_description ✔️
laikago_description ✔️
mini_cheetah_description
minitaur_description
pr2_description

Some of them were because of stack-of-tasks/pinocchio#1741. A fix was proposed by Pinocchio maintainers in stack-of-tasks/pinocchio#1742 which made it to 2.6.10.

This issue is here to keep track, and check that Pinocchio eventually loads all of these descriptions successfully.

Stretch description error not caught by unit tests

A previous commit of the Stretch description failed:

ValueError: Could not load resource ./meshes/base_link.STL
Unable to open file "./meshes/base_link.STL".
Hint: the mesh directory may be wrong.

This error was not caught by the CI 🤔

Git pull to check out newer commits

The following error happens when the repository hasn't pulled the required commit:

git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git checkout e946426aaaa56f59e14ad24ed2c22a3b1a04f124
  stderr: 'fatal: reference is not a tree: e946426aaaa56f59e14ad24ed2c22a3b1a04f124'

KUKA iiwa disambiguation

There's an iiwa7 and an iiwa14 so we should ideally have separate description files for each.

Allow commit-pinning a robot description

Currently we always clone the latest available description.

For repeatability, it would be nice to enable downstream dependencies to pin a description to the specific commit they are using.

Load scenes rather than robot files for MJCF descriptions

When loading a robot description from MuJoCo Menagerie, it seens it is more common to load the scene.xml files for each description rather than the individual robot files (that have, notably, no ground).

The proposal is then to make all MJCF descriptions loaded via robot_descriptions go for scene.xml by default, with optionally a variant #62 for bare robots.

XML error with lxml 5.0.0

An XML error has appeared in the yourdfpy CI workflow:

2024-01-02T10:08:46.0517945Z   File "/home/runner/work/robot_descriptions.py/robot_descriptions.py/.tox/loader-yourdfpy/lib/python3.8/site-packages/collada/__init__.py", line 210, in __init__
2024-01-02T10:08:46.0519697Z     self.xmlnode = ElementTree.ElementTree(element=None,
2024-01-02T10:08:46.0520666Z   File "src/lxml/etree.pyx", line 3183, in lxml.etree.ElementTree
2024-01-02T10:08:46.0521806Z   File "src/lxml/parser.pxi", line 1955, in lxml.etree._parseDocument
2024-01-02T10:08:46.0522961Z   File "src/lxml/parser.pxi", line 1975, in lxml.etree._parseMemoryDocument
2024-01-02T10:08:46.0524057Z   File "src/lxml/parser.pxi", line 1862, in lxml.etree._parseDoc
2024-01-02T10:08:46.0525564Z   File "src/lxml/parser.pxi", line 1145, in lxml.etree._BaseParser._parseDoc
2024-01-02T10:08:46.0526850Z   File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
2024-01-02T10:08:46.0528089Z   File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
2024-01-02T10:08:46.0529191Z   File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
2024-01-02T10:08:46.0529995Z   File "<string>", line 83
2024-01-02T10:08:46.0530832Z lxml.etree.XMLSyntaxError: xmlSAX2Characters: huge text node, line 83, column 10000427

This error coincides with the release of lxml 5.0.0.

Loading Mini Cheetah description in Pinocchio 2.6.10

The URDF does not load with Pinocchio 2.6.10:

$ python examples/load_in_pinocchio.py mini_cheetah_description
Traceback (most recent call last):
  File "examples/load_in_pinocchio.py", line 35, in <module>
    robot = load_robot_description(args.name)
  File "~/.local/lib/python3.8/site-packages/robot_descriptions/loaders/pinocchio.py", line 69, in load_robot_description
    robot = pin.RobotWrapper.BuildFromURDF(
  File "~/.local/lib/python3.8/site-packages/cmeel.prefix/lib/python3.8/site-packages/pinocchio/robot_wrapper.py", line 17, in BuildFromURDF
    robot.initFromURDF(filename, package_dirs, root_joint, verbose, meshLoader)
  File "~/.local/lib/python3.8/site-packages/cmeel.prefix/lib/python3.8/site-packages/pinocchio/robot_wrapper.py", line 21, in initFromURDF
    model, collision_model, visual_model = buildModelsFromUrdf(filename, package_dirs, root_joint, verbose, meshLoader)
  File "~/.local/lib/python3.8/site-packages/cmeel.prefix/lib/python3.8/site-packages/pinocchio/shortcuts.py", line 45, in buildModelsFromUrdf
    geom_model = pin.buildGeomFromUrdf(model, filename, geometry_type, package_dirs = package_dirs)
ValueError: Mesh meshes/mini_body.obj could not be found.

This seems related to stack-of-tasks/pinocchio#1747. Perhaps "meshes/mini_body.obj" is not considered a relative path in parsers/utils.hpp?

Checks:

  • I've checked that package_dirs[0] + "meshes/mini_body.obj exists on my filesystem
  • Manually replacing all instances of meshes/ by ./meshes/ in the URDF, the description loads properly

Command line usage when no argument

This works:

robot_description show upkie

But calling the command line tool with no argument yields:

TypeError: unsupported operand type(s) for %: 'tuple' and 'dict'

Loading non-specific after specific commit fails

The following test fails with the current code:

load_pinocchio("draco3_description", commit="5afd19733d7b3e9f1135ba93e0aad90ed1a24cc7")
load_pinocchio("baxter_description")

The first calls sets a custom commit environment variable, not cleared when processed by the second one.

This one is a blocker for stephane-caron/pink#80

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.