Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about 【composite type="particle】 #642

Closed
miyukin73 opened this issue Dec 10, 2022 · 2 comments
Closed

Question about 【composite type="particle】 #642

miyukin73 opened this issue Dec 10, 2022 · 2 comments
Labels
question Request for help or information

Comments

@miyukin73
Copy link

Hello.

I would like to use composite type="particle" to display multiple spheres in a simulation environment.

If I use "particle", I would consider all the spheres as an aggregate and define the xml file as follows for example

<mujoco model="mug with balls">
  <worldbody>
    <composite type="particle" count="5 5 5" spacing="0.011" offset=".005 .003 .15">
      <geom size=".005" rgba=".8 .2 .1 1" solref=".005 1"/>
    </composite>
  </worldbody>
</mujoco>

My question is,
if I use composite type="particle", can I specify the position of each individual sphere?

Also, I think the joints of the spheres are only SLIDE and not rotated.

Is it possible to set the joints?

Screencast.from.2022.12.10.18.56.06.webm

Thank you in advance.

@miyukin73 miyukin73 added the question Request for help or information label Dec 10, 2022
@quagla
Copy link
Collaborator

quagla commented Dec 12, 2022

Hi @miyukin73,

It is unfortunately not possible at the moment to set the position of each individual particles. A possible workaround would be to load the model you proposed, then save it from MuJoCo and edit the positions by hand. When you save it, you will see that the composite is expanded into each individual particle. Does that make sense?

Yes it's possible to set the joints, see https://github.com/deepmind/mujoco/blob/main/model/composite/particle_free.xml and https://github.com/deepmind/mujoco/blob/main/model/composite/particle_free2d.xml

@quagla quagla closed this as completed Dec 12, 2022
@quagla quagla reopened this Dec 14, 2022
copybara-service bot pushed a commit that referenced this issue Aug 30, 2023
- Removed the explicit dependency on a plugin name.
- Creation of particles from user-defined vertices (if a plugin is present).
- Add skin support for an irregular mesh
- Fixes #642 and #674.

PiperOrigin-RevId: 561313771
Change-Id: I450f91f0d3b578cc18d97ed7180a0a8944b7dd41
@quagla
Copy link
Collaborator

quagla commented Aug 30, 2023

Hi @miyukin73 happy to let you know that this is now supported!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Request for help or information
Projects
None yet
Development

No branches or pull requests

3 participants