MCPcopy Create free account

hub / github.com/mujocolab/mjlab / functions

Functions2,812 in github.com/mujocolab/mjlab

↓ 3 callersFunctionlerp
(a, b, x)
src/mjlab/terrains/heightfield_terrains.py:138
↓ 3 callersFunctionload_robot_model
Load a robot model from the asset zoo.
tests/test_viser_conversions.py:17
↓ 3 callersFunctionload_runner_cls
Load the runner class for a task. If None, the default OnPolicyRunner will be used.
src/mjlab/tasks/registry.py:66
↓ 3 callersFunctionnan_detection
Terminate environments that have NaN/Inf values in their physics state.
src/mjlab/envs/mdp/terminations.py:45
↓ 3 callersFunctionnormalize
Normalizes a given input tensor to unit length. Args: x: Input tensor of shape (N, dims). eps: A small value to avoid division by
src/mjlab/utils/lab_api/math.py:90
↓ 3 callersFunctionout_of_terrain_bounds
Truncate if robot leaves the generated terrain footprint. Returns all-false for non-generator terrains (e.g. plane).
src/mjlab/tasks/velocity/mdp/terminations.py:32
↓ 3 callersFunctionquat_from_angle_axis
Convert rotations given as angle-axis to quaternions. Args: angle: The angle turned anti-clockwise in radians around the vector's directi
src/mjlab/utils/lab_api/math.py:510
↓ 3 callersMethodrandom
Generate a random RGB color.
src/mjlab/utils/color.py:20
↓ 3 callersMethodrecord_post_reset
Called after a reset completes with fresh observations computed. Fires at the end of ``env.reset()`` (covering all environments on the initial ca
src/mjlab/managers/recorder_manager.py:94
↓ 3 callersMethodreset
Reset specified environments to initial state. Args: batch_ids: Batch indices to reset, or None to reset all.
src/mjlab/utils/buffers/delay_buffer.py:194
↓ 3 callersMethodset_array_field
(field, values)
src/mjlab/utils/spec_config.py:194
↓ 3 callersFunctionstrip_buffer_textures
Remove buffer textures and their materials from a spec. MuJoCo's ``to_xml()`` cannot serialize textures created from raw pixel data (``texture.da
src/mjlab/utils/xml.py:10
↓ 3 callersMethodtarget_object_pos
Position of the target cube per env. Cached per step — updated in _update_metrics which runs before rewards.
src/mjlab/tasks/manipulation/mdp/commands.py:166
↓ 3 callersFunctionterrain_normal_from_sensors
Estimate terrain normal from one or more raycast sensors. Gathers hit positions, subsamples to *max_points* per sensor, and fits a plane normal v
src/mjlab/tasks/velocity/mdp/terrain_utils.py:76
↓ 3 callersFunctionunitree_g1_flat_env_cfg
Create Unitree G1 flat terrain velocity configuration.
src/mjlab/tasks/velocity/config/g1/env_cfgs.py:188
↓ 3 callersFunctionunitree_g1_rough_env_cfg
Create Unitree G1 rough terrain velocity configuration.
src/mjlab/tasks/velocity/config/g1/env_cfgs.py:25
↓ 3 callersFunctionunitree_go1_flat_env_cfg
Create Unitree Go1 flat terrain velocity configuration.
src/mjlab/tasks/velocity/config/go1/env_cfgs.py:261
↓ 3 callersMethodupdate
Update scene from batched mjwarp simulation data. Converts warp GPU tensors to numpy arrays and delegates to ``update_from_arrays``.
src/mjlab/viewer/viser/scene.py:322
↓ 3 callersMethodwrite_root_velocity
( self, velocity: torch.Tensor, env_ids: torch.Tensor | slice | None = None )
src/mjlab/entity/data.py:105
↓ 3 callersFunctionyam_lift_cube_env_cfg
( play: bool = False, )
src/mjlab/tasks/manipulation/config/yam/env_cfgs.py:45
↓ 2 callersMethod__init__
(self, height: int, width: int, temperature: float = 1.0)
src/mjlab/rl/spatial_softmax.py:29
↓ 2 callersMethod_appearance_fingerprint
Return a stable fingerprint for fields baked into Viser mesh handles.
src/mjlab/viewer/viser/scene.py:396
↓ 2 callersFunction_apply_stages
Apply staged updates and return a logging snapshot.
src/mjlab/envs/mdp/curriculums.py:69
↓ 2 callersFunction_build_scene
(cfg: VariantEntityCfg)
tests/test_variants.py:951
↓ 2 callersFunction_cnn_model_output
(actor, x_1d, x_2d)
tests/test_runner.py:299
↓ 2 callersFunction_collect_inertial_modes
( body: mujoco.MjsBody, parent_path: str = "" )
src/mjlab/entity/variants.py:419
↓ 2 callersMethod_compute_alignment_rotation
Compute rotation matrix based on ray_alignment setting.
src/mjlab/sensor/raycast_sensor.py:810
↓ 2 callersFunction_compute_body_hull
Compute a merged convex hull for a body's mesh geoms. Bypasses ``mjviser.merge_geoms_hull`` (which reads ``mesh_polynum`` and returns ``None`` fo
src/mjlab/viewer/viser/scene.py:178
↓ 2 callersMethod_compute_term
(self, idx: int)
src/mjlab/managers/metrics_manager.py:192
↓ 2 callersMethod_create_context
Create the mujoco_warp RenderContext.
src/mjlab/sensor/sensor_context.py:263
↓ 2 callersMethod_create_plot
Lazily create a single-term plot inside the scoped folder.
src/mjlab/viewer/viser/term_plotter.py:163
↓ 2 callersMethod_create_terrain_geom
Create a terrain geometry at the specified world position. Args: spec: MuJoCo spec to add geometry to. world_position: World position
src/mjlab/terrains/terrain_generator.py:284
↓ 2 callersMethod_env_label_text
(self)
src/mjlab/viewer/viser/term_plotter.py:144
↓ 2 callersMethod_execute_step
Run one obs/policy/step cycle. Returns True on success, False if step failed.
src/mjlab/viewer/base.py:282
↓ 2 callersFunction_explicit_mass_variant
Build a single-geom freejoint variant with an explicit body mass.
tests/test_variants.py:1529
↓ 2 callersFunction_explicit_variant
( mesh_name: str, mass: float, inertia: tuple[float, float, float], *, cone: bool = False,
tests/test_variants.py:1212
↓ 2 callersFunction_extract_body_signature
( body: mujoco.MjsBody, parent_path: str = "" )
src/mjlab/entity/variants.py:374
↓ 2 callersMethod_finish_init
Common initialization after warp model is created.
src/mjlab/sim/sim.py:298
↓ 2 callersMethod_finish_recording
Finish recording and save the video.
src/mjlab/utils/wrappers/video_recorder.py:182
↓ 2 callersFunction_fractal_perlin_noise_2d
Generate 2D fractal Perlin noise.
src/mjlab/terrains/heightfield_terrains.py:127
↓ 2 callersFunction_gaussian_tolerance
Gaussian sigmoid tolerance: 1 at x=0, value_at_margin=0.1 at |x|=margin.
src/mjlab/tasks/cartpole/cartpole_env_cfg.py:100
↓ 2 callersFunction_generate_random_values
Generate random values for the specified axes.
src/mjlab/envs/mdp/dr/_core.py:284
↓ 2 callersFunction_generate_stones
Generate terrain and return stone (cx, cy, half_x, half_y) tuples.
tests/test_terrains.py:30
↓ 2 callersFunction_get_body_indices
Get indices of specified bodies within the command's body list. Args: command: The motion command. body_names: Names of bodies to find.
src/mjlab/tasks/tracking/mdp/metrics.py:82
↓ 2 callersMethod_get_info_html
Generate info HTML.
src/mjlab/scripts/nan_viz.py:103
↓ 2 callersMethod_get_sub_terrain_position
Get the world position for a sub-terrain at the given grid indices. This returns the position of the sub-terrain's corner (not center). The e
src/mjlab/terrains/terrain_generator.py:268
↓ 2 callersFunction_identity_quat
(w, x, y, z) = (1, 0, 0, 0).
tests/test_velocity_rewards.py:17
↓ 2 callersMethod_init_with_model
Standard path: build warp model from compiled MjModel.
src/mjlab/sim/sim.py:234
↓ 2 callersMethod_lerp
Linear interpolation between two tensors.
src/mjlab/scripts/csv_to_npz.py:98
↓ 2 callersFunction_make_env
(segmentation: torch.Tensor, target_geom_ids: torch.Tensor)
tests/test_manipulation_observations.py:21
↓ 2 callersFunction_make_env_cfg
(swing_up: bool = False)
src/mjlab/tasks/cartpole/cartpole_env_cfg.py:153
↓ 2 callersFunction_make_mock_env
Create a mock environment that produces random RGB frames.
tests/test_video_recorder.py:11
↓ 2 callersFunction_make_robot_cfg
()
tests/test_encoder_bias.py:48
↓ 2 callersFunction_make_tendon_env
(device, num_envs=NUM_ENVS)
tests/test_domain_randomization.py:1387
↓ 2 callersFunction_make_tracking_runner_shell
Build a MotionTrackingOnPolicyRunner with all heavy parts mocked out.
tests/test_runner.py:527
↓ 2 callersFunction_make_viewer
(num_envs: int = 3)
tests/test_native_viewer_actions.py:11
↓ 2 callersMethod_normalize_to_list
Convert single values to lists for uniform processing.
src/mjlab/managers/scene_entity_config.py:193
↓ 2 callersFunction_objtype_name
Pretty-print a MuJoCo object type, dropping the ``mjOBJ_`` prefix.
src/mjlab/sensor/contact_sensor.py:674
↓ 2 callersFunction_parse_wandb_dt
Parse a W&B datetime string (or pass through a datetime object).
src/mjlab/scripts/play.py:26
↓ 2 callersFunction_prefix_name
Prepend ``entity/`` to a MuJoCo name when an entity scope is set.
src/mjlab/sensor/contact_sensor.py:667
↓ 2 callersFunction_qualified_slot_geom_name
Slot geom name in the merged template's namespace after attach.
src/mjlab/entity/variants.py:1102
↓ 2 callersFunction_quat_conjugate
(q: torch.Tensor)
tests/test_differential_ik_action.py:265
↓ 2 callersFunction_reload_policy
(path: str)
src/mjlab/scripts/play.py:215
↓ 2 callersMethod_render_empty
(self)
src/mjlab/viewer/viser/reward_bar_panel.py:79
↓ 2 callersMethod_resample
(self, env_ids: torch.Tensor)
src/mjlab/managers/command_manager.py:117
↓ 2 callersMethod_reset_idx
(self, env_ids: torch.Tensor | None = None)
src/mjlab/envs/manager_based_rl_env.py:553
↓ 2 callersFunction_rotation_quat
Quaternion (wxyz) that rotates ``from_vec`` to ``to_vec``.
src/mjlab/viewer/viser/scene.py:55
↓ 2 callersMethod_sense_kernel
GPU kernel sequence for sensing (captured in sense_graph).
src/mjlab/sim/sim.py:518
↓ 2 callersMethod_set_camera_auto_track
Track first non-fixed body; fall back to free camera if none exists.
src/mjlab/viewer/native/viewer.py:558
↓ 2 callersMethod_set_camera_world
Configure free camera in world frame.
src/mjlab/viewer/native/viewer.py:573
↓ 2 callersMethod_set_scrubber_disabled
Enable or disable the motion scrubber GUI controls.
src/mjlab/tasks/tracking/mdp/commands.py:550
↓ 2 callersFunction_spec_with_actuator
Single-body sphere with a hinge child + a position actuator.
tests/test_variants.py:416
↓ 2 callersFunction_spec_with_primitive
Sphere variant with an additional primitive box (visual or collision).
tests/test_variants.py:436
↓ 2 callersMethod_sync_env_state_to_mjdata
Copy one environment state from batched sim data into a MjData buffer.
src/mjlab/viewer/native/viewer.py:335
↓ 2 callersMethod_sync_plots
Create or remove plots to match current selection.
src/mjlab/viewer/viser/term_plotter.py:152
↓ 2 callersMethod_sync_ui_state
Sync UI elements to current state after action processing.
src/mjlab/viewer/viser/viewer.py:349
↓ 2 callersFunction_train_cnn_normalizer
(actor, n_batches=50, batch_size=64)
tests/test_runner.py:286
↓ 2 callersMethod_update_status_display
Update the HTML status display.
src/mjlab/viewer/viser/viewer.py:549
↓ 2 callersFunction_validate_stages
Validate stage ordering, field existence, and param keys.
src/mjlab/envs/mdp/curriculums.py:41
↓ 2 callersMethod_write_reference_state_to_sim
Clip joint positions and write root + joint state to sim.
src/mjlab/tasks/tracking/mdp/commands.py:300
↓ 2 callersMethodadd_batched_meshes_trimesh
(self, *args, **kwargs)
tests/test_variants.py:1315
↓ 2 callersMethodadd_mesh_trimesh
(self, *_args, **kwargs)
tests/test_variants.py:1312
↓ 2 callersMethodapply
Apply noise to the input data.
src/mjlab/utils/noise/noise_cfg.py:39
↓ 2 callersMethodapply
(self, data: torch.Tensor)
src/mjlab/utils/noise/noise_cfg.py:48
↓ 2 callersFunctionapply_delta_pose
Applies delta pose transformation on source pose. The first three elements of `delta_pose` are interpreted as cartesian position displacement.
src/mjlab/utils/lab_api/math.py:920
↓ 2 callersMethodapply_gui_reset
Apply GUI-selected state as an env reset override. Returns True if this term wrote state to sim.
src/mjlab/managers/command_manager.py:87
↓ 2 callersMethodbuild
(self, env: ManagerBasedRlEnv)
src/mjlab/envs/mdp/actions/actions.py:299
↓ 2 callersMethodbuild
Build sensor instance from this config.
src/mjlab/sensor/sensor.py:33
↓ 2 callersMethodbuild
Build entity instance from this config. Override in subclasses to return custom Entity types.
src/mjlab/entity/entity.py:102
↓ 2 callersFunctioncartpole_ppo_runner_cfg
()
src/mjlab/tasks/cartpole/cartpole_env_cfg.py:274
↓ 2 callersFunctioncartpole_swingup_env_cfg
( play: bool = False, )
src/mjlab/tasks/cartpole/cartpole_env_cfg.py:261
↓ 2 callersFunctionclamp
Clamp a value between min and max.
src/mjlab/utils/color.py:121
↓ 2 callersMethodclear_debug_all
Clear all debug visualizations including handles.
src/mjlab/viewer/viser/scene.py:997
↓ 2 callersMethodclose
Close the environment and finalize any open videos.
src/mjlab/utils/wrappers/video_recorder.py:141
↓ 2 callersFunctioncompute_ee_orientation_error
Compute end effector orientation error.
src/mjlab/tasks/tracking/mdp/metrics.py:66
↓ 2 callersMethodcompute_first_contact
Returns [B, P] bool: True for primaries that landed within the last dt seconds.
src/mjlab/sensor/contact_sensor.py:378
↓ 2 callersFunctioncompute_joint_velocity_error
Compute root-mean-square joint velocity error. Uses an RMS over joints (rather than a raw L2 norm) so the value is a per-joint quantity, comparab
src/mjlab/tasks/tracking/mdp/metrics.py:39
↓ 2 callersMethodcreate_gui
Create interactive GUI controls for this command term. Override in subclasses to add task-specific controls (e.g., velocity sliders) to the V
src/mjlab/managers/command_manager.py:67
↓ 2 callersFunctioncreate_motor_actuator
Create a <motor> actuator.
src/mjlab/utils/spec.py:240
↓ 2 callersFunctioncreate_raycast_sensor_scene
Create a scene with a raycast sensor.
tests/test_sensor_caching.py:80
← previousnext →301–400 of 2,812, ranked by callers