Skip to content

Create a tracking body and a simulated body #2376

Closed Answered by Balint-H
Hardwarize asked this question in Asking for Help
Discussion options

You must be logged in to vote

Hello,

mj_step already calls mj_forward, so you do not need to call it separately; just manually set qpos of the visualization kinematic tree. It is also a good idea to set its qvel to 0 as well (otherwise, depending on your integrator it could lead to your character drifting away due to accumulating qvel). Don't forget to disable collisions to visualization character, and I also recommend setting its geoms transparent for clarity.

If you do these steps, you can leave the masses as they are for the visu character. In fact, you get the benefit of being able to calculate measure such as CoM, which you can compare with your simulated character.

Note that this approach does waste some computa…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Hardwarize
Comment options

@Balint-H
Comment options

@Hardwarize
Comment options

@Balint-H
Comment options

Answer selected by Hardwarize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants