MCPcopy Create free account

hub / github.com/pollen-robotics/microduck_rl / functions

Functions681 in github.com/pollen-robotics/microduck_rl

↓ 1 callersFunction_our_scripts
()
tests/test_hf_jobs_flag.py:40
↓ 1 callersFunction_pick_namespace
Choose the namespace (personal account or org) the job runs under. Interactive prompt unless --namespace was given or there is nothing to cho
src/mjlab_microduck/hf_jobs.py:171
↓ 1 callersMethod_place_ball
Teleport the ball in front of the kicking foot, matching training's reset_ball_in_front_of_foot (offset in the robot's yaw frame).
scripts/infer_policy.py:764
↓ 1 callersMethod_read1
Read one byte from stdin, or None on timeout. os.read (unbuffered): buffered sys.stdin.read would swallow escape-sequence bytes past what
scripts/infer_policy.py:177
↓ 1 callersFunction_repo_root
Repo root of the CURRENT directory — worktree-aware. (The old scripts/hf/train_hf.py used the script file's location; resolving from cwd inst
src/mjlab_microduck/hf_jobs.py:141
↓ 1 callersFunction_resolve_play_difficulty
Difficulté de play : env SLOPE_PLAY_DIFFICULTY sinon la constante.
src/mjlab_microduck/tasks/microduck_roller_slope_env_cfg.py:45
↓ 1 callersFunction_resolve_play_face_up
Proportion de départs sur le dos au play : env STANDUP_PLAY_FACE_UP sinon la constante.
src/mjlab_microduck/tasks/microduck_roller_standup_env_cfg.py:80
↓ 1 callersFunction_resolve_weights
The ONNX to publish and the provenance it carries. Exports when given a checkpoint.
src/mjlab_microduck/publish/cli.py:95
↓ 1 callersFunction_scalar
(x)
scripts/testbench_sim2real.py:338
↓ 1 callersFunction_sensor_any_contact
(env: ManagerBasedRlEnv, name: str)
src/mjlab_microduck/tasks/mdp.py:6702
↓ 1 callersMethod_update_policy_session
Switch between walking and standing sessions based on vel_cmd magnitude.
scripts/infer_policy.py:514
↓ 1 callersFunction_wandb_api_key
Best-effort lookup of the user's wandb API key. Order: WANDB_API_KEY env -> ~/.netrc (machine api.wandb.ai).
src/mjlab_microduck/hf_jobs.py:124
↓ 1 callersFunctionadd_traces
Helper to add real and sim traces to a subplot.
scripts/plot_observations_comparison_plotly.py:104
↓ 1 callersFunctionbam_python_rollout
Reference: BAM's own Python simulator.
scripts/validate_bam_testbench.py:44
↓ 1 callersFunctionbuild_backlash_default
(half_range_rad: float, damping: float, armature: float, frictionloss: float,
src/mjlab_microduck/robot/microduck/add_backlash.py:38
↓ 1 callersFunctionbuild_model
Construit le modèle MuJoCo du terrain seul (rows rampes de raideur croissante).
scripts/view_slope_terrain.py:32
↓ 1 callersFunctionbuild_pose
(overrides)
src/mjlab_microduck/tasks/mdp.py:2280
↓ 1 callersFunctionbuild_world
One model holding `count` ducks, so they share a floor and can bump into each other. The scene already contains one duck; the rest are attached t
src/mjlab_microduck/sim/body_server.py:110
↓ 1 callersMethodbump_body
(self, axis: str, delta: float)
scripts/infer_policy.py:604
↓ 1 callersFunctioncompare_and_plot
(sim_file: str, real_file: str, out_path: str)
scripts/testbench_sim2real.py:475
↓ 1 callersMethodcompute
(self, dt: float)
src/mjlab_microduck/tasks/mdp.py:6297
↓ 1 callersFunctioncompute_m6_friction
M6 friction computation matching our kernel (and BAM's model.py).
scripts/validate_bam_testbench.py:61
↓ 1 callersFunctioncompute_range
(data_list)
scripts/plot_observations_comparison_plotly.py:205
↓ 1 callersFunctioncrouch_glide_reward_from_values
Récompense gaussienne du suivi de la cible de hauteur (fonction pure). Décode la phase depuis [cos, sin] puis compare la hauteur mesurée à la
src/mjlab_microduck/tasks/mdp.py:1212
↓ 1 callersFunctioncrouch_height_target
Cible de hauteur du tronc « en trapèze » le long de la phase [0,1). phase ∈ [0, hold_lo) : descente height_high -> height_low phase ∈
src/mjlab_microduck/tasks/mdp.py:1177
↓ 1 callersMethoddepth
One 8x8 depth frame, in the units `tofd` publishes. Sixty-four ray casts, so this is the most expensive thing here — asked for at the sensor'
src/mjlab_microduck/sim/body_server.py:339
↓ 1 callersMethoddispatch
(self, body: Body, request: dict)
src/mjlab_microduck/sim/body_server.py:402
↓ 1 callersFunctionfind_latest_run
Return the most recent run whose metadata email contains *user_filter*.
scripts/wandb_utils.py:13
↓ 1 callersFunctionfind_latest_runs
Return up to *n* most recent runs whose metadata email contains *user_filter* and whose task_id (metadata args[0]) satisfies *task_match*. ta
scripts/wandb_utils.py:24
↓ 1 callersMethodframe
One capture: distances in millimetres and a status per zone. Self-hits are reported, not filtered. A real sensor sees the duck's own beak whe
src/mjlab_microduck/sim/tof.py:64
↓ 1 callersMethodget_base_ang_vel
Get base angular velocity from IMU gyro sensor.
scripts/infer_policy.py:641
↓ 1 callersMethodget_joint_pos_relative
Get joint positions relative to default pose.
scripts/infer_policy.py:646
↓ 1 callersMethodget_joint_vel
Get joint velocities.
scripts/infer_policy.py:651
↓ 1 callersMethodget_keys
Drain and return all pending keys (symbolic names / characters).
scripts/infer_policy.py:201
↓ 1 callersMethodget_projected_gravity
Get projected gravity in body frame.
scripts/infer_policy.py:635
↓ 1 callersMethodget_raw_accelerometer
Get raw accelerometer reading from MuJoCo sensor.
scripts/infer_policy.py:618
↓ 1 callersFunctiongit
(*args: str)
src/mjlab_microduck/publish/manifest.py:72
↓ 1 callersFunctiongravity_in_trunk
World gravity in the trunk frame. Upright is `[0, 0, -1]`. What the policy actually observes, and it is here rather than in the daemon because th
src/mjlab_microduck/sim/body_server.py:157
↓ 1 callersFunctionhandle_key
(key)
scripts/infer_policy.py:1207
↓ 1 callersFunctionhead_pose_tracking
Per-joint Gaussian reward for matching commanded neck/head deltas. Mean over the 4 neck/head joints of exp(-(err/std)^2). Result is (N,) in [
src/mjlab_microduck/tasks/mdp.py:5128
↓ 1 callersFunctionhome_value
(joint_name: str)
scripts/crouch_pose_editor.py:26
↓ 1 callersMethodinfer
Run policy inference and return action.
scripts/infer_policy.py:856
↓ 1 callersMethodinitialize
(self, mj_model, model, data, device)
src/mjlab_microduck/actuator/friction_dr_bam.py:31
↓ 1 callersFunctioninstall_commands
The `robotctl` lines that put this policy on a robot — one story per shape. Episodic: a skill, length from the manifest. Perpetual with `unwind_s
src/mjlab_microduck/publish/manifest.py:312
↓ 1 callersFunctioninterp
(a, b, s)
src/mjlab_microduck/tasks/mdp.py:2620
↓ 1 callersFunctionkick_engagement
Gate d'engagement du geste ∈ [0,1] (pur) — pour pondérer les rewards d'équilibre unipède qui ne doivent s'appliquer que hors du repos STAND.
src/mjlab_microduck/tasks/mdp.py:2723
↓ 1 callersFunctionkick_pose_target
Cible articulaire interpolée d'un geste de shoot à 4 keyframes. phase (B,) ∈ [0,1). stand/back/forward (k,) ou (1,k). Retour (B,k). [0, wind
src/mjlab_microduck/tasks/mdp.py:2600
↓ 1 callersFunctionlast_dim
(value)
src/mjlab_microduck/publish/manifest.py:247
↓ 1 callersFunctionload_bam_model
Build the BAM M6 model + XL330 voltage-controlled actuator.
scripts/infer_policy.py:48
↓ 1 callersFunctionload_mujoco_with_bam
Load the scene and hand every non-passive actuator to bam.mujoco.MujocoController. Mirrors bam.mjlab.BamActuator.edit_spec (what warp does at tra
scripts/infer_policy.py:58
↓ 1 callersFunctionload_observations
Load observations from pickle file.
scripts/plot_observations_comparison_plotly.py:14
↓ 1 callersFunctionmain
()
src/mjlab_microduck/train_cli.py:25
↓ 1 callersFunctionmain
()
src/mjlab_microduck/sim/body_server.py:494
↓ 1 callersFunctionmain
()
src/mjlab_microduck/robot/microduck/add_backlash.py:60
↓ 1 callersFunctionmain
()
src/mjlab_microduck/publish/cli.py:221
↓ 1 callersFunctionmain
()
scripts/play_latest.py:26
↓ 1 callersFunctionmain
()
scripts/infer_policy.py:896
↓ 1 callersFunctionmain
()
scripts/validate_bam_testbench.py:181
↓ 1 callersFunctionmain
()
scripts/plot_observations_comparison_plotly.py:267
↓ 1 callersFunctionmain
()
scripts/testbench_sim2real.py:541
↓ 1 callersFunctionmain
()
scripts/view_slope_terrain.py:59
↓ 1 callersFunctionmain
()
scripts/hf/uploader.py:18
↓ 1 callersFunctionmake_backlash_variant
Convert a microduck env cfg (velocity/velstand/standup/...) to backlash.
src/mjlab_microduck/tasks/backlash.py:42
↓ 1 callersFunctionmake_microduck_ball_kick_env_cfg
Create the Microduck BallKick environment configuration. ``kick_foot`` overrides the module-level KICK_FOOT flag (used by tests); normal trai
src/mjlab_microduck/tasks/microduck_ball_kick_env_cfg.py:132
↓ 1 callersFunctionmake_microduck_roulade_env_cfg
Create Microduck forward-roll environment configuration.
src/mjlab_microduck/tasks/microduck_roulade_env_cfg.py:147
↓ 1 callersFunctionmake_microduck_sitstand_env_cfg
Create Microduck sitstand environment configuration.
src/mjlab_microduck/tasks/microduck_sitstand_env_cfg.py:177
↓ 1 callersFunctionmake_testbench_env_cfg
(play: bool = False)
src/mjlab_microduck/tasks/testbench_env_cfg.py:121
↓ 1 callersFunctionmaybe_submit_to_hf_jobs
Consume `--hf-jobs` and exit the process; a no-op without the flag. Called at import time of `mjlab_microduck.tasks`, so it runs inside mjlab's
src/mjlab_microduck/train_hook.py:47
↓ 1 callersFunctionmujoco_rollout
Run the testbench in MuJoCo with our BAM M6 actuator logic.
scripts/validate_bam_testbench.py:86
↓ 1 callersFunctionnpz_to_bam_log
Convert a rollout .npz (written by rollout_sim/rollout_real) to a BAM log json. BAM log format (see ~/Rhoban/bam/bam/logs.py): top-level: m
scripts/testbench_sim2real.py:426
↓ 1 callersMethodplace
(self, pose: dict[str, float] | None, trunk_z: float, offset_y: float)
src/mjlab_microduck/sim/body_server.py:256
↓ 1 callersFunctionplot_comparison
Plot comparison between real and simulated observations using Plotly. If sim_obs is None, only plots real data.
scripts/plot_observations_comparison_plotly.py:44
↓ 1 callersFunctionpose_table
A named pose from the scene's keyframes, as joint name → angle. Read from a single-duck model and applied by name, because attaching a robot does
src/mjlab_microduck/sim/body_server.py:131
↓ 1 callersFunctionprint_run_info
Print run details and return dict with env_name, run_path, checkpoints.
scripts/wandb_utils.py:54
↓ 1 callersFunctionrandom_push
Set the trunk's world-frame xy velocity to a random vector of magnitude PUSH_MAX, simulating the push_by_setting_velocity training eve
scripts/infer_policy.py:1189
↓ 1 callersMethodremember
(self)
src/mjlab_microduck/sim/body_server.py:272
↓ 1 callersMethodreset_friction_scale
(self, env_ids)
src/mjlab_microduck/actuator/friction_dr_bam.py:52
↓ 1 callersFunctionresolve_run
Find latest run for user (optionally filtered to a task-id substring), print info, return (run, info). Exits on failure.
scripts/wandb_utils.py:110
↓ 1 callersMethodrestore
Put this duck back where it was, for the one that has not been enabled yet.
src/mjlab_microduck/sim/body_server.py:279
↓ 1 callersFunctionrollout_real
( onnx_path: str, total_time: float, seed: int, port: str, motor_id: int, baudrate: in
scripts/testbench_sim2real.py:299
↓ 1 callersFunctionrun
Step in real time. **Real time, not as fast as possible.** The daemon's loop is wall-clock and its health gate fails below 45 of 50 Hz, so a
src/mjlab_microduck/sim/body_server.py:434
↓ 1 callersFunctionrun_command
Print and optionally execute a command from the project root.
scripts/wandb_utils.py:128
↓ 1 callersMethodsensors
(self)
src/mjlab_microduck/sim/body_server.py:292
↓ 1 callersMethodset_friction_scale
(self, env_ids, friction_scale: torch.Tensor)
src/mjlab_microduck/actuator/friction_dr_bam.py:49
↓ 1 callersMethodset_gain
(self, kp: int)
src/mjlab_microduck/sim/body_server.py:358
↓ 1 callersFunctionset_random_crouch_state
Reset selected envs into a random mid-recovery crouch. Reverse curriculum for the recovery last mile (velstand run-5 lesson): prone-init epis
src/mjlab_microduck/tasks/mdp.py:4332
↓ 1 callersFunctionset_random_prone_orientation
Randomly initialize each env as face-down (belly) or face-up (back), with random yaw. Face-down: +90° pitch → quat = [s*cy, -s*sy, s*cy, s*sy]
src/mjlab_microduck/tasks/mdp.py:4122
↓ 1 callersFunctionset_standby_gains
(on: bool)
scripts/infer_policy.py:1173
↓ 1 callersMethodset_targets
(self, wire_targets: list[float])
src/mjlab_microduck/sim/body_server.py:351
↓ 1 callersMethodset_torque
(self, on: bool)
src/mjlab_microduck/sim/body_server.py:363
↓ 1 callersMethodslow_sensors
(self)
src/mjlab_microduck/sim/body_server.py:336
↓ 1 callersFunctionspin_gate_by_phase
Porte de shaping dans [0,1] = enveloppe normalisée. Vaut 0 sur tout le segment de repos : les amorces (ciseau des jambes, différentiel des ro
src/mjlab_microduck/tasks/mdp.py:5894
↓ 1 callersFunctionspin_rate_reward_from_values
Gaussienne sur l'erreur de vitesse de lacet (fonction pure, testable).
src/mjlab_microduck/tasks/mdp.py:5939
↓ 1 callersFunctionspin_wheel_differential_from_values
Fonction pure : tanh du différentiel de roues, portée par gate, clampée ≥ 0.
src/mjlab_microduck/tasks/mdp.py:6037
↓ 1 callersFunctionstanding_composite_score
Smooth multiplicative goal-state score (product of three Gaussians). Returns ``height_score * upright_score * pose_score``, each ∈ [0, 1]. Be
src/mjlab_microduck/tasks/mdp.py:810
↓ 1 callersMethodstep
Advance the world, taking the lock once for the whole batch. **Batched because the lock is the bottleneck, not the solver.** Four daemons at
src/mjlab_microduck/sim/body_server.py:183
↓ 1 callersMethodtoggle_body_pose_mode
Toggle body pose control mode on/off.
scripts/infer_policy.py:542
↓ 1 callersMethodtoggle_head_mode
Toggle head control mode on/off.
scripts/infer_policy.py:847
↓ 1 callersMethodtoggle_sit
Toggle sitting on/off (Y key). Old one-way sit policy (--sit): Y off switches back to the standing/ walking session, which does the s
scripts/infer_policy.py:807
↓ 1 callersMethodtoggle_slope_mode
Toggle slope policy mode on/off (passive descent, zero twist command).
scripts/infer_policy.py:557
← previousnext →101–200 of 681, ranked by callers