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_fallback_when_no_valid_patches
When nothing is flat, all patches fall back to the terrain center.
tests/test_flat_patch_sampling.py:63
Function
test_fewer_envs_than_cols
When num_envs < num_cols, should still work without errors.
tests/test_terrain_proportion_spawning.py:98
Function
test_fewer_than_3_valid_fallback
Fewer than 3 valid points (including zero) falls back to [0, 0, 1].
tests/test_terrain_utils.py:73
Function
test_find_joints_by_actuator_names_preserves_natural_order
Test that find_joints_by_actuator_names returns joints in natural joint order. This is a regression test for a bug where joints were returned in ac
tests/test_entity.py:494
Function
test_find_joints_by_actuator_names_returns_entity_local_indices
Test that find_joints_by_actuator_names returns entity-local indices.
tests/test_entity.py:569
Function
test_find_methods
Test find methods with exact and regex matches.
tests/test_entity.py:267
Function
test_find_with_subset_filtering
Test find methods with subset filtering.
tests/test_entity.py:281
Function
test_fix_spec_xml
Removes empty defaults and optionally injects meshdir.
tests/test_xml_utils.py:46
Function
test_fixed_base_initial_position
Test fixed-base entity's initial pos/rot are applied to the mocap wrapper.
tests/test_entity.py:401
Function
test_fixed_base_mocap_runtime_pose_change
Test fixed-base mocap entity can have its pose changed at runtime.
tests/test_entity.py:464
Function
test_fixed_base_variants_rejected
Variants must be floating-base; fixed-base raises with a clear message.
tests/test_variants.py:356
Function
test_flat_ground
Points on z=0 plane → normal = [0, 0, 1].
tests/test_terrain_utils.py:14
Function
test_flat_velocity_tasks_have_plane_terrain
Flat velocity tasks should have terrain_type='plane' and no terrain_generator.
tests/test_velocity_task.py:91
Function
test_foot_collision_geoms
(g1_model)
tests/test_g1_constants.py:81
Function
test_foot_collision_geoms
Foot collision geoms should have specific properties.
tests/test_go1_constants.py:69
Function
test_foot_height_flat_platform
Two feet at different heights above a flat platform.
tests/test_foot_height_sensor.py:75
Function
test_foot_height_miss_returns_max_distance
Feet beyond max_distance report max_distance, not -1.
tests/test_foot_height_sensor.py:145
Function
test_foot_height_multi_env
Sensor works correctly across multiple environments.
tests/test_foot_height_sensor.py:126
Function
test_foot_height_observation
foot_height observation delegates to sensor.data.heights.
tests/test_foot_height_sensor.py:109
Function
test_foot_height_stepped_terrain
Feet over different terrain heights give different readings.
tests/test_foot_height_sensor.py:92
Function
test_foot_penetration_box
Foot inside box terrain should report near-zero, not box thickness. Regression: rays inside a box hit the bottom face, producing a bogus height e
tests/test_foot_height_sensor.py:202
Function
test_foot_penetration_plane
Foot below a ground plane should report near-zero, not max_distance.
tests/test_foot_height_sensor.py:175
Function
test_format_speed
()
tests/test_viewer_tick.py:205
Function
test_frame_types
(device, frame_type, frame_name)
tests/test_differential_ik_action.py:145
Function
test_full_scene_lifecycle
Test complete scene lifecycle from creation to simulation.
tests/test_scene.py:336
Function
test_fullinertia_diagonal_mixing_rejected
()
tests/test_variants.py:596
Function
test_function_based_reward_not_tracked
Test that function-based reward terms are not tracked as class terms.
tests/test_rewards.py:143
Function
test_function_based_term_raises
(mock_env: Mock)
tests/test_recorder_manager.py:309
Function
test_fused_group_created
Delayed builtins with same config are fused into one group.
tests/test_builtin_group.py:35
Function
test_g1_actuators_configured_correctly
Verify that all G1 actuators have correct control and force limiting. All 29 G1 actuators should have ctrllimited=False (allowing setpoints beyond
tests/test_g1_constants.py:128
Function
test_g1_entity_creation
(g1_entity)
tests/test_g1_constants.py:121
Function
test_g1_foot_friction_shared_across_geoms
G1 velocity env has uniform foot friction across all collision geoms.
tests/test_domain_randomization.py:449
Function
test_g1_tracking_has_correct_action_scale
G1 tracking tasks should use G1_ACTION_SCALE.
tests/test_tracking_task.py:120
Function
test_g1_velocity_has_correct_action_scale
G1 velocity tasks should use G1_ACTION_SCALE.
tests/test_velocity_task.py:166
Function
test_g1_velocity_has_required_sensors
G1 velocity tasks should have feet/ground and self collision sensors.
tests/test_velocity_task.py:54
Function
test_gaussian_distribution
Gaussian: mean/std interpretation, values cluster around mean.
tests/test_domain_randomization.py:216
Function
test_generator_does_not_mutate_cfg_num_cols
TerrainGenerator must not mutate the caller's cfg.num_cols.
tests/test_terrain_proportion_spawning.py:188
Function
test_geom_size_no_accumulation
Repeated scale operations don't accumulate.
tests/test_domain_randomization.py:1245
Function
test_geom_size_partial_env_ids
Only specified envs are updated.
tests/test_domain_randomization.py:1304
Function
test_geom_size_raises_on_unsupported_type
dr.geom_size raises ValueError when a non-primitive geom type is selected.
tests/test_domain_randomization.py:1331
Function
test_geom_size_scale_updates_bounds
Scaling geom_size updates rbound and aabb consistently.
tests/test_domain_randomization.py:1191
Function
test_geom_size_separate_axes_dont_clobber
Events targeting different axes of the same geom compose, not clobber.
tests/test_domain_randomization.py:1269
Function
test_get_active_iterable_terms_handles_dict_and_scalar_state
Dict- and scalar-shaped curriculum states both yield flat value lists. Regression: the dict branch previously indexed `terms` (a list) by term na
tests/test_curriculum_manager.py:18
Function
test_get_base_metadata_skips_non_actuated_joints
get_base_metadata handles non-actuated joints without KeyError.
tests/test_rl_exporter.py:128
Function
test_get_export_paths
_get_export_paths resolves the correct dir, filename, and full path.
tests/test_runner.py:378
Function
test_get_geom_texture_id
Verify correct texture ID detection for textured vs untextured geoms.
tests/test_viser_conversions.py:283
Function
test_get_geom_texture_id_primitive
Primitive (non-mesh) geoms should always return -1.
tests/test_viser_conversions.py:298
Function
test_get_term_cfg_returns_resolved_config
get_term_cfg should return resolved config with func as instance.
tests/test_manager_config_immutability.py:99
Function
test_get_term_missing_raises
get_term raises KeyError when the requested term name is not registered.
tests/test_recorder_manager.py:359
Function
test_get_term_returns_registered_instance
get_term returns the live term the manager dispatches to, not a copy.
tests/test_recorder_manager.py:348
Function
test_getitem_lifo_and_clamp
__getitem__ returns lagged frames per-batch (LIFO), clamping when needed.
tests/test_circular_buffer.py:122
Function
test_global_frame_maxforce_rotation
A box at rest on a plane has its contact normals all vertical.
tests/test_contact_sensor.py:1077
Function
test_go1_entity_creation
Test basic Go1 entity properties.
tests/test_go1_constants.py:90
Function
test_go1_velocity_has_correct_action_scale
Go1 velocity tasks should use GO1_ACTION_SCALE.
tests/test_velocity_task.py:183
Function
test_go1_velocity_has_required_sensors
Go1 velocity tasks should have feet/ground and collision sensors.
tests/test_velocity_task.py:70
Function
test_grid_resolution
Finer grid_resolution still produces correct flat patches on a step.
tests/test_flat_patch_sampling.py:98
Function
test_group_geoms_by_visual_compat
Verify geoms are correctly partitioned by visual compatibility.
tests/test_viser_conversions.py:312
Function
test_group_geoms_single_type
All untextured geoms should land in a single group.
tests/test_viser_conversions.py:332
Function
test_group_history_overrides_term
Test group history_length overrides term history_length.
tests/test_observation_history.py:232
Function
test_height_scan_hits
height_scan returns correct heights for hits.
tests/test_raycast_sensor.py:783
Function
test_height_scan_misses
height_scan reports max_distance for rays that miss (no ground).
tests/test_raycast_sensor.py:814
Function
test_high_speed
()
tests/test_viewer_tick.py:75
Function
test_history_accumulates_correctly
Test that history buffer accumulates observations in correct order.
tests/test_observation_history.py:134
Function
test_history_captures_impact_forces
Verify history captures transient impact forces during a drop. This is the primary use case for the history feature: catching peak forces that oc
tests/test_contact_sensor.py:1009
Function
test_history_captures_physically_correct_forces
Verify history captures forces that match expected physics (F = mg). This test validates that the history buffer stores actual physics values, no
tests/test_contact_sensor.py:950
Function
test_history_disabled_by_default
Verify history is None when history_length=0 (default).
tests/test_contact_sensor.py:929
Function
test_history_ordering
Verify index 0 is most recent data in history buffer.
tests/test_contact_sensor.py:841
Function
test_history_reset
Verify reset clears history for specified environments.
tests/test_contact_sensor.py:884
Function
test_history_shape
Verify history tensors have correct shape [B, N, H, 3].
tests/test_contact_sensor.py:803
Function
test_history_with_clip
Test that clipping is applied before history.
tests/test_observation_history.py:389
Function
test_history_with_scale
Test that scaling is applied before history.
tests/test_observation_history.py:416
Function
test_hold_prob_always_hold
hold_prob=1.0 keeps lag frozen.
tests/test_delay_buffer.py:112
Function
test_hold_prob_never_hold
hold_prob=0.0 allows lag to change.
tests/test_delay_buffer.py:133
Function
test_ideal_pd_actuator_compute
IdealPdActuator computes torques via explicit PD control.
tests/test_actuator.py:48
Function
test_ideal_pd_effort_clamping
IdealPd clamps computed torques to [-effort_limit, effort_limit].
tests/test_pd_actuator.py:135
Function
test_ideal_pd_matches_builtin_at_rest
IdealPd and BuiltinPd produce equivalent actuator forces (qfrc_actuator).
tests/test_pd_actuator.py:25
Function
test_ideal_pd_matches_builtin_with_velocity
IdealPd and BuiltinPd produce equivalent damping forces with nonzero vel.
tests/test_pd_actuator.py:67
Function
test_ideal_pd_with_feedforward_effort
IdealPd adds feedforward effort to PD output.
tests/test_pd_actuator.py:109
Function
test_ids_to_names_resolves_names
Providing explicit ids populates the corresponding names list.
tests/test_scene_entity_config.py:112
Function
test_ik_convergence_position
Verify IK converges kinematically by writing q+dq directly to qpos.
tests/test_differential_ik_action.py:163
Function
test_inconsistent_names_and_ids_raise
When both names and ids are provided but disagree, a ValueError is raised.
tests/test_scene_entity_config.py:135
Function
test_inductance_lags_current
Large ``inductance`` (te >> dt) suppresses early-step torque.
tests/test_builtin_dcmotor_actuator.py:380
Function
test_integral_gain_ramps_torque
Integrator in position mode ramps torque over time even with ``kp`` and ``kd`` near zero.
tests/test_builtin_dcmotor_actuator.py:349
Function
test_integration_terminal_action_available_at_record_pre_reset
In a real env.step(), record_pre_reset fires before _reset_idx zeroes action_manager.action for reset envs. This verifies the hook ordering describe
tests/test_recorder_manager.py:463
Function
test_invalid_axes_raises
axes outside valid_axes raises ValueError.
tests/test_domain_randomization.py:290
Function
test_invalid_entity_access
Test accessing non-existent entity raises KeyError.
tests/test_scene.py:246
Function
test_jacobian_finite_difference_orientation
Verify rotation Jacobian against central finite differences.
tests/test_differential_ik_action.py:352
Function
test_jacobian_finite_difference_position
Verify position Jacobian against central finite differences.
tests/test_differential_ik_action.py:320
Function
test_joint_action_underactuated_with_wildcard
JointAction with wildcard pattern matches only actuated joints.
tests/test_xml_actuator.py:76
Function
test_joint_limits_respected
IK with joint_limit_weight keeps joints within bounds.
tests/test_differential_ik_action.py:215
Function
test_joint_pos_biased_equals_joint_pos_plus_bias
joint_pos_biased property should return joint_pos + encoder_bias.
tests/test_encoder_bias.py:129
Function
test_joint_pos_limits_match_soft_limits_for_unlimited
joint_pos_limits and default_joint_pos_limits should also be inf for unlimited.
tests/test_entity_data.py:438
Function
test_joint_pos_none_errors_without_keyframe
Test that joint_pos=None raises error if model has no keyframe.
tests/test_entity.py:685
Function
test_joint_pos_none_fixed_base_uses_keyframe
Test that joint_pos=None works for fixed-base entities with keyframes.
tests/test_entity.py:710
Function
test_joint_pos_none_uses_model_keyframe
Test that joint_pos=None uses the model's existing keyframe.
tests/test_entity.py:671
Function
test_joint_pos_rel_includes_encoder_bias
joint_pos_rel observation should include encoder_bias.
tests/test_encoder_bias.py:149
Function
test_joint_torques_l2_all_actuators
Test that joint_torques_l2 uses all actuators by default.
tests/test_rewards.py:354
Function
test_joint_torques_l2_with_actuator_ids
Test that joint_torques_l2 only penalizes specified actuators.
tests/test_rewards.py:342
Function
test_joint_vel_rel_ignores_encoder_bias
joint_vel_rel should NOT include encoder_bias (bias is constant, d/dt = 0).
tests/test_encoder_bias.py:170
Function
test_joint_velocity_error_rms
Joint velocity error is the per-joint RMS of the velocity error.
tests/test_tracking_metrics.py:116
← previous
next →
2,201–2,300 of 2,812, ranked by callers