MCPcopy Create free account

hub / github.com/mujocolab/mjlab / functions

Functions2,812 in github.com/mujocolab/mjlab

Functiontest_qfrc_external_matches_mj_applyFT
qfrc_external should match J^T * xfrc_applied computed by CPU MuJoCo.
tests/test_entity_data.py:542
Functiontest_quat_composes_with_default
Fixed yaw=pi/4 matches manual quat_mul(q_yaw, q_default).
tests/test_domain_randomization.py:568
Functiontest_quat_is_unit_quaternion
All output quaternions must have unit norm (within 1e-6).
tests/test_domain_randomization.py:530
Functiontest_quat_zero_range_unchanged
All ranges (0, 0): result equals default quaternion.
tests/test_domain_randomization.py:554
Functiontest_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
Functiontest_r_mpkpe_zero_when_relative_positions_match
R-MPKPE is zero when re-anchored positions are identical.
tests/test_tracking_metrics.py:83
Functiontest_randomize_encoder_bias_event
randomize_encoder_bias should sample values within specified range.
tests/test_encoder_bias.py:266
Functiontest_range_constraints
x/y range filters restrict where patches can land.
tests/test_flat_patch_sampling.py:46
Functiontest_ray_alignment_world
Verify world alignment keeps rays fixed.
tests/test_raycast_sensor.py:635
Functiontest_ray_alignment_yaw
Verify yaw alignment ignores pitch/roll.
tests/test_raycast_sensor.py:582
Functiontest_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
Functiontest_raycast_body_rotation_affects_rays
Verify rays rotate with the body frame.
tests/test_raycast_sensor.py:399
Functiontest_raycast_different_direction
Verify rays work with non-default direction.
tests/test_raycast_sensor.py:280
Functiontest_raycast_error_on_invalid_frame_type
Verify ValueError is raised for invalid frame type.
tests/test_raycast_sensor.py:318
Functiontest_raycast_exclude_parent_body
Verify parent body is excluded from ray intersection when configured.
tests/test_raycast_sensor.py:118
Functiontest_raycast_frame_attachment_geom
Verify rays can be attached to a geom frame.
tests/test_raycast_sensor.py:196
Functiontest_raycast_frame_attachment_site
Verify rays can be attached to a site frame.
tests/test_raycast_sensor.py:229
Functiontest_raycast_grid_pattern_num_rays
Verify grid pattern generates correct number of rays.
tests/test_raycast_sensor.py:250
Functiontest_raycast_hit_pos_w_correctness
Verify hit_pos_w returns correct world-space hit positions.
tests/test_raycast_sensor.py:336
Functiontest_raycast_include_geom_groups
Verify include_geom_groups filters which geoms are hit.
tests/test_raycast_sensor.py:140
Functiontest_raycast_max_distance_clamping
Verify hits beyond max_distance are reported as misses.
tests/test_raycast_sensor.py:366
Functiontest_raycast_miss_returns_negative_one
Verify rays that miss return distance of -1.
tests/test_raycast_sensor.py:84
Functiontest_raycast_normals_point_up
Verify surface normals point upward when hitting a horizontal floor.
tests/test_raycast_sensor.py:60
Functiontest_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
Functiontest_recompute_level_ordering
IntEnum max() gives strongest level.
tests/test_events.py:133
Functiontest_recompute_not_called_when_no_dr_fired
Non-DR events don't trigger recompute.
tests/test_events.py:142
Functiontest_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
Functiontest_record_post_reset_passes_env_ids
( manager_and_term: tuple[RecorderManager, _CountingRecorder], )
tests/test_recorder_manager.py:222
Functiontest_record_post_step_called_each_step
( manager_and_term: tuple[RecorderManager, _CountingRecorder], )
tests/test_recorder_manager.py:203
Functiontest_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
Functiontest_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
Functiontest_record_pre_reset_passes_env_ids
( manager_and_term: tuple[RecorderManager, _CountingRecorder], )
tests/test_recorder_manager.py:212
Functiontest_recursive_child_body_count_mismatch_rejected
Variants with different grandchild counts fail recursive validation.
tests/test_variants.py:501
Functiontest_recursive_child_body_name_mismatch_rejected
()
tests/test_variants.py:513
Functiontest_recursive_joint_mismatch_in_child_body_rejected
()
tests/test_variants.py:532
Functiontest_reduce_last_reports_final_step_value
reduce='last' reports the last step's value, not the episode average.
tests/test_metrics_manager.py:179
Functiontest_reduce_max_coexists_with_mean_and_last
All three reduce modes work correctly in the same manager.
tests/test_metrics_manager.py:284
Functiontest_reduce_max_reports_episode_peak
reduce='max' reports the highest value seen during the episode.
tests/test_metrics_manager.py:244
Functiontest_reduce_max_reset_clears_to_neg_inf
After reset, max tracking restarts from -inf.
tests/test_metrics_manager.py:264
Functiontest_reduce_max_with_per_substep
reduce='max' with per_substep tracks the max of step-averaged values.
tests/test_metrics_manager.py:312
Functiontest_reduce_mean_and_last_coexist
Mixed reduce modes in the same manager report correctly.
tests/test_metrics_manager.py:199
Functiontest_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
Functiontest_reduce_modes_multiple_contacts
Test reduction modes with multiple simultaneous contacts.
tests/test_contact_sensor.py:340
Functiontest_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
Functiontest_relative_joint_position_ignores_encoder_bias
Encoder bias must not affect the target: target = current_pos + delta.
tests/test_actions.py:287
Functiontest_relative_joint_position_nonzero_action
With nonzero action, targets shift by action * scale from current.
tests/test_actions.py:266
Functiontest_relative_joint_position_offset_raises
Setting offset on RelativeJointPositionActionCfg raises ValueError.
tests/test_actions.py:313
Functiontest_relative_joint_position_zero_action
With zero action, targets equal current_pos.
tests/test_actions.py:248
Functiontest_render_at_frame_rate
()
tests/test_viewer_tick.py:98
Functiontest_reserved_prefix_in_mesh_rejected
()
tests/test_variants.py:618
Functiontest_reset_all_none_path
reset(None) zeros the entire buffer and counters without indexing.
tests/test_circular_buffer.py:107
Functiontest_reset_calls_policy_reset
reset_environment() calls policy.reset() if available.
tests/test_viewer_tick.py:184
Functiontest_reset_clears
()
tests/test_viewer_tick.py:173
Functiontest_reset_clears_all_envs
Test that reset without env_ids clears all environments.
tests/test_observation_history.py:261
Functiontest_reset_clears_buffer
Reset clears delay buffers so old values don't leak through.
tests/test_builtin_group.py:152
Functiontest_reset_clears_buffers
(device)
tests/test_differential_ik_action.py:194
Functiontest_reset_clears_delay_buffer
(device)
tests/test_builtin_pd_actuator.py:222
Functiontest_reset_clears_delay_buffer
Test that reset clears delay buffer and restarts lag constraint.
tests/test_observation_delay.py:288
Functiontest_reset_joints_by_offset
reset_joints_by_offset applies offsets and respects joint limits.
tests/test_events.py:484
Functiontest_reset_joints_by_offset_respects_unlimited
reset_joints_by_offset must not clamp unlimited joints to [0, 0].
tests/test_entity_data.py:454
Functiontest_reset_partial_envs
Test that reset with specific env_ids only resets those envs.
tests/test_observation_history.py:290
Functiontest_reset_partial_envs_with_backfill
Test that reset envs get backfilled on next update.
tests/test_observation_history.py:330
Functiontest_reset_partial_envs_with_verification
Test partial reset actually resets only specified environments.
tests/test_observation_delay.py:326
Functiontest_reset_without_policy_reset
reset_environment() works fine when policy has no reset method.
tests/test_viewer_tick.py:194
Functiontest_resolve_unknown_distribution_raises
Unknown distribution string raises ValueError.
tests/test_domain_randomization.py:1602
Functiontest_resolve_unknown_operation_raises
Unknown operation string raises ValueError.
tests/test_domain_randomization.py:1594
Functiontest_resume_no_burst
()
tests/test_viewer_tick.py:118
Functiontest_reward_logs_only_staged_keys
()
tests/test_envs_curriculums.py:248
Functiontest_reward_manager_handles_nan_values
Test that RewardManager converts NaN/Inf reward values to zero.
tests/test_rewards.py:233
Functiontest_reward_manager_handles_neginf_values
Test that RewardManager converts negative infinity to zero.
tests/test_rewards.py:257
Functiontest_reward_multiple_params_updated
()
tests/test_envs_curriculums.py:140
Functiontest_reward_omits_weight_when_not_staged
()
tests/test_envs_curriculums.py:259
Functiontest_reward_params_unchanged_before_threshold
()
tests/test_envs_curriculums.py:133
Functiontest_reward_params_updated
()
tests/test_envs_curriculums.py:126
Functiontest_reward_scaling_default_is_enabled
Test that scale_by_dt defaults to True for backward compatibility.
tests/test_rewards.py:317
Functiontest_reward_scaling_disabled
Test that rewards are not scaled by dt when scale_by_dt=False.
tests/test_rewards.py:296
Functiontest_reward_scaling_enabled
Test that rewards are scaled by dt when scale_by_dt=True (default).
tests/test_rewards.py:274
Functiontest_reward_shape_validation_rejects_bad_compute_output
Reward terms must return one scalar per environment.
tests/test_rewards.py:334
Functiontest_reward_weight_and_params_in_same_stage
()
tests/test_envs_curriculums.py:151
Functiontest_reward_weight_applied_at_threshold
()
tests/test_envs_curriculums.py:80
Functiontest_reward_weight_later_stage_wins
()
tests/test_envs_curriculums.py:87
Functiontest_reward_weight_partial_application
()
tests/test_envs_curriculums.py:102
Functiontest_reward_weight_unchanged_before_threshold
()
tests/test_envs_curriculums.py:73
Functiontest_ring_pattern_concentric
Concentric rings: 1 center + 4 + 6 + 8 = 19 rays.
tests/test_raycast_sensor.py:1047
Functiontest_ring_pattern_hits_floor
Ring pattern hits floor and ring offsets lie on a circle.
tests/test_raycast_sensor.py:1079
Functiontest_ring_pattern_no_center
Ring with include_center=False omits the center ray.
tests/test_raycast_sensor.py:1124
Functiontest_ring_pattern_num_rays
Ring with 8 samples + center = 9 rays.
tests/test_raycast_sensor.py:1021
Functiontest_robot_compiles_parametrized
Tests that all robots in the asset zoo compile without errors.
tests/test_asset_zoo.py:15
Functiontest_root_state_read_write
Test root state can be written and read from simulation.
tests/test_entity.py:294
Functiontest_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
Functiontest_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
Functiontest_rough_terrain_write_xml_roundtrip
Export terrain with hfield via Entity.write_xml, reload as MjModel.
tests/test_xml_utils.py:64
Functiontest_rough_terrains_cfg_structure
()
tests/test_terrain_config.py:35
Functiontest_rough_velocity_play_has_curriculum_disabled
Rough velocity play tasks should have terrain curriculum disabled.
tests/test_velocity_task.py:144
Functiontest_rough_velocity_tasks_have_generator_terrain
Rough velocity tasks should have generator terrain.
tests/test_velocity_task.py:107
Functiontest_rough_velocity_training_has_curriculum_enabled
Rough velocity training tasks should have terrain curriculum enabled.
tests/test_velocity_task.py:124
Functiontest_runner_handles_old_checkpoints_without_env_state
Old checkpoints without env_state should load without crashing.
tests/test_runner.py:125
Functiontest_runner_persists_common_step_counter
MjlabOnPolicyRunner should save and restore common_step_counter.
tests/test_runner.py:101
Functiontest_sameframe_fix_makes_host_forward_match_variant
Clearing sameframe shortcuts aligns host mj_forward with variant.
tests/test_variants.py:1711
Functiontest_scalar_material_fields_abs
Scalar material fields randomize per selected material.
tests/test_domain_randomization.py:1676
← previousnext →2,501–2,600 of 2,812, ranked by callers