gz-mujoco's Issues
[SDFormat->MJCF] Should add support for revolute2 and universal joints
[SDFormat->MJCF] Should add gearbox and screw type joints
[SDFormat->MJCF] Support `//collision/surface`
We should be able to convert a subset of //collision/surface
, such as friction
and restitution
properties. We should also document which elements are not supported.
[SDFormat->MJCF] Support nested models
conda installation
hey, I get the following error by using sdf2mjcf
with conda
i did conda install sdformat-mjcf
and then sdf2mjcf mug.xml test.sdf
with the mujoco mug and get:
(base) wand_da@rmc-lx0470 ~/git/annikonda_sample/mujoco/whitebert (feat/mujoco)$ sdf2mjcf test_defaults.xml test.sdf
Error: Could not find the 'robot' element in the xml file
at line 109 in /home/conda/feedstock_root/build_artifacts/urdfdom_1681364098593/work/urdf_parser/src/model.cpp
Error Code 1: Msg: Unable to read file:test_defaults.xml
(base) wand_da@rmc-lx0470 ~/git/annikonda_sample/mujoco/whitebert (feat/mujoco)$
[SDFormat->MJCF] Handle name collision between geoms
MJCF does not allow name collisions between geoms in different bodies, but SDFormat collisions and visuals in different bodies are allowed to share names. One solution is to prefix the name of geoms with the name of the bodies they belong to.
README questions
Hi there,
I was finally able to put my hands on this gem! I was following the readme
I wanted to add new small detials on README, but I need to make sure I understand this first.
I have several questions regarding libsdformat part.
- Is
ahcorde/python/all
in sdformat official plugin for this repo? - What is difference between libignition-math7 and ignition-math7? libignition-common5 and igntiion-common5? Cmake couldn't find ignition-math7 and ignition-common5.
See here
-- sdformat13 version 13.0.0~pre1
-- Operating system is Linux
-- Found CPack generators: DEB
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.2.0
-- Looking for TINYXML2 - found
-- Looking for IgnURDFDOM - found
-- Found ruby executable: /usr/bin/ruby
CMake Warning at /usr/share/cmake/ignition-cmake3/cmake3/IgnUtils.cmake:197 (find_package):
By not providing "Findignition-math7.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"ignition-math7", but CMake did not find one.
Could not find a package configuration file provided by "ignition-math7"
with any of the following names:
ignition-math7Config.cmake
ignition-math7-config.cmake
Add the installation prefix of "ignition-math7" to CMAKE_PREFIX_PATH or set
"ignition-math7_DIR" to a directory containing one of the above files. If
"ignition-math7" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:114 (ign_find_package)
-- Looking for ignition-math7 - not found
Could not find a package configuration file provided by "ignition-common5"
with any of the following names:
ignition-common5Config.cmake
ignition-common5-config.cmake
- I tried to build
libsdformat
folder from the source, but I couldn't due to above. - It seems like some requirement needs to be met before able to continue.
I wanted to add more detail for future potential enthusiastic beginners to start with this repo
[SDFormat->MJCF] Identify a small set of commonly used sensors
[SDFormat->MJCF] Support `//visual/material`
sdformat_to_mjcf: specify nconmax and njmax in SDFormat
Desired behavior
While running in MuJoCo a friction demo world converted from SDFormat, I got several error messages complaining about needing to increase nconmax
and njmax
and the simulated behavior was very weird. After increasing the values, I saw reasonable simulated behavior.
<mujoco model="default">
<size nconmax="300" njmax="1000"/>
<worldbody>
...
</worldbody>
</mujoco>
It would be nice to be able to specify these values in an SDFormat file so they can be passed through to MJCF during conversion.
<sdf version="...">
<world name="world_name" xmlns:mjcf="https://github.com/gazebosim/gz-mujoco">
<mjcf:size nconmax="300" njmax="1000"/>
</world>
</sdf>
Alternatives considered
Implementation suggestion
Additional context
[SDFormat->MJCF] Support meshes for collisions and visuals
Create python packaging files
Should detect if OBJ is composite and issue a warning
Mujuco doesn't textures in a composite OBJ file (multiple submeshes in one OBJ files). It would be nice to detect if an OBJ file is composite and issue a warning along the lines of "extures ignored in mesh "mesh.obj" since it is composite, in order to load a composite mesh in MuJoCo please use github.com/kevinzakka/obj2mjcf"
The tool linked there can convert composite OBJ files to simple OBJs with individual textures extracted from the composite OBJ file.
[SDFormat->MJCF] Support `//world/light` and `//link/light`
[SDFormat->MJCF] Material specular and emissive is a scalar not a color
SDf defines material specular and emissive as Color (r, g, b, a) but MJCF defines this as a scalar.
If, for example, you have a specular of [0.9, 0, 0], I would expect a red highlight, but this would result in gray.
Related comment #18 (comment)
Gazebo and Mujoco have incompatible texture mapping for primitive shapes
The difference in texture mapping between Gazebo and Mujoco is best demonstrated with images:
Mujoco with //texture/@type="2d"
Mujoco with //texture/@type="cube"
and //material/texuniform="true"
Mujoco with //texture/@type="cube"
and //material/texuniform="false"
from this, we can see that the combination //texture/@type="cube"
and //material/texuniform="false"
is the closest to Gazebo, but it still very different.
SDFormat file and texture:
shapes.sdf
albedo.png
Should enable CI for other versions of python
We currently run CI for python 3.8. We should enable CI for other versions once python bindings for ignition-math and libsdformat are available for those versions.
[SDFormat->MJCF] Support kinematic loops
Currently, only kinematic trees are supported in the converter. We need to detect if a kinematic loop exists in an SDFormat file and add MJCF equality constraints (see https://mujoco.readthedocs.io/en/latest/XMLreference.html#equality)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.