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

Method _get_obs

mbd/envs/walker2d.py:50–56  ·  view source on GitHub ↗

Returns the environment observations.

(self, pipeline_state: base.State)

Source from the content-addressed store, hash-verified

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

Callers 2

resetMethod · 0.95
stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected