moplayground.envs¶
Multi-objective environments. Subclass
MultiObjectiveBase to write
your own; see Writing an environment.
moplayground.envs.create
¶
Functions:
| Name | Description |
|---|---|
create_environment |
Instantiate a MO-Playground environment. |
create_environment
¶
Instantiate a MO-Playground environment.
Constructs one of the registered multi-objective environments
(MOCheetah, MOHopper, MOAnt, MOWalker, MOHumanoid,
NaviGait).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env_name
|
Registered environment name, e.g. |
required | |
env_params
|
|
required | |
backend
|
|
'jnp'
|
|
gaitlib_path
|
Gait library path. Required for |
None
|
|
**env_kwargs
|
Extra keyword arguments forwarded to the environment
constructor. Currently only consumed by |
{}
|
Returns:
| Type | Description |
|---|---|
|
Tuple |
Raises:
| Type | Description |
|---|---|
Exception
|
If |
Source code in src/moplayground/envs/create.py
moplayground.envs.generic.mobase
¶
Classes:
| Name | Description |
|---|---|
MultiObjectiveBase |
Base environment that emits a vector-valued reward. |
Multi2SingleObjective |
Wrap a multi-objective env to expose a scalar reward. |
MultiObjectiveBase
¶
Bases: SwappableBase
Base environment that emits a vector-valued reward.
Extends minimal_mjx.envs.generic.base.SwappableBase so concrete
environments can be constructed against either NumPy or JAX backends.
Per-step reward components are bucketed into objective groups defined by
env_params.reward.optimization.objectives (one entry per output
dimension of the reward vector) and an optional set of
shared_objectives that are added to every dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_path
|
Path
|
Path to the MuJoCo XML model. |
required |
env_params
|
ConfigDict
|
ConfigDict with at least |
required |
backend
|
str
|
|
'jnp'
|
num_free
|
int
|
Number of free joints in the model. Forwarded to
|
3
|
Methods:
| Name | Description |
|---|---|
get_reward_and_metrics |
Combine per-key rewards into a vector reward plus updated metrics. |
Attributes:
| Name | Type | Description |
|---|---|---|
objectives |
|
|
shared_objectives |
|
Source code in src/moplayground/envs/generic/mobase.py
shared_objectives
instance-attribute
¶
get_reward_and_metrics
¶
Combine per-key rewards into a vector reward plus updated metrics.
Each entry of self.objectives maps to one component of the
returned reward vector, computed as a weighted sum of the listed
per-key rewards. Shared objectives are then added to every
component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rewards
|
Array
|
Mapping from reward key to scalar reward for the current step. |
required |
metrics
|
dict
|
Existing metrics dict to extend. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Array, dict[str, Array]]
|
|
Source code in src/moplayground/envs/generic/mobase.py
Multi2SingleObjective
¶
Wrap a multi-objective env to expose a scalar reward.
Replaces the vector reward from the wrapped environment with the inner
product reward · weighting, so the wrapped env can be plugged into
standard single-objective PPO. All other attributes/methods are
delegated to the underlying env via __getattr__.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
A |
required | |
weighting
|
Per-objective weights, length must match the env's reward dimension. |
required |
Methods:
| Name | Description |
|---|---|
reset |
|
step |
|
Attributes:
| Name | Type | Description |
|---|---|---|
env |
|
|
weighting |
|
Source code in src/moplayground/envs/generic/mobase.py
reset
¶
DeepMind Control tasks¶
moplayground.envs.dmcontrol.cheetah
¶
Classes:
| Name | Description |
|---|---|
MOCheetah |
Multi-Objective Cheetah Environment. |
MOCheetah
¶
Bases: MultiObjectiveBase
Multi-Objective Cheetah Environment. Objectives are speed, energy, and jumping height.
Methods:
| Name | Description |
|---|---|
reset |
|
state_vector |
|
step |
|
fall_termination |
|
reward_function |
|
reward_height |
|
reward_alive |
|
reward_energy |
|
reward_run |
|
reward_done |
|
Attributes:
| Name | Type | Description |
|---|---|---|
action_size |
|
Source code in src/moplayground/envs/dmcontrol/cheetah.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
reset
¶
Source code in src/moplayground/envs/dmcontrol/cheetah.py
state_vector
¶
step
¶
Source code in src/moplayground/envs/dmcontrol/cheetah.py
fall_termination
¶
reward_function
¶
Source code in src/moplayground/envs/dmcontrol/cheetah.py
reward_height
¶
reward_alive
¶
reward_energy
¶
reward_run
¶
moplayground.envs.dmcontrol.hopper
¶
Classes:
| Name | Description |
|---|---|
MOHopper |
Multi-Objective Hopper Environment. Objectives are speed by height. |
MOHopper
¶
Bases: MultiObjectiveBase
Multi-Objective Hopper Environment. Objectives are speed by height.
Methods:
| Name | Description |
|---|---|
reset |
|
step |
|
fall_termination |
|
reward_function |
|
reward_upright |
|
reward_alive |
|
reward_ctrl_cost |
|
reward_run |
|
reward_jump |
|
reward_done |
|
reward_energy |
|
Attributes:
| Name | Type | Description |
|---|---|---|
action_size |
|
Source code in src/moplayground/envs/dmcontrol/hopper.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
reset
¶
Source code in src/moplayground/envs/dmcontrol/hopper.py
step
¶
Source code in src/moplayground/envs/dmcontrol/hopper.py
fall_termination
¶
reward_function
¶
Source code in src/moplayground/envs/dmcontrol/hopper.py
reward_upright
¶
reward_alive
¶
reward_ctrl_cost
¶
reward_run
¶
reward_jump
¶
reward_done
¶
moplayground.envs.dmcontrol.walker
¶
Hopper environment.
Classes:
| Name | Description |
|---|---|
MOWalker |
Multi-Objective Ant Environment. Objectives are speed by energy. |
MOWalker
¶
Bases: MultiObjectiveBase
Multi-Objective Ant Environment. Objectives are speed by energy.
Methods:
| Name | Description |
|---|---|
reset |
|
state_vector |
|
step |
|
termination |
|
reward_function |
|
reward_alive |
|
reward_energy |
|
reward_run |
|
reward_done |
|
Attributes:
| Name | Type | Description |
|---|---|---|
action_size |
|
Source code in src/moplayground/envs/dmcontrol/walker.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
reset
¶
Source code in src/moplayground/envs/dmcontrol/walker.py
state_vector
¶
step
¶
Source code in src/moplayground/envs/dmcontrol/walker.py
termination
¶
reward_function
¶
Source code in src/moplayground/envs/dmcontrol/walker.py
reward_alive
¶
reward_energy
¶
reward_run
¶
moplayground.envs.dmcontrol.ant
¶
Classes:
| Name | Description |
|---|---|
MOAnt |
Multi-Objective Ant Environment. Objectives are vx by vy. |
MOAnt
¶
Bases: MultiObjectiveBase
Multi-Objective Ant Environment. Objectives are vx by vy.
Methods:
| Name | Description |
|---|---|
reset |
|
state_vector |
|
step |
|
fall_termination |
|
reward_function |
|
reward_alive |
|
reward_energy |
|
reward_vx |
|
reward_vy |
|
Attributes:
| Name | Type | Description |
|---|---|---|
action_size |
|
Source code in src/moplayground/envs/dmcontrol/ant.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
reset
¶
Source code in src/moplayground/envs/dmcontrol/ant.py
state_vector
¶
step
¶
Source code in src/moplayground/envs/dmcontrol/ant.py
fall_termination
¶
reward_function
¶
Source code in src/moplayground/envs/dmcontrol/ant.py
reward_alive
¶
reward_energy
¶
reward_vx
¶
moplayground.envs.dmcontrol.humanoid
¶
Classes:
| Name | Description |
|---|---|
MOHumanoid |
Multi-Objective Humanoid Environment. Objectives are speed by energy. |
MOHumanoid
¶
Bases: MultiObjectiveBase
Multi-Objective Humanoid Environment. Objectives are speed by energy.
Methods:
| Name | Description |
|---|---|
reset |
|
mass_center |
|
step |
|
fall_termination |
|
reward_function |
|
reward_alive |
|
reward_run |
|
reward_done |
|
reward_energy |
|
joint_angles |
Returns the state without global orientation or position. |
torso_vertical_orientation |
Returns the z-projection of the torso orientation matrix. |
com_position |
Returns the position of the center of mass in global coordinates. |
head_height |
Returns the height of the torso. |
torso_upright |
Returns projection from z-axes of torso to the z-axes of world. |
extremities |
Returns end effector positions in the egocentric frame. |
Attributes:
| Name | Type | Description |
|---|---|---|
qfrc_max |
|
|
action_size |
|
Source code in src/moplayground/envs/dmcontrol/humanoid.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
qfrc_max
instance-attribute
¶
reset
¶
Source code in src/moplayground/envs/dmcontrol/humanoid.py
mass_center
¶
step
¶
Source code in src/moplayground/envs/dmcontrol/humanoid.py
fall_termination
¶
reward_function
¶
Source code in src/moplayground/envs/dmcontrol/humanoid.py
reward_alive
¶
reward_run
¶
reward_done
¶
reward_energy
¶
Source code in src/moplayground/envs/dmcontrol/humanoid.py
joint_angles
¶
torso_vertical_orientation
¶
Returns the z-projection of the torso orientation matrix.
com_position
¶
Returns the position of the center of mass in global coordinates.
head_height
¶
torso_upright
¶
Returns projection from z-axes of torso to the z-axes of world.
extremities
¶
Returns end effector positions in the egocentric frame.
Source code in src/moplayground/envs/dmcontrol/humanoid.py
moplayground.envs.dmcontrol.interface
¶
Classes:
| Name | Description |
|---|---|
CheetahInterface |
|
HopperInterface |
|
AntInterface |
|
WalkerInterface |
|
HumanoidInterface |
|
Attributes:
| Name | Type | Description |
|---|---|---|
INTERFACE_PATH |
|
CheetahInterface
¶
Attributes:
| Name | Type | Description |
|---|---|---|
XML |
|
|
DEFAULT_FF |
|
|
DEFAULT_JT |
|
Source code in src/moplayground/envs/dmcontrol/interface.py
HopperInterface
¶
Attributes:
| Name | Type | Description |
|---|---|---|
XML |
|
|
DEFAULT_FF |
|
|
DEFAULT_JT |
|
Source code in src/moplayground/envs/dmcontrol/interface.py
AntInterface
¶
Attributes:
| Name | Type | Description |
|---|---|---|
XML |
|
|
DEFAULT_FF |
|
|
DEFAULT_JT |
|
Source code in src/moplayground/envs/dmcontrol/interface.py
DEFAULT_JT
class-attribute
instance-attribute
¶
WalkerInterface
¶
Attributes:
| Name | Type | Description |
|---|---|---|
XML |
|
|
DEFAULT_FF |
|
|
DEFAULT_JT |
|
Source code in src/moplayground/envs/dmcontrol/interface.py
HumanoidInterface
¶
Methods:
| Name | Description |
|---|---|
com_vel |
Returns the velocity of the center of mass in global coordinates. |
Attributes:
| Name | Type | Description |
|---|---|---|
XML |
|
|
MJ_MODEL |
|
|
DEFAULT_FF |
|
|
DEFAULT_JT |
|
|
HEAD_ID |
|
|
TORSO_ID |
|
|
LH_ID |
|
|
RH_ID |
|
|
LF_ID |
|
|
RF_ID |
|
|
EXTREMITY_IDS |
|
Source code in src/moplayground/envs/dmcontrol/interface.py
com_vel
classmethod
¶
Returns the velocity of the center of mass in global coordinates.
Bipedal locomotion¶
moplayground.envs.locomotion.generic.bipedal
¶
Classes:
| Name | Description |
|---|---|
BipedalBase |
Atalante walker task. |
Attributes:
| Name | Type | Description |
|---|---|---|
CHILD_ERROR |
|
BipedalBase
¶
Bases: MultiObjectiveBase
Atalante walker task.
Methods:
| Name | Description |
|---|---|
periodic_push |
Assigns random pushes/perturbations that turn on and off based on the |
randomize_velocity |
|
reset |
Resets the environment to an initial state. Takes in a random key |
get_bounds |
|
get_curriculum_level |
|
make_history |
|
update_history |
|
randomize_dynamics |
|
noisy |
Generates zero-mean uniform noise in [-lim, lim]. Limits are scaled |
handle_env_customization |
|
add_random_ff |
|
add_random_joint_state |
|
get_fall_termination |
|
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | |
periodic_push
¶
Assigns random pushes/perturbations that turn on and off based on the configuration and the current state of the environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
MJX data for the robot/environment |
required | |
info
|
dict
|
State info dict; holds the push RNG and timers |
required |
body_id
|
int
|
the body to apply the push to |
required |
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
randomize_velocity
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
reset
¶
reset(rng: Array, data: Data, torso_id: int, floor_id: int, ndof: int, num_resets: int = 0, njoint: int | None = None) -> State
Resets the environment to an initial state. Takes in a random key (rng) as input and outputs the first state of the environment.
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
get_bounds
¶
get_curriculum_level
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
make_history
¶
update_history
¶
randomize_dynamics
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | |
noisy
¶
Generates zero-mean uniform noise in [-lim, lim]. Limits are scaled by curr_level (curriculum level).
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
handle_env_customization
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
add_random_ff
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
add_random_joint_state
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
get_fall_termination
¶
Source code in src/moplayground/envs/locomotion/generic/bipedal.py
moplayground.envs.locomotion.generic.navigait
¶
Joystick gait tracking for Atalante.
Classes:
| Name | Description |
|---|---|
NaviGait |
Implements the NaviGait hybrid architecture for bipedal locomotion. Combines |
NaviGait
¶
Bases: BipedalBase
Implements the NaviGait hybrid architecture for bipedal locomotion. Combines gait libraries with traditional reinfrocement learning for enhanced locomotion strategies. For more details, read NaviGait, Janwani et. al. (2026).
This class should be generic to any bipedal robot with a suitable gait library.
Methods:
| Name | Description |
|---|---|
set_initial_data |
|
initialization_randomization |
|
set_gaitlib |
|
reset |
|
update_info |
|
check_reset |
|
animate_data |
|
pre_process_action |
Pre-processes the residual actions and re-evaluates the gait library |
get_relative_qpos |
|
update_internal_state |
Updates the internal state of the environment based on the new data. |
get_stand_termination |
|
reward_residual_vel_rate |
|
Attributes:
| Name | Type | Description |
|---|---|---|
animate |
|
|
num_states |
|
|
num_degrees |
|
|
track_yaw |
|
|
gaitlib |
|
|
params |
|
Source code in src/moplayground/envs/locomotion/generic/navigait.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | |
gaitlib
instance-attribute
¶
gaitlib = GaitLibrary.from_directory(path=gaitlib_path, v0=self._np.array([0.0, 0.0]), num_states=self.num_states, num_degree=num_degree, gnp=self._np, fact=factorial, gait_type=gait_type)
set_initial_data
¶
Source code in src/moplayground/envs/locomotion/generic/navigait.py
initialization_randomization
¶
Source code in src/moplayground/envs/locomotion/generic/navigait.py
set_gaitlib
¶
Source code in src/moplayground/envs/locomotion/generic/navigait.py
reset
¶
reset(rng: Array, gaitlib: GaitLibrary, global_qpos: Array, global_qvel: Array, ctrl: Array, ndof: int, torso_id: int, floor_id: int, num_resets: int, njoint=None) -> State
Source code in src/moplayground/envs/locomotion/generic/navigait.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
update_info
¶
update_info(parent_state, global_hzd_qpos, global_hzd_qvel, noisy_gyro, noisy_accel, qpos_history_len, gyro_history_len, accel_history_len)
Source code in src/moplayground/envs/locomotion/generic/navigait.py
check_reset
¶
Source code in src/moplayground/envs/locomotion/generic/navigait.py
animate_data
¶
Source code in src/moplayground/envs/locomotion/generic/navigait.py
pre_process_action
¶
pre_process_action(time: Array, info: dict[str | Array], res_joints: Array, res_vel: Array, recurrent_states: Array, ndof: int) -> Array
Pre-processes the residual actions and re-evaluates the gait library to compute the desired joint targets.
Source code in src/moplayground/envs/locomotion/generic/navigait.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
get_relative_qpos
¶
Source code in src/moplayground/envs/locomotion/generic/navigait.py
update_internal_state
¶
update_internal_state(time: Array, qpos: Array, qvel: Array, info: dict[str, Array], res_joints: Array, left_ground_contact: bool, right_ground_contact: bool, gyro: Array, accel: Array, ndof: int, qpos_noise: float, qvel_noise: float, attitude_noise: float) -> dict[str | Array]
Updates the internal state of the environment based on the new data. Necessary to compute the observations for next policy inference
Source code in src/moplayground/envs/locomotion/generic/navigait.py
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | |
get_stand_termination
¶
reward_residual_vel_rate
¶
reward_residual_vel_rate(vdes_res: Array, last_vdes_res: Array, vdes_res_rate_sigma: Array) -> Array
Source code in src/moplayground/envs/locomotion/generic/navigait.py
moplayground.envs.locomotion.bruce.navigait
¶
Joystick gait tracking for Atalante.
Classes:
| Name | Description |
|---|---|
Bruce |
A class for tracking joystick-controlled gait in a simulated environment. |
Bruce
¶
Bases: NaviGait
A class for tracking joystick-controlled gait in a simulated environment.
Methods:
| Name | Description |
|---|---|
reset |
|
get_sensor_values |
|
get_gait_qpos_init |
|
reset_ctrl |
|
step |
|
get_ctrl |
Returns the control signal for the environment. |
reward_function |
|
reward_energy |
|
get_desired_arm_swing |
|
reward_arm_swinging |
|
reward_foot_contact |
Reward for foot contact. |
cost_impact_velocity |
|
Attributes:
| Name | Type | Description |
|---|---|---|
nq |
|
|
nv |
|
|
action_size |
int
|
|
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
reset
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
get_sensor_values
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
get_gait_qpos_init
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
reset_ctrl
¶
reset_ctrl(initial_vdes: ndarray, global_hzd_qpos: ndarray, gyro: ndarray, accel: ndarray, random_seed: int, policy)
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
step
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | |
get_ctrl
¶
get_ctrl(time: float, ext_crank_pos: ndarray, ext_crank_vel: ndarray, info: dict[str | ndarray], gyro: ndarray, accel: ndarray) -> Array
Returns the control signal for the environment.
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
reward_function
¶
reward_function(data: Data, action: Array, info: dict[str, Any], done: Array) -> tuple[dict[str, Array], dict[str, Array]]
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
reward_energy
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
get_desired_arm_swing
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
reward_arm_swinging
¶
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
reward_foot_contact
¶
Reward for foot contact.
Source code in src/moplayground/envs/locomotion/bruce/navigait.py
cost_impact_velocity
¶
moplayground.envs.locomotion.control.gait
¶
Classes:
| Name | Description |
|---|---|
GaitLibrary |
|
Functions:
| Name | Description |
|---|---|
get_states |
|
Attributes:
| Name | Type | Description |
|---|---|---|
MIN_SWING_PHASE |
|
|
path |
|
|
v0 |
|
|
num_states |
|
|
num_degree |
|
|
gaitlib |
|
|
axs |
|
|
phase |
|
|
old_states |
|
gaitlib
module-attribute
¶
gaitlib = GaitLibrary.from_directory(path=path, v0=v0, num_states=num_states, num_degree=num_degree, gait_type='P2', gnp=np, fact=factorial)
GaitLibrary
dataclass
¶
Methods:
| Name | Description |
|---|---|
from_directory |
Loads a gait library from a directory of yaml files. It should setup |
get_1D_idx |
|
find_nearest |
Finds the nearest gaits in the gait library with respect to the desired velocity. The output will be FOUR gaits. |
combine_gaits |
Combines gaits. |
interpolate_gait |
Interpolates a gait between the current gait and the input gait. |
set_gait |
Defines an interpolated gait between the current gait, and the input |
reset_gait |
|
set_new_coeffs |
|
get_phase |
|
get_step_phase |
|
evaluate |
|
evaluate2 |
|
blend_gait |
|
ff_evaluate |
|
impact_reset |
Returns a new GaitLibrary object with the swing leg switched and |
tree_flatten |
|
tree_unflatten |
|
Attributes:
| Name | Type | Description |
|---|---|---|
num_gaits |
int
|
|
num_states |
int
|
|
num_degree |
int
|
|
num_vx_gaits |
int
|
|
bezier |
P1Bezier
|
|
jt_coeffs |
ndarray | ndarray
|
|
jt_dcoeffs |
ndarray | ndarray
|
|
ff_coeffs |
ndarray | ndarray
|
|
ff_dcoeffs |
ndarray | ndarray
|
|
curr_jt |
ndarray | ndarray
|
|
curr_djt |
ndarray | ndarray
|
|
curr_ff |
ndarray | ndarray
|
|
curr_dff |
ndarray | ndarray
|
|
curr_period |
float
|
|
step_period |
float
|
|
curr_vdes |
ndarray | ndarray
|
|
periods |
ndarray | ndarray
|
|
vel_xs |
ndarray | ndarray
|
|
vel_ys |
ndarray | ndarray
|
|
swing_leg |
int
|
|
t0 |
float
|
|
t0_step |
float
|
|
blend |
float
|
|
offset_pos |
ndarray | ndarray
|
|
offset_vel |
ndarray | ndarray
|
|
gnp |
object
|
|
side_offset |
ndarray | ndarray
|
|
Source code in src/moplayground/envs/locomotion/control/gait.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
side_offset
class-attribute
instance-attribute
¶
from_directory
classmethod
¶
from_directory(path, v0, num_states, num_degree, gnp: object = field(default_factory=lambda: numpy), fact: callable = field(default_factory=lambda: factorial), swing_leg=LEFT, t0=0.0, blend=0.3, gait_type='P1')
Loads a gait library from a directory of yaml files. It should setup jt_coeffs and ff_coeffs to hold a list of coefficients for each gait in the directory.
Source code in src/moplayground/envs/locomotion/control/gait.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
get_1D_idx
¶
find_nearest
¶
Finds the nearest gaits in the gait library with respect to the desired velocity. The output will be FOUR gaits.
vdes: (np.ndarray) desired velocity (vx, vy)
(vx_gaits, vy_gaits)
| Name | Type | Description |
|---|---|---|
vx_gaits |
(alpha1, alpha2, weight_alpha) vy_gaits: (beta1, beta2, weight_beta) |
Source code in src/moplayground/envs/locomotion/control/gait.py
combine_gaits
¶
Combines gaits.
Returns a single convex combination of the four gaits. Size will be (2, nstates, ndegree + 1) as it includes the relabeling.
Source code in src/moplayground/envs/locomotion/control/gait.py
interpolate_gait
¶
Interpolates a gait between the current gait and the input gait. This method should be iteratively run to ensure smoothness.
Source code in src/moplayground/envs/locomotion/control/gait.py
set_gait
¶
Defines an interpolated gait between the current gait, and the input gait. This method should be iteratively run to ensure smoothness.
rho_desired: (np.ndarray) gait to interpolate to, shape includes relabeling (2, nstates, ndegree + 1)
Returns rho_predicted: (np.ndarray) interpolated gait, shape includes relabeling (2, nstates, ndegree + 1)
Source code in src/moplayground/envs/locomotion/control/gait.py
reset_gait
¶
Source code in src/moplayground/envs/locomotion/control/gait.py
set_new_coeffs
¶
set_new_coeffs(jt_coeff, jt_dcoeff, ff_coeff, ff_dcoeff, period, t0, vdes, step_period, t0_step, swing_leg)
Source code in src/moplayground/envs/locomotion/control/gait.py
get_phase
¶
get_step_phase
¶
evaluate
¶
Source code in src/moplayground/envs/locomotion/control/gait.py
evaluate2
¶
Source code in src/moplayground/envs/locomotion/control/gait.py
blend_gait
¶
Source code in src/moplayground/envs/locomotion/control/gait.py
ff_evaluate
¶
Source code in src/moplayground/envs/locomotion/control/gait.py
impact_reset
¶
Returns a new GaitLibrary object with the swing leg switched and blending applied
Source code in src/moplayground/envs/locomotion/control/gait.py
tree_flatten
¶
Source code in src/moplayground/envs/locomotion/control/gait.py
get_states
¶
moplayground.envs.locomotion.control.bezier
¶
Classes:
| Name | Description |
|---|---|
Leg |
|
P1Bezier |
|
Functions:
| Name | Description |
|---|---|
bezier_basis_matrix |
Returns the Bézier basis matrix M for degree n such that: |
Attributes:
| Name | Type | Description |
|---|---|---|
bezier |
|
|
BEZ1 |
|
|
BEZ2 |
|
|
bez1_contents |
|
|
bez2_contents |
|
|
bez1_coeff |
|
|
bez1_dcoeff |
|
|
bez1_period |
|
|
bez2_coeff |
|
|
bez2_dcoeff |
|
|
bez2_period |
|
|
N |
|
|
SPLIT1 |
|
|
SPLIT2 |
|
|
t |
|
|
bez1_pos |
|
|
bez2_pos |
|
|
bez1_vel |
|
|
bez2_vel |
|
|
start |
|
|
K |
|
|
axs |
|
bezier
module-attribute
¶
bez1_coeff
module-attribute
¶
bez1_coeff = bezier.reshape_coeff(bezier.bnp.array(bez1_contents['RightSS']['coeff_b']), 6)
bez2_coeff
module-attribute
¶
bez2_coeff = bezier.reshape_coeff(bezier.bnp.array(bez2_contents['LeftSS']['coeff_b']), 6)
Leg
¶
P1Bezier
dataclass
¶
Methods:
| Name | Description |
|---|---|
setup |
|
reshape_coeff |
Reshapes the coefficients to be of the correct size |
relabel |
Relabels the bezier polynomial according to the class strategy and |
get_dcoeff_transform |
|
compute_dcoeff |
Computes the derivative coefficients for the bezier polynomial and |
get_binomial_coeffs |
Returns the binomial coefficients for a given n |
get_z_transform |
|
evaluate |
Evaluates the bezier polynomial described by coeffs for all states at |
split |
Returns a 'split' Bezier coefficients at z, where z in [0, 1] is the |
interpolate |
Returns Bezier coefficients that start at start_coeff and end at |
to_quat |
Converts a flying frame position from RPY to quaternion for mujoco |
tree_flatten |
|
tree_unflatten |
|
Attributes:
| Name | Type | Description |
|---|---|---|
num_states |
int
|
|
num_degree |
int
|
|
COMBINATION |
ndarray | ndarray
|
|
COMBO_MAT |
ndarray | ndarray
|
|
COMBO_MAT_INV |
ndarray | ndarray
|
|
DCOMBO_MAT |
ndarray | ndarray
|
|
DCOEFF_T |
ndarray | ndarray
|
|
POWER |
ndarray | ndarray
|
|
bnp |
object
|
|
fact |
callable
|
|
FREE_STATES |
int
|
|
Source code in src/moplayground/envs/locomotion/control/bezier.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
fact
class-attribute
instance-attribute
¶
setup
classmethod
¶
Source code in src/moplayground/envs/locomotion/control/bezier.py
reshape_coeff
¶
relabel
¶
Relabels the bezier polynomial according to the class strategy and returns the corresponding ctrl_points and dcoeff
Source code in src/moplayground/envs/locomotion/control/bezier.py
get_dcoeff_transform
classmethod
¶
Source code in src/moplayground/envs/locomotion/control/bezier.py
compute_dcoeff
¶
Computes the derivative coefficients for the bezier polynomial and returns the corresponding dcoeff for jt and ff in a tuple
Source code in src/moplayground/envs/locomotion/control/bezier.py
get_binomial_coeffs
¶
Returns the binomial coefficients for a given n
Source code in src/moplayground/envs/locomotion/control/bezier.py
get_z_transform
¶
evaluate
¶
Evaluates the bezier polynomial described by coeffs for all states at parameter s. s is clipped to [0,1] and is ideally monotonic.
Source code in src/moplayground/envs/locomotion/control/bezier.py
split
¶
Returns a 'split' Bezier coefficients at z, where z in [0, 1] is the point in the Bezier phase you wish to split at.
Source code in src/moplayground/envs/locomotion/control/bezier.py
interpolate
¶
Returns Bezier coefficients that start at start_coeff and end at end_coeff.
Source code in src/moplayground/envs/locomotion/control/bezier.py
to_quat
¶
Converts a flying frame position from RPY to quaternion for mujoco
tree_flatten
¶
bezier_basis_matrix
¶
Returns the Bézier basis matrix M for degree n such that
B(t) = [t^n, t^{n-1}, ..., 1] @ M @ [b_0, ..., b_n]^T