MCPcopy Create free account

hub / github.com/mujocolab/mjlab / functions

Functions2,812 in github.com/mujocolab/mjlab

Functiontest_debug_overlays_env_switch_and_queue
env_switch respects enabled flag; queue clears + calls update_visualizers.
tests/test_viser_update_policy.py:83
Functiontest_deepcopy_no_double_prefix
Regression test for #850: deepcopy should not double-prefix sensor name.
tests/test_builtin_sensor.py:364
Functiontest_deepcopy_protects_original_cfg
Creating a manager must not mutate the caller's cfg dict. _resolve_common_term_cfg replaces cfg.func with the instantiated object in-place on the
tests/test_recorder_manager.py:323
Functiontest_delay_actually_delays
With nonzero fixed lag, a new target takes lag steps to appear.
tests/test_builtin_group.py:118
Functiontest_delay_buffer_constant_lag
Constant lag returns observation from N steps ago.
tests/test_delay_buffer.py:41
Functiontest_delay_buffer_not_double_pushed
Test that delay buffer is not pushed twice per control step. This tests the specific bug where calling compute() twice per control step (e.g., in
tests/test_observation_delay.py:577
Functiontest_delay_buffer_not_initialized
Compute before append raises error.
tests/test_delay_buffer.py:273
Functiontest_delay_buffer_per_env_lags
Per-env mode allows different lags per environment.
tests/test_delay_buffer.py:82
Functiontest_delay_buffer_reset_all
Reset clears all environments.
tests/test_delay_buffer.py:217
Functiontest_delay_buffer_reset_partial
Reset with batch_ids only resets specified environments.
tests/test_delay_buffer.py:231
Functiontest_delay_buffer_shared_lags
Shared mode uses same lag across all environments.
tests/test_delay_buffer.py:95
Functiontest_delay_buffer_update_period
Update period controls how often lags are resampled.
tests/test_delay_buffer.py:164
Functiontest_delay_buffer_validation
Input validation catches invalid parameters.
tests/test_delay_buffer.py:288
Functiontest_delay_buffer_zero_lag
Zero lag returns current observation.
tests/test_delay_buffer.py:28
Functiontest_delay_position_mode
A 2-step lag should make position-mode torque reference step-0 target.
tests/test_builtin_dcmotor_actuator.py:624
Functiontest_delay_preserves_dimensions
Test that delay preserves observation dimensions.
tests/test_observation_delay.py:456
Functiontest_delay_syncs_pos_and_vel
The shared delay buffer must lag pos and vel together.
tests/test_builtin_pd_actuator.py:189
Functiontest_delay_with_history
Test that delay is applied before history.
tests/test_observation_delay.py:193
Functiontest_delay_with_scale
Test that scaling is applied before delay.
tests/test_observation_delay.py:248
Functiontest_delayed_actuator_reset
Test that reset clears the delay buffer.
tests/test_delayed_actuator.py:194
Functiontest_delayed_actuator_set_lags
Test that set_lags sets lag values on all delay buffers.
tests/test_delayed_actuator.py:215
Functiontest_delayed_actuator_set_lags_affects_delay
Test that setting lags actually changes the delay behavior.
tests/test_delayed_actuator.py:274
Functiontest_delayed_actuator_set_lags_clamps_to_range
Test that set_lags clamps values to the configured lag range.
tests/test_delayed_actuator.py:255
Functiontest_delayed_actuator_set_lags_overwritten_without_hold_prob
Test that set_lags gets overwritten when delay_hold_prob < 1.0.
tests/test_delayed_actuator.py:320
Functiontest_delayed_actuator_set_lags_subset
Test that set_lags can set lag values for a subset of environments.
tests/test_delayed_actuator.py:233
Functiontest_delayed_builtin_applies_constant_delay
Test that delayed builtin actuator delays position targets.
tests/test_delayed_actuator.py:69
Functiontest_delayed_controls_written
Fused delayed builtins write controls to sim correctly.
tests/test_builtin_group.py:99
Functiontest_delayed_ideal_applies_delay
Test that delayed ideal actuator delays position targets.
tests/test_delayed_actuator.py:95
Functiontest_delayed_ideal_delays_effort
Feedforward effort targets share the same delay as position targets.
tests/test_delayed_actuator.py:164
Functiontest_delayed_ideal_delays_velocity
Velocity targets share the same delay as position targets. Regression test: the velocity reference used to bypass the delay buffer, so the dampin
tests/test_delayed_actuator.py:128
Functiontest_dependent_fields_match_individual_compilation
Per-world body_mass matches independently compiled variant models.
tests/test_variants.py:1171
Functiontest_diagonal_inertia_consistent_accepted
()
tests/test_variants.py:607
Functiontest_dict_int_axis_ranges
{0: (lo, hi), 1: (lo2, hi2)} per-axis ranges.
tests/test_domain_randomization.py:270
Functiontest_different_delay_configs_separate_groups
Delayed builtins with different delay configs get separate groups.
tests/test_builtin_group.py:57
Functiontest_distribution_instance_uniform
Passing a Distribution instance works identically to the string.
tests/test_domain_randomization.py:1505
Functiontest_dof_armature_recompute
dof_armature modification updates dof_invweight0.
tests/test_events.py:810
Functiontest_dof_armature_recompute_matches_recompile
Modify dof_armature: GPU recompute matches fresh MjSpec.compile().
tests/test_events.py:908
Functiontest_dr_body_mass_scale_preserves_variant_baseline
``dr.body_mass`` scale must use each variant's own baseline. This is the load-bearing claim of ``_per_world_default_fields``: scaling body_mass o
tests/test_variants.py:1561
Functiontest_dr_effort_limits_scale_multiplies_default
``scale`` multiplies the configured ``effort_limit`` (50.0) by the sample.
tests/test_builtin_pd_actuator.py:415
Functiontest_dr_effort_limits_writes_forcerange
(device)
tests/test_builtin_dcmotor_actuator.py:590
Functiontest_dr_effort_limits_writes_jnt_actfrcrange
(device)
tests/test_builtin_pd_actuator.py:380
Functiontest_dr_effort_limits_writes_tendon_actfrcrange
(device)
tests/test_builtin_pd_actuator.py:442
Functiontest_dr_fields_registered_in_event_manager
@requires_model_fields functions populate manager.domain_randomization_fields.
tests/test_events.py:85
Functiontest_dr_pd_gains_abs_writes_correct_columns
(device)
tests/test_builtin_pd_actuator.py:338
Functiontest_dr_pd_gains_position_mode
( device, operation, kp_in, kd_in, kp_expected, kd_expected )
tests/test_builtin_dcmotor_actuator.py:545
Functiontest_dr_pd_gains_scales_halves_independently
(device)
tests/test_builtin_pd_actuator.py:285
Functiontest_dr_pd_gains_voltage_mode_rejected
(device)
tests/test_builtin_dcmotor_actuator.py:577
Functiontest_dtype_and_device_preserved
Buffer preserves dtype and device.
tests/test_circular_buffer.py:211
Functiontest_duplicate_steps_allowed
()
tests/test_envs_curriculums.py:230
Functiontest_early_termination_uses_per_env_step_count
Envs with different episode lengths get correct per-step averages.
tests/test_metrics_manager.py:63
Functiontest_ee_metrics_raise_on_unknown_body
Unknown end-effector names raise instead of silently scoring zero.
tests/test_tracking_metrics.py:172
Functiontest_ee_orientation_error_detects_rotation
Test EE orientation error detects rotations.
tests/test_tracking_metrics.py:150
Functiontest_ee_position_error_only_uses_specified_bodies
Test EE position error only uses specified bodies.
tests/test_tracking_metrics.py:131
Functiontest_effort_limit_clamps_torque
forcerange clamps the algebraic torque output.
tests/test_builtin_dcmotor_actuator.py:238
Functiontest_effort_limit_none_leaves_joint_unlimited
effort_limit=None: jnt_actfrclimited stays 0 on the targeted joints.
tests/test_builtin_pd_actuator.py:166
Functiontest_effort_limits
Effort limits scale/abs on Builtin, Xml, and Ideal actuators.
tests/test_events.py:352
Functiontest_effort_limits_accepts_operation_object
dr.abs Operation object produces the same result as the string.
tests/test_events.py:444
Functiontest_effort_limits_multi_env
Independent values per environment.
tests/test_events.py:388
Functiontest_effort_limits_rejects_unsupported_operation
Operations other than scale/abs raise ValueError.
tests/test_events.py:470
Functiontest_effort_limits_scale_no_accumulation
Scale operation uses defaults (no accumulation).
tests/test_events.py:406
Functiontest_electrical_power_cost_partially_actuated
Test electrical_power_cost on robots with passive joints. This test verifies that: 1. The reward correctly identifies and uses only actuated join
tests/test_rewards.py:160
Functiontest_empty_group_skipped_alongside_active_group
Active groups coexist with empty ones; only the empty group is dropped.
tests/test_observation_manager.py:54
Functiontest_empty_terms_dict_skipped
A group declared with no terms is skipped rather than raising.
tests/test_observation_manager.py:32
Functiontest_empty_variants_raises
()
tests/test_variants.py:340
Functiontest_encoder_bias_can_be_set_per_env
encoder_bias can be set differently per environment.
tests/test_encoder_bias.py:114
Functiontest_encoder_bias_initialized_to_zero
encoder_bias should be zeros with shape (num_envs, num_joints).
tests/test_encoder_bias.py:102
Functiontest_entity_builds_with_variants
()
tests/test_variants.py:281
Functiontest_entity_data_properties_accessible
Test that all EntityData properties can be accessed without errors.
tests/test_entity_data.py:256
Functiontest_entity_data_reset_clears_all_targets
Test that EntityData.clear_state() zeros out all target buffers.
tests/test_entity_data.py:267
Functiontest_entity_data_reset_partial_envs
Test that EntityData.clear_state() can reset specific environments.
tests/test_entity_data.py:303
Functiontest_entity_dict_access
Test accessing entities through dictionary.
tests/test_scene.py:222
Functiontest_entity_getitem_access
Test accessing entities through __getitem__.
tests/test_scene.py:235
Functiontest_entity_properties
Test entity type properties and element counts.
tests/test_entity.py:222
Functiontest_entity_with_option_flags_warns
Entity XML <option> flags are not propagated by MjSpec.attach().
tests/test_scene.py:573
Functiontest_env_origins_match_terrain_origins
Each env_origin must correspond to a valid (level, type) in origins.
tests/test_terrain_proportion_spawning.py:136
Functiontest_env_origins_shape
(terrain_entity: TerrainEntity)
tests/test_terrain_proportion_spawning.py:124
Functiontest_env_origins_without_terrain
Test env_origins property without terrain.
tests/test_scene.py:274
Functiontest_env_step_with_variants
Build a full ManagerBasedRlEnv with variants; step without crashing.
tests/test_variants.py:1627
Functiontest_episode_averages_and_reset
Compute for N steps, reset a subset, verify averages and zeroing.
tests/test_metrics_manager.py:39
Functiontest_equal_proportions_gives_equal_counts
(terrain_entity: TerrainEntity)
tests/test_terrain_proportion_spawning.py:112
Functiontest_error_on_invalid_ref
Verify ValueError is raised when ref provided for unsupported sensor type.
tests/test_builtin_sensor.py:196
Functiontest_error_on_missing_obj
Verify ValueError is raised when obj is not provided for required sensor type.
tests/test_builtin_sensor.py:207
Functiontest_error_on_wrong_obj_type_for_body_sensor
Verify ValueError is raised when wrong obj type is used for body sensor.
tests/test_builtin_sensor.py:226
Functiontest_error_on_wrong_obj_type_for_joint_sensor
Verify ValueError is raised when wrong obj type is used for joint sensor.
tests/test_builtin_sensor.py:236
Functiontest_error_on_wrong_obj_type_for_site_sensor
Verify ValueError is raised when wrong obj type is used for site sensor.
tests/test_builtin_sensor.py:216
Functiontest_error_pauses
()
tests/test_viewer_tick.py:161
Functiontest_errors_and_types
Error paths: wrong batch, pre-append access, and bad key size.
tests/test_circular_buffer.py:187
Functiontest_even_distribution_without_proportions
(terrain_entity: TerrainEntity)
tests/test_terrain_proportion_spawning.py:41
Functiontest_every_column_gets_at_least_one
When num_envs >= num_cols, every column gets at least 1 robot.
tests/test_terrain_proportion_spawning.py:84
Functiontest_exclude_exact_names
Verify exact name exclusion removes specific geoms from contact detection. Tests the ergonomic feature where passing exact geom names like ("leg1
tests/test_contact_sensor.py:380
Functiontest_exclude_mixed_patterns
Verify exact names and regex patterns can be mixed in exclude lists. Tests that exclude tuples can contain both exact names ("trunk_collision") a
tests/test_contact_sensor.py:438
Functiontest_exclude_regex_pattern
Verify regex exclusion patterns filter out groups of similarly-named geoms. Tests that patterns like ".*thigh_collision\\d+" can exclude all thigh
tests/test_contact_sensor.py:410
Functiontest_expand_cam_intrinsic_disables_precomputed_rays
Expanding cam_intrinsic disables precomputed rays on the render context.
tests/test_camera_sensor.py:274
Functiontest_expand_model_fields_recreates_cuda_graph
Verify CUDA graph is recreated after expand_model_fields.
tests/test_domain_randomization.py:423
Functiontest_explicit_armature_frictionloss_overrides_xml
Explicit values override XML armature/frictionloss.
tests/test_actuator.py:190
Functiontest_explicit_zero_overrides_xml
Explicit 0.0 overrides XML values (distinguishes None from 0.0).
tests/test_actuator.py:207
Functiontest_export_policy_to_onnx
runner.export_policy_to_onnx() produces a valid ONNX file.
tests/test_runner.py:155
Functiontest_external_force_and_torque
Test forces translate, torques rotate, and forces can be cleared.
tests/test_entity.py:317
Functiontest_external_force_clearing
Test external forces can be cleared.
tests/test_entity.py:347
Functiontest_external_force_on_specific_body
Test applying force to specific body in articulated system.
tests/test_entity.py:370
← previousnext →2,101–2,200 of 2,812, ranked by callers