Disturbance Force Application on Composite Bodies and Visualization in MuJoCo Simulations #2671
Replies: 2 comments 1 reply
-
Hi, I am a MuJoCo user. I will attempt to answer your queries!
See #2467, i.e., the introductory tutorial for drawing objects in the scene. Here is a function I use to draw arrows:
You can use it in the simulation loop as follows:
|
Beta Was this translation helpful? Give feedback.
-
I think this is not the way to go while using the passive viewer:
I was speaking about drawing custom geometries. It is not really needed in this case. Pardon me for diverging from the point!
But, if you were to use the passive viewer, then it gets cleared somewhere while the scene is updated. I am not able to find the exact line in the source code, but I can see that the perturbation forces are reset every time you do
You can see that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hi!
I am a student using MuJoCo to complete simulation tasks.
My setup
MuJoCo 3.2.6 (x64 Windows 11)
My question
I'm currently studying how my model behaves under external force disturbances and have created a simple model to familiarize myself with force application methods. I'd like to confirm several points:
When I apply a disturbance force to a body, is the force applied at the center of mass rather than the body's defined position (body pos)?
When bodies have parent-child relationships, is the external force applied at the parent body's center? Or is it applied to the composite center while maintaining fixed relative positions between bodies?
For example, in my model when I apply force to body0, I observe all three bodies moving together while maintaining fixed distances between them. I'm uncertain whether this occurs because:
The force is applied to the leftmost block specifically, or
The three blocks are treated as a single composite body with force applied at the center block

Additionally, how can I visualize disturbance forces similar to when dragging objects with the mouse in the simulation interface? I've attempted adding the following to my code but it doesn't seem to work.
Minimal model and/or code that explain my question
Model:
Code:
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions