Skip to content

About

Reproducible seven-task MuJoCo benchmarks for GTSAM sampling and learning-based planners

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

GTSAM planning on the Kurtz–Burdick tasks

This benchmark compares 15 GTSAM controllers and a neutral-action baseline on seven MuJoCo tasks from Generative Predictive Control. The main experiment measures closed-loop cost, decision latency and computational work on matched initial states. The robots range from a one-actuator pendulum to a 23-actuator Unitree G1 humanoid. Kurtz and Burdick’s paper · Task definitions

The published comparison uses 1,300 twenty-second episodes. The 14 cart-pole search controllers each run 15 paired starts at 128 trajectories per decision. All 15 controllers share 15 double cart-pole starts. Search controllers use 128 rollouts there, and direct GPC generates a single plan. All 15 walker controllers use 15 paired starts. Direct GPC takes one flow draw and each search controller uses 128 trajectories per decision. All 15 crane controllers also share 15 targets at 30 Hz. All 15 humanoid controllers use 15 paired starts at 50 Hz, with one direct plan or 32 search trajectories per decision. The remaining controller–task combinations use five starts. The standalone default run uses ten-second episodes. Each controller runs five seeds on the pendulum, cart-pole, double cart-pole, Push-T, walker, luffing crane and humanoid. Twelve trajectory-sampling controllers cover MPPI, CEM, predictive sampling and proposal, tracking or weighting variants. Three learned controllers run direct GPC, GPC with online refinement and PO-MPC. The neutral command is zero in normalized actuator coordinates. Planner coverage and budgets · Learning and evaluation protocol

Set up the planning build

Run the commands from the root of this benchmark repository in a Python 3.12 environment. Use a GTSAM checkout with the learning planners and their stable and unstable Python bindings. The commands assume a sibling checkout named gtsam; set GTSAM_SOURCE to its absolute path for another layout. Asset downloads use POSIX file locking. GTSAM learning planners (PR #2953)

conda activate py312
export GTSAM_SOURCE="${GTSAM_SOURCE:-$(cd ../gtsam && pwd)}"
export GTSAM_BUILD="$GTSAM_SOURCE/build"
python -m pip install mujoco==3.11.0 scipy==1.18.1 plotly==6.3.1 Pillow==12.3.0 pytest
# CPU training for the planar walker teacher
python -m pip install torch==2.13.0

The reference Python 3.12 environment uses NumPy 2.5.4. Each run records the loaded package versions and library hashes in run.json. An existing GTSAM build with native and Python planning support can be used directly.

cmake -S "$GTSAM_SOURCE" -B "$GTSAM_BUILD" \
  -DCMAKE_BUILD_TYPE=Release \
  -DGTSAM_UNSTABLE_BUILD_PYTHON=ON -DGTSAM_BUILD_UNSTABLE=ON -DGTSAM_BUILD_PYTHON=ON \
  -DGTSAM_PYTHON_VERSION=3.12 -DPYTHON_EXECUTABLE="$CONDA_PREFIX/bin/python"
cmake --build "$GTSAM_BUILD" --target gtsam_py gtsam_unstable_py -j 6

Fetch the two pinned source repositories and run the focused tests. GTSAM_BUILD/python supplies the just-built bindings to every command in this shell.

export PYTHONPATH="$GTSAM_BUILD/python${PYTHONPATH:+:$PYTHONPATH}"
python assets.py
python -m pytest -q tests

Reproduce the published results

Run the commands below from the benchmark directory after setup. The reports select a single configuration per controller and task. Cart-pole uses the tuned MPPI inverse temperature, the narrow Tsallis cutoff, and the shared warm start and exploration settings. The two pendulum tracking controllers use iLQR feedback. The compact table, interactive plots, seed downloads and synchronized movies all use the same selected episodes.

export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1
out=runs/extended
python benchmark.py --seconds 20 --cycles 32 --po-cycles 1024 --train-steps 64 --gpc-envs 12 --workers 6 --rollout-threads 2 --out "$out"
python tests/audit_results.py --out "$out" --workers 6 > "$out/audit.json"
python studies/pendulum_feedback.py "$out"
python studies/cart_pole.py "$out" --workers 6
python studies/cart_pole_planners.py "$out" --workers 6
python studies/mppi_temperature.py "$out" --workers 6
python studies/mppi_variants.py "$out" --workers 6
python studies/double_cart_pole.py "$out" --workers 6
seeds="11 23 47 71 97 211 212 213 214 215 216 217 218 219 220"
python studies/double_cart_pole_planners.py "$out" --seeds $seeds --workers 6 \
  --methods MPPI CEM EliteMPPI TsallisMPPI ColoredMPPI NLN-MPPI SmoothMPPI PiecewiseMPPI Primitives TubeMPPI RobustMPPI
python studies/double_cart_pole_prior.py "$out/studies/double_cart_pole_planners/training" --workers 6
python studies/double_cart_pole_learned.py "$out" --methods prior gpc gpc_plus po_mpc --seeds $seeds
python studies/double_cart_pole_planners.py "$out"
python studies/walker.py "$out" --workers 6
python studies/crane.py "$out" --workers 5
python studies/humanoid.py "$out" --workers 5
python tests/audit_results.py --out "$out" --reported --workers 6 > "$out/reported-audit.json"
python render_models.py --out "$out/models"
python media/render_replays.py --out "$out"
python report.py "$out"
python reports/compact.py "$out" "$out/summary.html"

Open summary.html for the offline cost and success-rate table, or index.html for episode movies, physical traces and the downloadable reported-episodes.csv. Interactive charts load version-pinned Plotly from its CDN and require an internet connection.

Double cart-pole swing-up and balance

The double cart-pole uses Kurtz and Burdick’s 0.8-second horizon, ten control knots, and 128 candidates per 50 Hz decision. Their quantitative experiment measures average running cost over 100 random starts. Here success also requires a two-second hold with each link within 15° of world upright and below 1 rad/s, and the cart within 0.25 m of center and below 0.5 m/s. The second link’s world angle and speed include the motion of the first hinge. The standalone Hydrax demo uses 1,024 candidates and Gaussian noise of 0.3. Paper, Section VI and appendices · Released double cart-pole demo

The balance proposal gives predictive sampling a candidate that can keep the coupled links upright. A discrete-time LQR about the centered upright equilibrium generates a ten-knot control tape on the linear model. The 128 nonlinear MuJoCo rollouts evaluate the shifted incumbent, 95 Gaussian draws about it, the balance tape, and 31 Gaussian draws about that tape. The Gaussian scale is 0.4 times the state-dependent exploration factor. GTSAM predictive sampling chooses the lowest-scoring tape at each decision. Eight separate rollouts calibrate the cost scale once per episode.

The planning score augments the released terminal cost by 2 V / (1 + V/100), where V = eᵀPe is the local quadratic cost-to-go. The addition is bounded above by 200 so the local approximation has limited influence far from upright. The simulator, running cost, reported terminal cost, and physical hold test use the original task. To reproduce the Gaussian reference on the five common starts, run python studies/double_cart_pole.py "$out" --profile reference. The warm, proposal, and value profiles isolate the two balance changes at the same noise scale and budget. The default profile also evaluates ten held-out starts.

The other sampling rules use the same local value estimate. MPPI and its weighting and noise variants draw around both the shifted plan and the balance plan. Their calibrated inverse temperature is 8,192. CEM averages four elites. The native smooth, motion-primitive, Tube and Robust algorithms score warm-start candidates inside their 128-trajectory budget. Smooth uses 125 proposals plus the returned rollout and two warm-start candidates. Motion primitives and Tube each use 62 paired proposals, two returned plans and two warm starts. Robust uses 24 candidates in each of five branches, three threshold or returned rollouts and five warm starts. Its nominal and measured searches receive the selected control tape and retain their own state estimates and tracking feedback.

The three learned methods use a task-specific feedback prior. Predictive sampling supplies 64 seven-second demonstrations offline from seeds 13007–13070. The first 32 trajectories and their reflections form a lookup table. At each sample a backward Riccati pass gives a tracking gain and quadratic error estimate. The prior selects among nearby reference states using that estimate and an actuator-saturation penalty. Near upright it switches to the local balance plan. The remaining 32 demonstrations supervise a conditional flow in bounded residual action coordinates. The size of a residual correction decreases as the system approaches the goal. The standalone prior is evaluated with zero correction on the same starts and its hold count appears in both reports.

Direct GPC applies one residual flow draw each decision. GPC+ combines 64 flow draws with 64 Gaussian-family candidates and scores all 128 in MuJoCo. PO-MPC fits its dynamics, reward and critic on 192 episodes of 48 residual-action transitions. It scores 128 trajectories per decision over three knots (0.24 seconds) in the frozen learned model. The shared demonstrations supply swing-up information to all three learned controllers. Their results measure the combined controller. All training data, including the demonstration library, are generated locally. Feedback prior · Learned controllers

Planar walker

The walker must move forward at 1.5 m/s while staying upright. A successful episode keeps the torso above 0.9 m and within 30° of vertical throughout the last two seconds, with mean forward torso speed between 1.2 and 1.8 m/s. The released cost instead penalizes squared height error, subtree velocity error, and the square of the vertical-axis alignment error. At small pitch angles this last penalty grows only as the fourth power of pitch.

The batched walker search examines all 60 physics steps of each 0.6-second prediction. Alongside the released cost it penalizes the worst height and tilt excursions after the first control interval, vertical and angular velocity, and error in the mean forward speed. The planner uses a height margin of 1.04 m and a tilt margin of 17°. A forward speed reference of 1.65 m/s compensates for the slow walking observed on the tuning starts. Evaluation retains the 1.5 m/s target. Rollover of the four-knot control plan advances by the 20 ms decision interval. CEM uses two updates of 64 bounded controls with three elites. When torso height falls below 0.98 m or the upright-axis cosine falls below 0.83, CEM first searches for a stand-up motion with a wider control distribution. GPC+ uses the original frozen flow, with 64 flow candidates and 64 local candidates. The plant, reset distribution and reported cost use the released walker model. With the same 128-rollout predictive sampler, the released planning score met the hold criterion on two of five tuning starts. The trajectory score met it on all five. To reproduce the comparison, run python studies/walker.py "$out" --group reference for predictive sampling on the five tuning starts with the same budget, proposal and fractional warm start. Walker study

The weighting and noise variants use the full-path walking objective. Piecewise MPPI uses two linear segments so the torque perturbation can change direction within the four-knot horizon. Motion primitives also uses two segments. Its two native search branches each draw 63 candidates and return two trajectories in total. Its graph scores mean forward speed from horizontal displacement over each knot, alongside torso height, tilt and body velocity.

Smooth, Tube and Robust MPPI use full-path scoring to choose a warm start before their native graph update. The initial population includes the shifted incumbent and bounded Gaussian perturbations with standard deviation 0.36. The native update uses standard deviation 0.12. Smooth uses 64 warm-start paths, 63 native candidates and one returned path. Tube uses 64 warm-start paths, two populations of 31 and two returned paths. Robust uses 65 warm-start paths, five populations of 12, one threshold check and two returned paths. Eight one-time calibration rollouts per episode are recorded separately. Walker controllers

The published GPC experiment uses a four-knot, 0.6-second walker horizon and 50 Hz feedback. Its convolutional flow trains over 20 iterations with 128 parallel environments, 16 ordinary and 16 policy proposals, and 10 epochs per iteration. Table III specifies 10 integration steps for inference. The released interactive demo uses 100 and warm-starts from the entire previous plan. The paper compares average cost over 100 ten-second episodes. This benchmark also checks a physical hold in the last two seconds of each twenty-second episode. PO-MPC is a separate comparison method. Kurtz and Burdick, Fig. 3 and Tables II–III · Released walker demo

The walker-specific GPC and PO-MPC profiles share an observation encoder learned offline. First, 48 six-second MPPI demonstrations initialize a policy that maps the 18 walker observations to six torques. Twin delayed deep deterministic policy gradients (TD3) refine the teacher from randomized resets and demonstration states. The teacher earns reward for staying upright at the target speed. A checkpoint is selected on 24 separate twenty-second validation starts. Its two hidden layers encode the observed state into 128 features. The teacher, optimizer settings and simulator work are recorded with the run. Walker teacher

To train the native GPC flow, the frozen teacher drives 128 further starts with torque perturbations. Each training example pairs the current features with four future unperturbed teacher commands from the same episode, spanning 0 to 460 ms. At evaluation, the flow starts from a zero control tape, takes 10 integration steps and applies its first torque every 20 ms. PO-MPC fits its own world model in residual-action coordinates around this frozen flow. At each tick it scores 128 three-knot corrections in that model and applies the search mean. Proposal standard deviation is 0.32 in residual coordinates, and corrections are bounded to 0.08 in normalized torque. Five starts set the controller configuration. Ten additional starts evaluate the frozen configuration. Both reports show the teacher acting alone and a flow trained with the same labels and raw observations. GPC+ retains its independently trained flow. Training, budgets and ablations

Luffing crane target reach and swing damping

The pinned crane draws Cartesian targets independently of its actuator limits. The report gives every sampled target equal weight and also groups those within 0.15 m of the estimated free-hanging workspace. The calculation finds the closest vertical cable and payload pose, accounting for boom geometry, gravity load on the luff servo, cable stretch and hoist limits. A dynamic trajectory can pass outside that workspace. The physical success criterion requires both distance ≤ 0.15 m and speed ≤ 0.25 m/s for the entire final two seconds. Kurtz and Burdick evaluate average running cost over ten seconds. The source crane uses two control knots over 0.8 seconds and 30 Hz feedback. Paper, Fig. 3 and Tables II–III · Released crane task

The twelve sampling planners initialize from the hanging setpoint, advance the previous plan by one feedback tick and move it 10% toward the setpoint. The planning score increases the payload-speed penalty from 0.1 to 0.55, while evaluation retains the released cost. Each planner scores 128 physical trajectories per decision. The sampling spread decreases near the target. Crane study

Direct GPC learns two control knots from a local swing-damping LQR on 128 separate simulation starts. It observes displacement and velocity in the boom frame, including features scaled by pitch and cable length. GPC+ scores 64 flow and 64 local candidates around the equilibrium. PO-MPC scores 128 learned-model corrections around the frozen direct flow. Its correction authority decreases as the payload settles near its hanging position. The report also evaluates the static command and the offline teacher acting alone on all 15 starts. Flow training and residual model

Humanoid stand-up and balance

The 23-actuator G1 must raise its torso IMU to at least 0.8 m and stay within 25° of vertical throughout the last two seconds. The released cost includes the squared norm of a rotated unit vector, which equals one at every orientation. The planning objective adds a tilt penalty proportional to one minus the vertical component of that vector, a height shortfall penalty, and terms for angular and vertical speed. The report evaluates the released running cost and the physical hold separately. Released humanoid objective

The physical searches evaluate 32 trajectories per decision over 0.9 seconds with three control knots. Once the torso is above 0.72 m and its vertical direction cosine exceeds 0.8, joint-angle feedback and ankle corrections help the planner maintain stance. The search then narrows around the feedback command. The report includes a feedback-only comparison on the same starts. Standing objective, feedback, and budgets

Direct GPC and GPC+ use the same frozen flow, conditioned on body-frame observations. During each training cycle, predictive sampling scores 32 local and 32 flow-generated three-knot candidates with the upright-sensitive cost. The winning plans supervise the next flow fit. The extended configuration uses 32 cycles of 12 resets. Each reset runs for the full 20 seconds, with 1,000 consecutive decisions at 50 Hz. Both reports show how often these training trajectories met the same two-second hold criterion used for evaluation. Later cycles also collect targets on states visited by the current policy. At evaluation, direct GPC executes one plan and GPC+ scores 16 flow and 16 local candidates per decision. PO-MPC uses its own demonstration-trained flow from 24 independent eight-second MPPI runs and scores 32 corrections in its learned model. All three execute on the same plant and report the released running cost. Humanoid policy training

To rerun the paired GPC comparison in an existing extended run, execute python studies/humanoid.py "$out" --group gpc --workers 5, followed by python studies/humanoid.py "$out" --group summary. The reported-episode audit, movie, and HTML commands above refresh both reports.

Run a comparison

A quick check uses one short pendulum episode for each selected method. --out keeps the reduced experiment separate from the default result set.

python benchmark.py --tasks pendulum --methods neutral MPPI gpc gpc_plus po_mpc \
  --seconds 1 --samples 8 --iterations 1 --seeds 11 \
  --cycles 1 --train-steps 4 --workers 1 --out runs/pendulum-smoke

Run the full comparison with the published control rates using the default settings below. The main metric is average running cost per control tick, measured after applying the command. Compare values within a task because the seven tasks have different cost definitions and scales. Wall-clock latency includes Python overhead and can vary with worker contention.

export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1
python benchmark.py --seconds 10 --decision-stride 1 --samples 32 --iterations 2 \
  --cycles 8 --gpc-envs 12 --po-cycles 256 --train-steps 64 --training-seed 13007 \
  --seeds 11 23 47 71 97 --workers 4 --rollout-threads 2 \
  --out results

Start with an empty output directory for a fresh comparison. The runner writes completed episodes atomically. Repeat the same command to resume, or pass a new --out when changing measured settings, controller code or bindings. python benchmark.py --help lists the available task and method identifiers. Each episode records the applied controls, observations, running costs, terminal cost, per-decision timing and work counters. Training records separately account for simulator and learned-model work.

Run the supporting studies

Passing --gpc-paper-studies reuses the frozen main-run policy for two studies. GPC+ scores 64 Gaussian and 64 flow candidates in a single update on every task and seed. The double cart-pole study varies the direct GPC warm-start coefficient over 0, 0.5 and 1 using common evaluation draws. Its JSON includes all 15 episode measurements and representative action and tip-height curves. The crane study trains separate nominal, mean-risk and upper-tail CVaR flows and evaluates them on matched target sequences under nominal and perturbed physics.

python studies/crane_risk.py --output results/studies/crane.json

python studies/crane_risk.py --help lists the domain, training, target sequence and timeout controls. The warm-start study fixes its training configuration to match the main default run. These studies correspond to Figures 3b and 4 and Section VI-C of the paper. Study methods

Replay results and generate the report

Replay sends each recorded action back through the original MuJoCo model from the recorded seed. It verifies the starting state hash, tick count, observations, running costs and terminal cost. The default audit checks complete coverage. --existing can check completed episodes while an experiment is running.

python tests/audit_results.py --out results --workers 4 > results/audit.tmp && mv results/audit.tmp results/audit.json
python studies/pendulum_feedback.py results
python tests/audit_results.py --out results --pendulum-feedback
python reports/compact.py results results/summary.html
python render_models.py --out results/models
# Optional: render 10 fps videos with MuJoCo and ffmpeg (libx264).
python media/render_replays.py --out results
python report.py results

The compact summary.html is a standalone offline report. It contains aggregate costs, decision times, training work, and physical success rates. The training records, per-seed trajectories, and interactive HTML stay in the ignored output directory.

Open results/index.html in a browser. The report embeds experiment measurements and available model thumbnails and loads version-pinned Plotly from its CDN for interactive charts. Rendering needs a working MuJoCo graphics context. The optional video command replays recorded controls for the first configured evaluation seed at 10 frames/s and encodes MP4 files with ffmpeg’s libx264 encoder. The main runner also builds the report when the episode matrix finishes. Run report.py again after adding study results, thumbnails or videos.

Output Contents
results/run.json Experiment settings, upstream revisions, model tree hash, package versions and hashes of the controller source and loaded Python bindings.
results/episodes/<task>/<method>-<seed>.json Trajectories with the information needed for replay.
results/training/<task>/*.json GPC and PO-MPC training configuration, counts and wall time.
results/audit.json Independently replayed tick counts and maximum cost, observation and clock discrepancies.
results/episodes.csv Per-episode cost, terminal cost, decision latency and online work.
results/studies/*.json Supporting experiments, separate from the main controller matrix.
results/replays/ Optional MP4 replays of recorded episodes.
results/models/*.jpg, results/index.html Model thumbnails and the generated interactive report.

Data provenance

assets.py fetches the paper’s GPC release at 85712bbe4faa178a8d54fa48908db0c92ca2cd6d and Hydrax at 137590d69da97a0b7debc4fc32f4727a4dc2bcdf. It checks each working tree and verifies the Hydrax model tree 6b7cc63bf7877e2a269aa777e3127af187daf9f8 before using the XML and meshes. The first fetch needs network access. Subsequent simulations can use the verified .cache/ offline. Task inputs, training transitions and evaluation trajectories are generated locally. Pinned GPC release · Pinned Hydrax models · Attribution and licenses

Longer training and settling time

To compare extra training with extra time to reach the goal, keep the default ten-second run in results, then run the same five evaluation seeds for twenty seconds. The extended profile uses 32 GPC collection cycles and 1,024 PO-MPC collection cycles. That yields 24,576 GPC labels and 65,536 PO-MPC transitions per task. Planning horizons, candidate counts, replanning rates, and task objectives match the ten-second run.

python benchmark.py --seconds 20 --cycles 32 --po-cycles 1024 --train-steps 64 \
  --gpc-envs 12 --workers 8 --rollout-threads 2 --out results-extended
python tests/audit_results.py --out results-extended --workers 4 > results-extended/audit.tmp && mv results-extended/audit.tmp results-extended/audit.json
python studies/settling.py results results-extended
python studies/pendulum_feedback.py results-extended
python tests/audit_results.py --out results-extended --pendulum-feedback
python render_models.py --out results-extended/models
python media/render_replays.py --out results-extended
python report.py results-extended
python reports/compact.py results-extended results-extended/summary.html

GTSAM publishes the compact summary from gtsam_unstable/planning/doc/KurtzResults.html in the GTSAM checkout. This benchmark keeps the full interactive report, movies, downloaded assets, and recorded episodes in ignored local directories.

Single cart-pole stabilization

The cart-pole study tests whether improving the nominal control sequence and narrowing the search near balance can hold the cart at the center of the rail. It reruns the extended experiment’s five cart-pole starts with GTSAM predictive sampling and independently replays every episode. Its two tuned profiles also run on separate sets of ten new starts. The plots show cart position, pole error from upright, and both velocities. A successful hold requires all four signals inside the original tolerances for the final two seconds.

python studies/cart_pole.py results-extended --workers 4 --movies
python report.py results-extended
python reports/compact.py results-extended results-extended/summary.html

Select the cart-pole in the interactive report to inspect physical trajectories and synchronized movies. All profiles use the same cost, actuator limits, initial-state distribution, 50 Hz feedback, and one-second horizon with ten knots. The Hydrax profile uses its released standalone settings with the GTSAM sampler and native MuJoCo. The paper’s SPC comparison uses 128 Gaussian candidates per decision. Its GPC+ comparison uses 64 Gaussian and 64 learned candidates. The 8 Gaussian and 2 learned candidates listed for cart-pole training are a separate budget. Hydrax cart-pole example · Hydrax cart-pole costs · Kurtz and Burdick, Appendices II–III

The shared cart-pole comparison runs all twelve conventional planners, GPC+, and PO-MPC on the five original and ten additional starts. Run the predictive-sampling study above first. Its saved trajectories provide independent initial-state and control-sequence checks. The learned controllers repeat the extended experiment’s offline training before changing the online search budget. Direct GPC has no online search.

python studies/cart_pole_planners.py results-extended --workers 6
python studies/cart_pole_planners.py results-extended --group movies
python report.py results-extended
python reports/compact.py results-extended results-extended/summary.html

Each decision gets 128 complete trajectories, including native planners’ reference searches and final rollouts. The conventional planners separately score eight common tapes once per episode for cost calibration. Tracker finite differences and partial reference propagation also take simulator steps. GPC+ scores 64 local and 64 flow trajectories over one second in MuJoCo. PO-MPC scores 96 local and 32 actor trajectories over 0.3 seconds in its learned model, with a terminal critic. The local report links each planner to a movie of the same start. The compact report includes the numerical comparison offline.

Vanilla MPPI temperature on the single cart-pole

Run the shared comparison above first. The temperature study uses the same Gaussian proposal, cost normalization, warm-start shift, exploration scale and 128-rollout budget. It varies only the inverse temperature passed to GTSAM’s MPPI rule. The study selects the warmest tested setting that holds all five tuning starts at both checkpoints, then evaluates it on the ten paired starts and ten fresh starts (seeds 301–310). The colder follow-up also runs ten independent confirmation starts (seeds 401–410). Weight diagnostics reuse each scored batch. The temperature study saves weight diagnostics alongside its episode records.

python studies/mppi_temperature.py results-extended --workers 6 --movie
python report.py results-extended
python reports/compact.py results-extended results-extended/summary.html

To run the tuned controller directly on a cart-pole state at 50 Hz, use the benchmark planner with a fixed inverse temperature on calibrated costs.

from planners import Planner

planner = Planner("MPPI", task, task.knots, samples=128, seed=23, iterations=1,
                  sigma=0.3, advance=True, scale_noise=True, exact_budget=True,
                  mppi_beta=8192)
action = planner.plan(state)[0]

With cart position p, hinge angle θ measured from downward, and velocity vector v, the running cost is 2(1 + cos θ) + p² + 0.01‖v‖² + 0.01u². Each knot contributes its starting cost times 0.1 s. The terminal cost uses ten times the angular term, the same position and velocity terms, and zero control penalty. The cost encourages balance and centering continuously. The physical hold test additionally requires staying inside explicit position, angle, and speed bounds on every tick of a two-second interval.

Temperature transfer to the MPPI variants

After the shared cart-pole comparison and the vanilla temperature sweep, apply the same fixed inverse temperature to the nine MPPI variants on the original 15 paired starts. Each controller uses 128 search trajectories per decision. The study replays the saved actions, checks simulator work, and compares the holds with the archived β = 1 runs. A separate Tsallis experiment narrows its cost cutoff by the same factor.

python studies/mppi_variants.py results-extended --workers 6
python studies/mppi_variants.py results-extended --movies-only
python report.py results-extended
python reports/compact.py results-extended results-extended/summary.html

About

Reproducible seven-task MuJoCo benchmarks for GTSAM sampling and learning-based planners

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages