Get the whole force on joints #1963
Replies: 3 comments
-
You mean the equality constraint points will separate? I set the <default>
<equality solref="0.010 1" />
</default>
<option timestep="0.005" integrator="implicitfast"/> The equality solref should be at least 2 times of timestep. And how do you finally fix the problem of force? The documentation is |
Beta Was this translation helpful? Give feedback.
-
Depending on your model you might also be missing qfrc_passive and qfrc_actuator. Also you might want to apply any forces after mj_step1 but before mj_step2 (or via ctrl callback) |
Beta Was this translation helpful? Give feedback.
-
Sorry I forgot to mention that, I didn't add any properties about spring, damping and gravidity compensator and any actuators. So And I want to use dm_control for reinforcement learning, so I simulate the workflow as dm_control in my demo code, that is execute
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm a student and I'm trying to use MuJoCo for hydraulic excavator, combined with Simulink. I'm looking for some help with how to get the whole forces on joint.
In the XML file, I use only slide joint between cylinder tube and piston, doesn't add any
cylinder
actuator.I want to get the whole forces on joint (Here I use
qfrc_bias
andqfrc_constraint
) and transmit it to Simulink, which simulate the valve-controlled hydraulic system. And get back the hydraulic force and set it asqfrc_applied
. In Simulink I also model a simplified cylinder tube and piston, with same mass in mujoco. My idea is that the motion of the hydraulic cylinders in mujoco and simulink should be roughly synchronized.The workflow is shown as below,
When I set all valves as closed, which means the cylinder should be locked,
qfrc_applied
also roughly equalsqfrc_bias + qfrc_constraint
according record, but the model in mujoco can still move cause gravity. So I am thinking if I miss some other variables of the forces in joint or there is something wrong with my workflow.Here is the screenshot of my model. And the frames are body frame. The red box identifies the points where I use the equality constraints (
<connect>
type).Thanks for your help.

Beta Was this translation helpful? Give feedback.
All reactions