# `BB.Dsl.ValidateLimitUnitsTransformer`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/dsl/validate_limit_units_transformer.ex#L5)

Validates that the units provided in a joint's `limit` block are compatible
with the joint's type.

The DSL schema permits both angular and linear units in `limit` fields so
that the same entity definition serves rotational and translational joints.
This transformer rejects the wrong-axis combinations before the
`BB.Dsl.RobotTransformer` attempts unit conversion:

- Rotational joints (`:revolute`, `:continuous`) require angular units
  (`degree`, `degree_per_second`, `newton_meter`, `degree_per_square_second`).
- Linear joints (`:prismatic`) require linear units (`meter`,
  `meter_per_second`, `newton`, `meter_per_square_second`).

Joints without degrees of freedom (`:fixed`, `:floating`, `:planar`) are not
checked — they typically have no `limit` block at all.

# `after_compile?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
