MCPcopy Create free account
hub / github.com/LeCAR-Lab/model-based-diffusion / _get_obs

Method _get_obs

mbd/envs/hopper.py:49–55  ·  view source on GitHub ↗

Returns the environment observations.

(self, pipeline_state: base.State)

Source from the content-addressed store, hash-verified

47 )
48
49 def _get_obs(self, pipeline_state: base.State) -> jax.Array:
50 """Returns the environment observations."""
51 position = pipeline_state.q
52 position = position.at[1].set(pipeline_state.x.pos[0, 2])
53 velocity = jp.clip(pipeline_state.qd, -10, 10)
54
55 return jp.concatenate((position, velocity))
56
57 def _get_reward(self, pipeline_state: base.State) -> jax.Array:
58 """Returns the environment reward."""

Callers 2

resetMethod · 0.95
stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected