Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mujocolab/mjlab
/ functions
Functions
2,812 in github.com/mujocolab/mjlab
⨍
Functions
2,812
◇
Types & classes
316
↳
Endpoints
15
Function
test_qfrc_external_matches_mj_applyFT
qfrc_external should match J^T * xfrc_applied computed by CPU MuJoCo.
tests/test_entity_data.py:542
Function
test_quat_composes_with_default
Fixed yaw=pi/4 matches manual quat_mul(q_yaw, q_default).
tests/test_domain_randomization.py:568
Function
test_quat_is_unit_quaternion
All output quaternions must have unit norm (within 1e-6).
tests/test_domain_randomization.py:530
Function
test_quat_zero_range_unchanged
All ranges (0, 0): result equals default quaternion.
tests/test_domain_randomization.py:554
Function
test_r_mpkpe_uses_relative_reference
R-MPKPE reads the re-anchored reference, not the global one. Setting body_pos_w to match the robot exactly would yield zero error if it were (inc
tests/test_tracking_metrics.py:97
Function
test_r_mpkpe_zero_when_relative_positions_match
R-MPKPE is zero when re-anchored positions are identical.
tests/test_tracking_metrics.py:83
Function
test_randomize_encoder_bias_event
randomize_encoder_bias should sample values within specified range.
tests/test_encoder_bias.py:266
Function
test_range_constraints
x/y range filters restrict where patches can land.
tests/test_flat_patch_sampling.py:46
Function
test_ray_alignment_world
Verify world alignment keeps rays fixed.
tests/test_raycast_sensor.py:635
Function
test_ray_alignment_yaw
Verify yaw alignment ignores pitch/roll.
tests/test_raycast_sensor.py:582
Function
test_ray_alignment_yaw_singularity
Test yaw alignment handles 90 degree pitch singularity correctly. With yaw alignment, rays should maintain their pattern regardless of body pitch
tests/test_raycast_sensor.py:698
Function
test_raycast_body_rotation_affects_rays
Verify rays rotate with the body frame.
tests/test_raycast_sensor.py:399
Function
test_raycast_different_direction
Verify rays work with non-default direction.
tests/test_raycast_sensor.py:280
Function
test_raycast_error_on_invalid_frame_type
Verify ValueError is raised for invalid frame type.
tests/test_raycast_sensor.py:318
Function
test_raycast_exclude_parent_body
Verify parent body is excluded from ray intersection when configured.
tests/test_raycast_sensor.py:118
Function
test_raycast_frame_attachment_geom
Verify rays can be attached to a geom frame.
tests/test_raycast_sensor.py:196
Function
test_raycast_frame_attachment_site
Verify rays can be attached to a site frame.
tests/test_raycast_sensor.py:229
Function
test_raycast_grid_pattern_num_rays
Verify grid pattern generates correct number of rays.
tests/test_raycast_sensor.py:250
Function
test_raycast_hit_pos_w_correctness
Verify hit_pos_w returns correct world-space hit positions.
tests/test_raycast_sensor.py:336
Function
test_raycast_include_geom_groups
Verify include_geom_groups filters which geoms are hit.
tests/test_raycast_sensor.py:140
Function
test_raycast_max_distance_clamping
Verify hits beyond max_distance are reported as misses.
tests/test_raycast_sensor.py:366
Function
test_raycast_miss_returns_negative_one
Verify rays that miss return distance of -1.
tests/test_raycast_sensor.py:84
Function
test_raycast_normals_point_up
Verify surface normals point upward when hitting a horizontal floor.
tests/test_raycast_sensor.py:60
Function
test_read_requires_forward_to_be_current
Test read properties are stale until forward() is called. Demonstrates why event order matters and why forward() is needed between writes and rea
tests/test_entity_data.py:205
Function
test_recompute_level_ordering
IntEnum max() gives strongest level.
tests/test_events.py:133
Function
test_recompute_not_called_when_no_dr_fired
Non-DR events don't trigger recompute.
tests/test_events.py:142
Function
test_record_post_reset_fires_after_obs_are_fresh
record_post_reset is called after obs are computed, so obs_buf already holds the new-episode initial observation for the reset environments.
tests/test_recorder_manager.py:158
Function
test_record_post_reset_passes_env_ids
( manager_and_term: tuple[RecorderManager, _CountingRecorder], )
tests/test_recorder_manager.py:222
Function
test_record_post_step_called_each_step
( manager_and_term: tuple[RecorderManager, _CountingRecorder], )
tests/test_recorder_manager.py:203
Function
test_record_pre_reset_before_record_post_step_in_step
record_pre_reset fires before record_post_step within a single step.
tests/test_recorder_manager.py:180
Function
test_record_pre_reset_obs_buf_is_previous_step
obs_buf at record_pre_reset is the previous step's observation, not the post-action terminal state. It is the input obs the agent used to pick the t
tests/test_recorder_manager.py:122
Function
test_record_pre_reset_passes_env_ids
( manager_and_term: tuple[RecorderManager, _CountingRecorder], )
tests/test_recorder_manager.py:212
Function
test_recursive_child_body_count_mismatch_rejected
Variants with different grandchild counts fail recursive validation.
tests/test_variants.py:501
Function
test_recursive_child_body_name_mismatch_rejected
()
tests/test_variants.py:513
Function
test_recursive_joint_mismatch_in_child_body_rejected
()
tests/test_variants.py:532
Function
test_reduce_last_reports_final_step_value
reduce='last' reports the last step's value, not the episode average.
tests/test_metrics_manager.py:179
Function
test_reduce_max_coexists_with_mean_and_last
All three reduce modes work correctly in the same manager.
tests/test_metrics_manager.py:284
Function
test_reduce_max_reports_episode_peak
reduce='max' reports the highest value seen during the episode.
tests/test_metrics_manager.py:244
Function
test_reduce_max_reset_clears_to_neg_inf
After reset, max tracking restarts from -inf.
tests/test_metrics_manager.py:264
Function
test_reduce_max_with_per_substep
reduce='max' with per_substep tracks the max of step-averaged values.
tests/test_metrics_manager.py:312
Function
test_reduce_mean_and_last_coexist
Mixed reduce modes in the same manager report correctly.
tests/test_metrics_manager.py:199
Function
test_reduce_modes
Verify reduction modes correctly aggregate multiple simultaneous contacts. Tests "none" (no filtering), "mindist" (closest contact), "maxforce" (st
tests/test_contact_sensor.py:315
Function
test_reduce_modes_multiple_contacts
Test reduction modes with multiple simultaneous contacts.
tests/test_contact_sensor.py:340
Function
test_regex_pattern_matching
Verify regex patterns correctly match multiple geoms with similar names. Tests that a pattern like ".*foot_geom$" matches all geoms ending with "
tests/test_contact_sensor.py:261
Function
test_relative_joint_position_ignores_encoder_bias
Encoder bias must not affect the target: target = current_pos + delta.
tests/test_actions.py:287
Function
test_relative_joint_position_nonzero_action
With nonzero action, targets shift by action * scale from current.
tests/test_actions.py:266
Function
test_relative_joint_position_offset_raises
Setting offset on RelativeJointPositionActionCfg raises ValueError.
tests/test_actions.py:313
Function
test_relative_joint_position_zero_action
With zero action, targets equal current_pos.
tests/test_actions.py:248
Function
test_render_at_frame_rate
()
tests/test_viewer_tick.py:98
Function
test_reserved_prefix_in_mesh_rejected
()
tests/test_variants.py:618
Function
test_reset_all_none_path
reset(None) zeros the entire buffer and counters without indexing.
tests/test_circular_buffer.py:107
Function
test_reset_calls_policy_reset
reset_environment() calls policy.reset() if available.
tests/test_viewer_tick.py:184
Function
test_reset_clears
()
tests/test_viewer_tick.py:173
Function
test_reset_clears_all_envs
Test that reset without env_ids clears all environments.
tests/test_observation_history.py:261
Function
test_reset_clears_buffer
Reset clears delay buffers so old values don't leak through.
tests/test_builtin_group.py:152
Function
test_reset_clears_buffers
(device)
tests/test_differential_ik_action.py:194
Function
test_reset_clears_delay_buffer
(device)
tests/test_builtin_pd_actuator.py:222
Function
test_reset_clears_delay_buffer
Test that reset clears delay buffer and restarts lag constraint.
tests/test_observation_delay.py:288
Function
test_reset_joints_by_offset
reset_joints_by_offset applies offsets and respects joint limits.
tests/test_events.py:484
Function
test_reset_joints_by_offset_respects_unlimited
reset_joints_by_offset must not clamp unlimited joints to [0, 0].
tests/test_entity_data.py:454
Function
test_reset_partial_envs
Test that reset with specific env_ids only resets those envs.
tests/test_observation_history.py:290
Function
test_reset_partial_envs_with_backfill
Test that reset envs get backfilled on next update.
tests/test_observation_history.py:330
Function
test_reset_partial_envs_with_verification
Test partial reset actually resets only specified environments.
tests/test_observation_delay.py:326
Function
test_reset_without_policy_reset
reset_environment() works fine when policy has no reset method.
tests/test_viewer_tick.py:194
Function
test_resolve_unknown_distribution_raises
Unknown distribution string raises ValueError.
tests/test_domain_randomization.py:1602
Function
test_resolve_unknown_operation_raises
Unknown operation string raises ValueError.
tests/test_domain_randomization.py:1594
Function
test_resume_no_burst
()
tests/test_viewer_tick.py:118
Function
test_reward_logs_only_staged_keys
()
tests/test_envs_curriculums.py:248
Function
test_reward_manager_handles_nan_values
Test that RewardManager converts NaN/Inf reward values to zero.
tests/test_rewards.py:233
Function
test_reward_manager_handles_neginf_values
Test that RewardManager converts negative infinity to zero.
tests/test_rewards.py:257
Function
test_reward_multiple_params_updated
()
tests/test_envs_curriculums.py:140
Function
test_reward_omits_weight_when_not_staged
()
tests/test_envs_curriculums.py:259
Function
test_reward_params_unchanged_before_threshold
()
tests/test_envs_curriculums.py:133
Function
test_reward_params_updated
()
tests/test_envs_curriculums.py:126
Function
test_reward_scaling_default_is_enabled
Test that scale_by_dt defaults to True for backward compatibility.
tests/test_rewards.py:317
Function
test_reward_scaling_disabled
Test that rewards are not scaled by dt when scale_by_dt=False.
tests/test_rewards.py:296
Function
test_reward_scaling_enabled
Test that rewards are scaled by dt when scale_by_dt=True (default).
tests/test_rewards.py:274
Function
test_reward_shape_validation_rejects_bad_compute_output
Reward terms must return one scalar per environment.
tests/test_rewards.py:334
Function
test_reward_weight_and_params_in_same_stage
()
tests/test_envs_curriculums.py:151
Function
test_reward_weight_applied_at_threshold
()
tests/test_envs_curriculums.py:80
Function
test_reward_weight_later_stage_wins
()
tests/test_envs_curriculums.py:87
Function
test_reward_weight_partial_application
()
tests/test_envs_curriculums.py:102
Function
test_reward_weight_unchanged_before_threshold
()
tests/test_envs_curriculums.py:73
Function
test_ring_pattern_concentric
Concentric rings: 1 center + 4 + 6 + 8 = 19 rays.
tests/test_raycast_sensor.py:1047
Function
test_ring_pattern_hits_floor
Ring pattern hits floor and ring offsets lie on a circle.
tests/test_raycast_sensor.py:1079
Function
test_ring_pattern_no_center
Ring with include_center=False omits the center ray.
tests/test_raycast_sensor.py:1124
Function
test_ring_pattern_num_rays
Ring with 8 samples + center = 9 rays.
tests/test_raycast_sensor.py:1021
Function
test_robot_compiles_parametrized
Tests that all robots in the asset zoo compile without errors.
tests/test_asset_zoo.py:15
Function
test_root_state_read_write
Test root state can be written and read from simulation.
tests/test_entity.py:294
Function
test_root_velocity_frame_conversion
Test angular velocity converts from world to body frame internally. The API accepts angular velocity in world frame, but MuJoCo's qvel stores it
tests/test_entity_data.py:97
Function
test_root_velocity_world_frame_roundtrip
Test reading and writing root velocity is a no-op (world frame). Verifies that the API is consistent: if you write a velocity, read it back, and
tests/test_entity_data.py:68
Function
test_rough_terrain_write_xml_roundtrip
Export terrain with hfield via Entity.write_xml, reload as MjModel.
tests/test_xml_utils.py:64
Function
test_rough_terrains_cfg_structure
()
tests/test_terrain_config.py:35
Function
test_rough_velocity_play_has_curriculum_disabled
Rough velocity play tasks should have terrain curriculum disabled.
tests/test_velocity_task.py:144
Function
test_rough_velocity_tasks_have_generator_terrain
Rough velocity tasks should have generator terrain.
tests/test_velocity_task.py:107
Function
test_rough_velocity_training_has_curriculum_enabled
Rough velocity training tasks should have terrain curriculum enabled.
tests/test_velocity_task.py:124
Function
test_runner_handles_old_checkpoints_without_env_state
Old checkpoints without env_state should load without crashing.
tests/test_runner.py:125
Function
test_runner_persists_common_step_counter
MjlabOnPolicyRunner should save and restore common_step_counter.
tests/test_runner.py:101
Function
test_sameframe_fix_makes_host_forward_match_variant
Clearing sameframe shortcuts aligns host mj_forward with variant.
tests/test_variants.py:1711
Function
test_scalar_material_fields_abs
Scalar material fields randomize per selected material.
tests/test_domain_randomization.py:1676
← previous
next →
2,501–2,600 of 2,812, ranked by callers