Replies: 5 comments 1 reply
|
Bumping this! |
0 replies
|
Hi, I encounter the same issue. Do you have any solution yet? |
0 replies
|
Is there any latest progress on this issue? I have also encountered difficulties. |
0 replies
|
I would do something like this: def process_action(action, pipeline_state):
nv = pipeline_state.ctrl.shape[0]
# Assuming the first nv elements are joint actions, the rest are external forces
joint_action = action[:nv]
xfrc_applied = action[nv:]
xfrc_applied = jp.vstack([jp.zeros((1, 6)), action]) # zeros for the worldbody
xfrc_applied = jp.reshape(xfrc_applied, (-1, 6)) # make sure the shape is (nbody, 6)
pipeline_state = pipeline_state.replace(xfrc_applied=xfrc_applied)
return joint_action, pipeline_statein PipelineEnv.step: pipeline_state0 = state.pipeline_state
action, pipeline_state0 = process_action(action, pipeline_state0)
pipeline_state = self.pipeline_step(pipeline_state0, action)
# ...other stuffThis should work with the |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I was wondering if anyone has pointers on how to apply an external force to an agent, specifically the HalfCheetah environment.
I read in the MuJoCo documents there is a
xfrc_appliedfield that implements this. Is there a similar feature for BRAX environments? Thanks!All reactions