Comments (10)
Would i be able to modify a body thats in the scene? Like switch a body from fixed to loose? Could I change the friction in joints simulating damage?
Yes you can do all of that; anything you want really. If you want a preview, take a look at the (currently private) C API in user_api.h and the corresponding tests. Note that the parser has already been rewritten to use this. WIP, quite a bit of missing functionality.
Per your question in #1511 I do have a preference for xsd.
Can you articulate more precisely why you prefer XSD to RNG? (not counting "I had an XSD starting point and this is what I already have working" 🙂)
I have put some time in updating the existing project adding the updates from 2.x to 3.x here: https://github.com/ronansgd/xml-schema-mjcf/pull/3/files
One of the things I don't love about this is the spreading out across multiple files. Presumably this is not a hard requirement but a choice.
from mujoco.
I want to highlight the following MIT-licensed schema: https://github.com/ronansgd/xml-schema-mjcf
from mujoco.
@madhephaestus we're close to releasing a compiler API for use cases like yours that allows for incremental modification of the model without having to go through an XML.
Perhaps it would be a good idea to wait for that and see what's the best way to proceed?
from mujoco.
It'd be great to have the schema file published so users can benefit from completion and static validation. Dear maintainers, any plans for publishing xml schema?
from mujoco.
@wookayin yes, we have such plans. We hope to complete this by the end of the year.
Do you have opinions about your preferred schema format? Options are:
- XSD
- relaxNG
- relaxNG compact format
- Schematron.
from mujoco.
Hi, any update on the XML Schema for the MJCF for the MuJoCo 3?
from mujoco.
No update unfortunately. Might happen in 2024.
Thanks for showing interest.
from mujoco.
@saran-t Per your question in #1511 I do have a preference for xsd. I am writing, what I intend to be, a feature complete set of Java Bindings and have been using an existing (but out of date) set of XSD files to generate the marshaling classes and associated builders. I has worked very well! see: https://github.com/CommonWealthRobotics/mujoco-java/blob/main/src/test/java/mujoco/java/XMLtest.java
It might be worth considering adopting https://github.com/ronansgd/xml-schema-mjcf as a starting place. @ronansgd
has made an excellent start to creating a full featured set of XSD files for the MuJoCo XML format.
I have put some time in updating the existing project adding the updates from 2.x to 3.x here: https://github.com/ronansgd/xml-schema-mjcf/pull/3/files
from mujoco.
@saran-t I look forward to seeing that, sounds like a neat way of making dynamic systems! Would i be able to modify a body thats in the scene? Like switch a body from fixed to loose? Could I change the friction in joints simulating damage?
For my use case I need to keep all of the pointers of the actual APi hidden from the user. One bad access to a pointer and the whole jvm crashes. I need to wrap the APi for users in java safe types. This does mean coming up with a lot of the internal types after importing the API by hand. Using the XMlL and the marshaling code that is generated by the xsd files, i get builders with types that enforce the correct structure from the generated code. These types, since they just map to the xsd, are memory safe for the user at all times, so building the model is automatically generated and safe for the user out of the box. I do look forward to dynamic editing, but it would be less good for my specific use case.
from mujoco.
There exists tooling (in fairness, that i am familiar with, so recomendations would be lovely!) to create the Java classes to marshal and unmarshal XML directly from the XSD descriptors. The tooling also generates memory safe builders for Java users. There is a also a nice intermediate byproduct of the XML that can be used for tweaking and sharing. I have spent a good part of my spring break using my Java code to generate an XML, and the simulate tool you provide to visualize and debug the generator.
My use case is procedurally generated, 3d printable robots that can be tested in simulation with user generated terrain and obstacles. See https://github.com/CommonWealthRobotics/BowlerStudio/#bowlerstudio . The hope is for as much of the MuJoCo API to be as readily accessible, and to do that the API and the marshaling code needs to come as automatically as i can make it from an upstream ground-truth. I only have the breaks in between teaching to work on this API and maintain it, so it is imperative for me that the workflow have as much automation as possible.
If you have some recommendation for a toolchain for generating marshaling, unmarshaling and builder Java code from RNG, I would be happy to take a look. In the meantime XSD -> JAXB -> jaxb2-rich-contract-plugin->[code-gen] is my tested and known path.
One of the things I don't love about this is the spreading out across multiple files. Presumably this is not a hard requirement but a choice.
Yeah, adopting just means that you have a working starting place. you could certainly make the official repo a monolith file. I would happily retool my auto-builders if there was an officially supported version.
EDIT: Ok, i admit this argument is basically "I had an XSD starting point and this is what I already have working", but in fairness, i really do not have any idea how i would make it work with RNG, and googling it just brings up random number generator code >.<
from mujoco.
Related Issues (20)
- mjx 3.1.5 cannot run the Minimal example, It show "Segmentation fault (core dumped)". 3.1.4 did not have this issue. HOT 1
- Failed to find a finite solution:LQR for a two wheel self-balancing robot HOT 11
- MJX model: Some fields are JAX Arrays, some are numpy arrays? HOT 5
- NaN problems in mjx speed benchmarks on cpu
- Fume visualization in MuJoCo HOT 4
- Out of memory while using MJX to load Google Barkour VB quadruped HOT 4
- a question about abnormal and large fluctuations in contact force between ball and the jump HOT 1
- Simulation time not proportional to simulation step number HOT 3
- Outdated link in generated code comments points to archived 'greg' repository HOT 1
- How to route a cable (over a pulley) HOT 13
- Understanding computation with friction loss
- Creating a bright colored LED-like object in Mujoco ? HOT 2
- segmentation fault when use nlopt_optimize of NLopt in mjcb_control HOT 2
- geom/site position change problem after model compilation HOT 1
- Headless Rendering within a Docker Container
- Soft Robot Simulation: (a) Example XML files, and (b) difference between Composite and Deformable soft objects HOT 4
- Proposal for linear parametrization of inverse dynamics for SysID HOT 6
- Are sphere-cylinder collisions implemented in MuJoCo v.3.1.4? HOT 1
- nut-bolt .sdf plugin assembly issue. HOT 1
- Understanding different times associated with simulation? HOT 1
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.
from mujoco.