▶ Try it its model runs in your browser, nothing to install
arche/diff-drive-rover
Differential-drive rover
A rover on two driven wheels and a caster, with wheel encoders, an IMU and a GPS, and a navigator that follows waypoints by odometry: a heading and a speed loop; its plant in MuJoCo, its test cases run against it.
plantmujocoroverdifferential-driveodometrywaypointscontrol
archec add main.arche arche/diff-drive-rover@^0.1
Package
| Kind | template |
|---|---|
| Version | 0.1.0 |
| License | Apache-2.0 |
| Export control | none |
| Works with | archec >=0.10 |
| Edition | 0.12 |
| Handlers | the action language (```arche), run as TypeScript from its code |
| Home | https://github.com/arche-lang/arche-lang |
Model
| Systems | Rover |
|---|---|
| Components | Chassis Wheel Caster WheelMotor WheelEncoder Imu Gps Navigator |
| Requirements | 2 |
| Messages | 4 |
Code it brings
| Where | Language | Lines |
|---|---|---|
main.arche · Navigator.on_left.body | arche | 1 |
main.arche · Navigator.on_right.body | arche | 1 |
main.arche · Navigator.on_fix.body | arche | 2 |
main.arche · Navigator.reached.body | arche | 13 |
main.arche · Navigator.on_motion.body | arche | 29 |
Differential-drive rover
A 2 kg rover on two driven wheels and a caster ball, with an encoder on each wheel, an IMU and a GPS. The navigator follows three waypoints — (1, 0), (1, 1), (0, 1) — by odometry: the distance from the encoders, the heading from the gyro. A heading loop turns it toward the next waypoint, a speed loop slows it in the turns and near the waypoint (0.5 m/s at most), and it stops at the last. The GPS is the truth: when odometry says a waypoint is reached, the navigator records how far the GPS says it is (miss, worst_miss).
| | | |---|---| | Plant | a free chassis, 2 wheel hinges with velocity servos (kv 0.2), a caster (ball joint), 2 encoders, IMU, GPS, 1 ms step | | Controller | odometry, heading and speed loops, 100 Hz; Driving → Arrived | | Requirements | REQ-RV-WAYPOINTS (within 0.1 m of each, in 15 s), REQ-RV-SPEED | | Test plan | TP-RV: three waypoints, the speed limit |
archec new my-rover --template diff-drive-rover a project from it, yours to change
archec gen main.arche --target mujoco -o out
archec sim main.arche --plant out/mujoco/plant_bridge.py --test
python3 out/mujoco/plant_bridge.py --viewer
In MuJoCo (4.0): the last waypoint reached at 10.4 s, the GPS at most 0.073 m from a waypoint when odometry said it was there. The wheels are spheres, so that their frames need no turning; the ground is MuJoCo's default plane.
Versions
| Version | Published | archec | State |
|---|---|---|---|
0.1.0 | 2026-11-12 | >=0.10 | public |
Signature
Signed by arche with key e660d0a8851875b9. Files: 3, fingerprint sha256-d02581c25d89db2a5d6b…. archec add checks both before it writes anything.
Discussion
Loading…