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

failure to enable energy computation #788

Open
BlaiseDio23 opened this issue Feb 8, 2024 · 1 comment
Open

failure to enable energy computation #788

BlaiseDio23 opened this issue Feb 8, 2024 · 1 comment

Comments

@BlaiseDio23
Copy link

Hi everyone,

I'm working on a humanoid stable gait generation scheme and need to analyse the energy consumption but i don't really understand how to enable energy computation.

I understand that this is accomplished using the "mjENBL_ENERGY" bit but where and how?
Currently, setting
PE = self.data.energy[0]
KE = self.data.energy[1]
then printing PE and KE returns nothing. Yes becuase energy computation has not been enabled but i just seem not to understand how to go about it.

Kindly assist ASAP

@hukz18
Copy link

hukz18 commented Aug 30, 2024

Late response but may help others, you can just add

<option>
  <flag energy="enable"/>
</option>

to the XML file, as shown in this MuJoCo tutorial.

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

No branches or pull requests

2 participants