Back to index
Everyone hits these once. Here’s the fix.
You did: wheels.execute(proposal);
Fix:
let action = safety.validate(proposal);
wheels.execute(action);
Example: examples/showcase/ai_safety_violation.sd (broken) vs rover_navigation.sd (fixed)
You did: wheels.drive(linear: 0.5, ...) without m/s
Fix: Always attach units to physical quantities:
wheels.drive(linear: 0.5 m/s, angular: 0.1 rad/s);
Distances: m. Angles: rad. Time: ms, s.
spanda: command not foundFix:
export PATH="$PWD/target/release:$PATH"
# or
./target/release/spanda check examples/hello_world.sd
Build first: npm run build:rust
check passes but run does nothing visibleSimulation often stops or drives slowly by design. Try:
spanda sim file.sd
spanda run file.sd --trace-scheduler
Or increase loop visibility in examples/basics/02_sensors_and_safety.sd.
verify fails — sensor not on hardware profileYou declared sensor camera: Camera but hardware only lists Lidar.
Fix: Add Camera to the hardware block’s sensors [ ... ] list, or remove the sensor from
the robot.
spanda verify file.sd --target RoverV1 --json
Read the JSON report — it names the mismatch.
deploy lineverify needs to know which robot maps to which hardware:
deploy MyRobot to RoverV1;
You did: import foo.bar; without a module foo.bar; file in the project.
Fix: Match module names to file paths, or start with single-file examples in examples/basics/.
Symptom: run hangs or runs forever.
Fix: Behaviors with loop every run until the simulator hits maxLoopIterations. For tests,
golden fixtures pass "run": { "maxLoopIterations": 5 }. This is normal for control loops.
| Python habit | Spanda habit |
|---|---|
def foo(): |
behavior foo() { } or export fn foo() { } |
True / False |
true / false |
None |
None() for Option, or language-specific patterns |
| No units | Always m/s, rad, ms |
import rospy |
sensor / topic declarations in the robot block |
spanda check file.sd --json and read the first diagnosticexamples/basics/ for the same featureNext: Glossary