# `mix bb.from_urdf`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/mix/tasks/bb.from_urdf.ex#L6)

Generate a BB robot module from a URDF file

Reads a URDF XML file and writes a `defmodule` that uses `BB` with an
equivalent topology to your project.

If the target module already exists, only its `topology do ... end` block
is replaced — `settings`, sensors, controllers, commands and any other
hand-written content are left in place. If the existing module has no
`topology` block, one is appended.

## Example

```bash
mix bb.from_urdf path/to/robot.urdf --module MyApp.Robot
```

## Options

  * `--module`, `-m` - The module name for the generated robot.
    Defaults to `{AppPrefix}.Robot`.

## URDF feature support

`<mimic>` joints are emitted as a `BB.Sensor.Mimic` attached to the
mimicking joint — BB's sensor implements the same
`position * multiplier + offset` semantics as URDF.

These URDF features have no direct BB equivalent and are skipped with a
warning rather than failing the import:

  * `<safety_controller>` blocks
  * `<transmission>` blocks
  * `<gazebo>` extensions

Mesh files are referenced as-is — `package://` URIs from ROS are not
rewritten, so you may need to copy meshes into the project and adjust
paths by hand.

---

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