google-deepmind / google-deepmind/dm_control

How to better avoid "Error: free joint can only be used on top level" when combining two models

Open
#333 6 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
764
PR merge metrics
No merged PRs in 30d

Description

I want to create separate xml files for robot, object, arena and combine them together later.
Because all the objects are very similar, I decided to put all of them in one xml file. Each object are should move freely.
Something like this:
```XML










```

Then I use .attach to combine two models: modelArena.attach(modelObject)

But, this will create an outside








```
Then I will get a problem "Error: free joint can only be used on top level".

I know one solution would be to create xml file for each object individually and let the attachment frame add('freejoint').
But this is not very elegant, and it will create many redundant attributes (like

Contributor guide

Open the contributing guide

Research direction

Start with the modelArena.attach(modelObject) usage and the XML examples in the issue, then inspect the attachment API and its handling of worldbody children and freejoint elements. Done means identifying and documenting a supported way to combine multiple independently movable bodies without triggering the top-level free-joint error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
robotics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.