Skip to content

What the compiler checks ​

After it has assembled the robot, the compiler runs its validation rules. Each rule asks one question of the facts it derived, such as where each wheel touches the ground or where the centre of mass is, and answers with the evidence it used.

AnswerMeans
passThe facts settle the question in the program's favour
failThey settle it against: an error, and nothing is written; for an advisory rule, a warning
unknownThey do not settle it, usually because a part does not state something: never a pass; a warning at each place the rule points at, and the summary counts it undecided
not_applicableThe question does not arise, such as steering on a base that does not steer

A rule answers for each part it points at. One that fails for one part and cannot decide another says both: the first is an error, the second a warning that begins cannot decide:.

--json lists every rule with its answer and evidence.

Assembly ​

RuleAsks
assembly.glue_on_connectorDoes every part's glue name one connector of the chassis or of a part placed on it, and is that part placed?
assembly.one_part_per_connectorDoes each connector carry at most one part?
assembly.wheel_mounts_filledDoes every drive mount carry one wheel, on the mount or on the shaft of a motor on it, with any motor that turns it on the mount or on a seat whose driveline turns it; does every other wheel mount carry one free wheel; and does nothing that drives sit elsewhere? A drive mount's wheel with no motor declared is driven within no stated limits.
assembly.wheel_type_matches_chassisIs every wheel that rolls, and every track, of a type the chassis takes?
assembly.steering_declaredDoes each steered mount carry an upright kingpin?
assembly.axles_horizontalIs the axle of every wheel that rolls, and of every track's hub, horizontal?
assembly.wheels_touch_one_planeDo all wheels, and both ends of every track's run, touch the ground within 2 mm of one plane, the one a legged robot's feet stand on too?
assembly.feet_touch_the_groundDoes every foot of a legged robot, of its chassis's own legs or of a leg placed on it, touch the ground on one plane with the others (within 2 mm), where the servos hold the legs?
assembly.legs_on_a_legged_chassisIs every leg placed on a Legged chassis that has no legs of its own, hanging from no connector of it that steers, and does such a chassis carry legs?
assembly.one_walkerIs the robot, its body and its legs placed as they are, the robot of one walker of its chassis's library at most?
assembly.links_clear_the_groundDoes every shape of a part's links but a legged robot's feet stay above the ground (within 2 mm), where its servos hold the links?
assembly.footprint_knownDo the parts' collision shapes, their links' with them where their servos hold them, bound the robot's footprint?
assembly.parts_clear_each_otherDo the declared shapes of the parts fixed to the base, each part's links' with it where their servos hold them, keep out of each other, but for what a well on a connector of either lets into that part's declared shape? (a warning)
assembly.wheels_clear_other_partsDoes every other part's declared shape, its links' with it where their servos hold them, keep out of the space each wheel turns through, over its steering lock, and out of each track's unit, but for what a well on the part's connector lets into its declared shape?

A Tracked base is judged by the same rules, its tracks where a wheeled base has wheels: each drive mount carries a driven track, the hub of each turns about a level axis, and both ends of each belt's run on the ground lie in the plane the others touch.

A Legged chassis is judged by its feet where a wheeled base has wheels, the feet of its own legs or of the Leg parts placed on it. Each foot stands where its servos hold its leg, on the points of its shape lowest down: a sphere's lowest point, a capsule's lower end or both ends of one lying flat, a box's lowest corners, each point within 2 mm of the foot's lowest counting with it. Every foot must stand on the ground the others stand on, and a wheel or a caster under the chassis on it too. No other shape of its links may reach below that ground: the robot would stand on it, and a foot named by the wrong shape, a link's shapes being counted from 0, is found so. The finding names the foot or the shape, and points at it in the part and at the servos that hold it. A leg placed on a chassis that rolls, on one with legs of its own, or on a mount that steers, even through a part on that mount, is refused, as is a body with no legs of its own that carries none.

A part whose declared collision box reaches into the space a wheel turns through, or into a track's unit, is refused: the finding names both parts and says how deep and which way to move the one in the way. A steered wheel is judged over its whole lock: a stretch of it is proved from its middle, where the wheel grown by as far as any point of it moves over half the stretch holds the wheel at every angle of the stretch, so a grown wheel that is clear, or in the box only within a well, proves it; what cannot be proved is halved, and what the analysis cannot settle, within its budget or at its finest stretch, leaves the rule undecided, never passed. No pair of parts is let off for being mated: a kit's chassis box covers the arches its wheels turn in, and a motor's box the hub its wheel sits against, and such a void is declared where it is, as a well on the connector (Your own part); the rule lets in exactly what the well holds. A part with links of its own (Your own part) is judged by each of its shapes, its declared one and its links' where their servos hold them: the finding names the shape that reaches in, and a well lets things only into the part's declared shape, never into a link's. A part may come within 2 mm, since boxes are bounds. A part without a box of its own leaves the rule undecided for that part, and the rule says so beside any part found in the way: its links' shapes are judged all the same, and one found in the way fails the rule.

The parts fixed to the base are also judged against each other, as a warning: two whose declared shapes overlap deeper than 2 mm, and not within a well on a connector of either, are named with the depth and the way out of the earlier one. A warning rather than a refusal, while most parts carry boxes, which are bounds that overlap where the parts fit (a Romi's driver board and its motor by 20 mm). A part that sits in a pocket of its host declares the pocket as a well on its connector; a tapered part declares a hull, which is judged as it stands. A part with links is judged by each of its shapes, as against the wheels, and the finding names the two that meet. A part without a shape of its own leaves the rule undecided for that part, and the rule says so beside any two shapes found to overlap.

Statics ​

statics.mass_inside_the_wheel_contacts asks whether the robot stands. The centre of mass must fall strictly inside the polygon of the ground contacts: the wheels, the tracks' runs, a legged robot's feet, and the skids and balls the parts declare under contacts that reach the wheels' plane.

  • Outside the polygon, or on its edge, is a fail: at rest the robot tips until something else touches the ground.
  • A declared skid or ball that reaches below the wheels' plane is a fail too: the robot stands on it and tips off its wheels.
  • A declared skid or ball a little above the wheels' plane counts once the base has tipped onto it: with its wheels on one line, the base tips about them towards its centre of mass until that contact touches, and the rule reports the tilt (LEGO's EV3 Driving Base rests 1.7 degrees back on its steel ball, 3 mm above its wheels' plane). A raised contact on the side the base tips away from touches nothing.
  • Two wheels and nothing else lie on one line and settle nothing, so the answer is unknown. The chassis may have a skid its part file does not declare, and the warning asks for it, or for a caster.
  • A wheel, an end of a track's run or a foot off the plane the others share makes the answer unknown, for every base: which of them bear the robot is not known, and assembly.wheels_touch_one_plane or assembly.feet_touch_the_ground fails it. It is judged before a declared contact below the plane.

Kinematics ​

RuleAsks
kinematics.omni_wheels_span_the_planeCan an omni base's wheels together produce every planar motion?
kinematics.spin_supportedIf the task spins in place, can the base, and a walking base the way its gait turns?
kinematics.strafe_supportedIf the task strafes, is the base holonomic, and does a walking base's gait move aside to that side, as fast as the task states?
kinematics.walk_supportedIf the task advances, backs up or navigates a walking base, does its gait walk that way, as fast as the task states, and turn either way to navigate?
kinematics.gait_walks_the_feetIf the chassis walks by a gait, does the robot stand on an even number of feet, four or more, each stepping by at least two servos of its own?
kinematics.tracks_state_their_travelDoes every track's part state how far its belt travels per turn of its hub?

Sensing ​

sensing.range_clears_the_ground asks whether the cone of every Range sensor stays above the ground within its range. Light comes back from the floor, so a sensor whose cone meets it reads the floor as an obstacle there. It is advisory: a fail is a warning, since a sensor may look down on purpose. The warning says how far ahead the cone meets the floor, how far to tilt the sensor up, and how high it would have to sit instead.

Power and command ​

These rules read what the parts state and the power and command references of the program. A motor's supply is traced from the driver that commands it to the battery that feeds the driver.

RuleAsks
power.supply_voltage_acceptedIs the voltage every motor and motor driver is fed, full and run down, within the range its part states it accepts?
power.rated_voltage_in_supplyDoes that voltage include the one the motor's ratings hold at? Advisory
power.driver_delivers_stall_currentCan one channel of the driver deliver the current its motor draws stalled? Advisory
command.driver_commands_its_motorsDoes every motor's driver have a channel for it, or speak its bus?
command.driver_has_a_channel_for_each_motorDoes a driver have a channel of its own for each motor it drives? Advisory
  • power.supply_voltage_accepted judges only a stated range. A driver with motor channels always states one. A motor's maker mostly states its ratings at one voltage and no range, and such a motor is judged by the next rule alone. A battery whose part states only its nominal voltage leaves the rule unknown, with a warning that asks for the range from the maker's datasheet: a lithium pack sold as 11.1 V is 12.6 V full, and nothing is inferred from the nominal.
  • power.rated_voltage_in_supply warns when the supply never reaches the motor's rated voltage, or is always above it. The targets bound the wheel joint by the motor's ratings as its part states them, so on a supply below the rated voltage the real wheel is slower and weaker than the simulated one. Makers run motors above their rated voltage on purpose, so it is a warning.
  • power.driver_delivers_stall_current warns when a motor draws more current stalled than one channel delivers. A motor draws that current each time it starts. The channel is judged by its peak current when its part states one and by its continuous current otherwise. A driver that limits its current may be chosen for that, so it is a warning.
  • command.driver_commands_its_motors fails when a motor without a driver of its own is commanded by a board that has no motor channel, when a motor with a bus is commanded by a board that does not speak it, and when a motor without a bus names a power other than the driver that commands it.
  • command.driver_has_a_channel_for_each_motor warns when a driver drives more motors than it has channels. Motors that share a channel turn together and add their currents. A four-wheel kit that wires each side's two motors to one channel means it; a mecanum base cannot.

A motor that names no command and no power, or a driver that names no power, leaves the rules that would judge it unknown without a warning: the program has not said what drives or feeds it. So does a driver that regulates what it feeds its motors and names no power, for its motors: the voltage it gives them is known, and a motor that does not accept it is refused all the same, but nothing is said to feed the driver.

What a clean check does not establish ​

A clean check means every name exists, every argument is well typed, every reference resolves, every part mates onto a real connector, and the rules pass on what the libraries state. It does not establish that the robot spawns, drives, or completes the task. That is observed when the output runs, and judged from the simulator's own record.

Validation rules in the reference is generated from the rules themselves.