Robotics / Simulation / 01

A testbed for
robot navigation.

A TurtleBot 2 / Kobuki differential-drive robot, simulated in MuJoCo. Compare navigation strategies against the same worlds, sensor model, and evaluation seeds.

PhysicsMuJoCo
Controllers03 interchangeable
StackPython · NumPy
FIG 01 / KOBUKI PLATFORM Kobuki mobile robot with stacked sensor and computing platforms TURTLEBOT 2 / KOBUKI
FIG 02 / SIMULATION

The world under test.

MuJoCo arena with generated obstacles, a navigation target, and a repeatable environment for controller evaluation.

MuJoCo simulation screenshot showing a walled arena with red cube obstacles, a robot marker, and a green goal marker.
MUJOCO / SEEDED OBSTACLE ARENAFIG 02
01 / SYSTEM OVERVIEW

From world
to outcome.

The testbed isolates the navigation problem into a repeatable simulation loop. A seeded world is generated, sensor observations become features, a controller chooses linear and angular velocity, and the evaluator records the result.

01 / WORLD

Generate

Walls, obstacles, valid start and goal; seeded for reproducibility.

02 / SENSORS

Observe

Depth scan, encoders, IMU, bumpers and odometry.

03 / FEATURES

Represent

Rolling local map distilled into 19 navigation features.

04 / CONTROL

Act

Controller returns velocity command (v, ω).

05 / EVALUATE

Measure

Success, collisions, path length and elapsed time.

A / SIMULATION

Physics-aware robot

Velocity smoothing and wheel servos run at 20 Hz. Contact behavior, wheel inertia and caster setup are tuned to keep the simulation stable.

B / FAIR COMPARISON

Shared evaluation

Each controller is evaluated on the same seed set, so results can be compared across identical generated worlds.

C / GROUND TRUTH

Honest outcomes

Success is checked against ground truth. Odometry drift can therefore count as a failure rather than being hidden by the robot's estimate.

02 / NAVIGATION LOGIC

Three ways
to navigate.

Swap the controller without changing the surrounding simulation and evaluation harness. Select a method to inspect its role in the experiment.

CONTROLLER / 01

Rule-based navigation

Combines go-to-goal behavior with Bug-style boundary following to route around obstacles. This provides an interpretable baseline for comparison.

observation → goal seeking / boundary following → (v, ω)
03 / OBSERVATION MODEL

Signals into
decisions.

Sensor outputs are combined into a compact local representation. The feature pipeline uses odometry for goal range and bearing, plus local clearance and contact cues.

Depth camera

Astra-like field of view: 60° × 49.5°; range 0.6–8 m. Noise grows quadratically with distance.

RAY-CASTDEPTH SCAN
◉

Wheel encoders

Distance from wheel ticks, with 2578.33 ticks per revolution.

ODOMETRY
↻

IMU

Gyroscope and accelerometer with simulated noise and bias.

GYRO + ACCEL
⌁

Bumpers

Left, centre and right contact signals provide immediate collision cues.

L / C / R
⊙
04 / GET STARTED

Run the
experiment.

Create an environment, install the two listed dependencies through the project requirements, then run a controller or collect data. Commands below are copied from the project README.

01 / ENVIRONMENT SETUP
TERMINAL · WINDOWS
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt
02 / RUN A CONTROLLER
SIMULATION
python -m nav run \
  -c rule --seed 3 \
  --episodes 10 --render
03 / COLLECT TRAINING DATA
DATA COLLECTION
python -m nav collect \
  -c tsk --episodes 120 \
  --out data/tsk
04 / EVALUATE CONTROLLERS
REPRODUCIBLE EVALUATION
python -m nav eval \
  --controllers rule tsk learned \
  --episodes 50 \
  --out results/eval.csv \
  --json results/summary.json
05 / CODEBASE

Where things
live.

The code is split by responsibility: world generation, simulation, sensor models, feature extraction, controllers, dataset recording and evaluation.

nav/kobuki.xml

Robot MJCF and collision geometry, with a simplified TurtleBot 2 stack.

nav/world.py

Seeded arena generation, obstacle clearance, start/goal placement and reachability checks.

nav/sim.py

NavEnv.reset(seed) and step(v, w); wheel servos, collisions and outcomes.

nav/sensors.py

Encoder, IMU, depth camera, bumper and odometry models.

nav/features.py

Depth scan to rolling local map to 19 controller features.

nav/controllers/

Rule-based, first-order TSK fuzzy and learned behaviour-cloning controllers.

nav/dataset.py

Per-episode NPZ data, JSONL index and captured configuration.

nav/evaluate.py

Same-seed evaluation with success, collisions, path length and time metrics.

06 / VALIDATION

Test the
assumptions.

The included checks target robot motion, sensor geometry, deterministic data flow and world-generation constraints.

Robot kinematics
Run python tests/check_robot.py to check that the robot tracks commands, remains upright and respects its top-speed behavior.
Sensor models
Run python tests/check_sensors.py to test odometry drift, gyro/accel behavior, depth geometry and minimum range, and bumper signals.
Pipeline and determinism
Run python tests/check_pipeline.py to check registry extensibility, bit-exact determinism and dataset synchronization.
World generation
Run python tests/check_world.py to test spawn rules across 150 seeds per map.
Known modelling decisions
Casters use priority settings to remain frictionless and sit 1 mm high to reflect spring-loaded wheels. Wheel armature represents gearmotor rotor inertia. An elliptic friction cone with impratio=10 reduces soft-contact creep. Success is judged using ground truth, so odometry drift can trigger odom_arrived_off_goal.
Scope boundaries
The current project does not include an RGB stream, ROS bridge, GPU depth rendering, or DAgger. Depth ray casting is headless and deterministic; behaviour cloning currently uses stateless TSK demonstrations.