Navigation
Required setup: smabo-app + smabo-esp32 + smabo-brain-ros
Roadmap
Section titled “Roadmap”This page is the guide for the 'Navigation' node on the roadmap below.
This guide assumes you have completed the Encoder Mobile Robot and brain-ros guides.
Overview
Section titled “Overview”This page explains how to implement the "Navigation" feature.
Specifically, you will:
- Run SLAM
- Run navigation
Required Parts
Section titled “Required Parts”In addition to the parts from Encoder Mobile Robot, you need the following.
| Part | Example (Japanese shop) | Notes |
|---|---|---|
| LiDAR (LDROBOT LD19) | - | - |
| Breadboard-to-JST ZHR cable (4-pin, 1.5 mm pitch, single connector) | link | Connects the LD19 to the ESP32 (not needed if it comes with your LD19) |
3D Printing Parts
Section titled “3D Printing Parts”Print the newly added parts on your 3D printer.
Because slicer software varies by printer model, only key points are noted here rather than step-by-step slicer instructions.
Print the following parts oriented as shown in the images.
- smabo-hardware/stl/lidar/ld19/ld19_base.stl

- smabo-hardware/stl/lidar/ld19/ld19_stopper1.stl

- smabo-hardware/stl/lidar/ld19/ld19_stopper2.stl

Assembly
Section titled “Assembly”Assemble the required parts as shown in the video below.
Note: the video also includes parts printed in previous steps.
Wiring
Section titled “Wiring”Wire according to the tables below.
In the tables below, "Point A" and "Point B" are directly connected in the circuit.
Battery
Section titled “Battery”| Point A | Point B | Notes |
|---|---|---|
| Battery box (+) | Breadboard + rail (right side) | From here on, the right side is the 6 V rail |
| Battery box (-) | Breadboard - rail | - |
| Point A | Point B | Notes |
|---|---|---|
| ESP32 3.3V | Breadboard + rail (left side) | From here on, the left side is the 3.3 V rail |
| ESP32 GND | Breadboard - rail | - |
TB6612FNG
Section titled “TB6612FNG”| Point A | Point B | Notes |
|---|---|---|
| TB6612FNG PWMA | ESP32 pin set in config.json dc/pins/pwma |
Default pins: - config.esp32-classic.json: GPIO 32 - config.esp32s3-devkitc1.json: GPIO 4 |
| TB6612FNG AIN2 | ESP32 pin set in config.json dc/pins/ain2 |
Default pins: - config.esp32-classic.json: GPIO 33 - config.esp32s3-devkitc1.json: GPIO 5 |
| TB6612FNG AIN1 | ESP32 pin set in config.json dc/pins/ain1 |
Default pins: - config.esp32-classic.json: GPIO 25 - config.esp32s3-devkitc1.json: GPIO 6 |
| TB6612FNG STBY | ESP32 pin set in config.json dc/pins/stby |
Default pins: - config.esp32-classic.json: GPIO 26 - config.esp32s3-devkitc1.json: GPIO 7 |
| TB6612FNG BIN1 | ESP32 pin set in config.json dc/pins/bin1 |
Default pins: - config.esp32-classic.json: GPIO 27 - config.esp32s3-devkitc1.json: GPIO 15 |
| TB6612FNG BIN2 | ESP32 pin set in config.json dc/pins/bin2 |
Default pins: - config.esp32-classic.json: GPIO 14 - config.esp32s3-devkitc1.json: GPIO 16 |
| TB6612FNG PWMB | ESP32 pin set in config.json dc/pins/pwmb |
Default pins: - config.esp32-classic.json: GPIO 12 - config.esp32s3-devkitc1.json: GPIO 17 |
| TB6612FNG VM | Breadboard + rail (right side) | Motor power (6 V) |
| TB6612FNG VCC | Breadboard + rail (left side) | Logic power (3.3 V) |
| TB6612FNG GND | Breadboard - rail | The TB6612FNG has three GND pins; connect all of them to the breadboard's - rail |
DG01D-E
Section titled “DG01D-E”| Point A | Point B | Notes |
|---|---|---|
| DG01D-E (left wheel) G | Breadboard - rail | - |
| DG01D-E (left wheel) H1 | ESP32 pin set in config.json encoder/left/b |
Default pins: - config.esp32-classic.json: GPIO 21 - config.esp32s3-devkitc1.json: GPIO 42 |
| DG01D-E (left wheel) H2 | ESP32 pin set in config.json encoder/left/a |
Default pins: - config.esp32-classic.json: GPIO 19 - config.esp32s3-devkitc1.json: GPIO 41 |
| DG01D-E (left wheel) V | Breadboard + rail (left side) | Encoder power (3.3 V); H1 and H2 also use this voltage |
| DG01D-E (left wheel) M+ | TB6612FNG A02 | - |
| DG01D-E (left wheel) M- | TB6612FNG A01 | - |
| DG01D-E (right wheel) G | Breadboard - rail | - |
| DG01D-E (right wheel) H1 | ESP32 pin set in config.json encoder/right/a |
Default pins: - config.esp32-classic.json: GPIO 22 - config.esp32s3-devkitc1.json: GPIO 2 |
| DG01D-E (right wheel) H2 | ESP32 pin set in config.json encoder/right/b |
Default pins: - config.esp32-classic.json: GPIO 23 - config.esp32s3-devkitc1.json: GPIO 1 |
| DG01D-E (right wheel) V | Breadboard + rail (left side) | Encoder power (3.3 V); H1 and H2 also use this voltage |
| DG01D-E (right wheel) M+ | TB6612FNG B02 | - |
| DG01D-E (right wheel) M- | TB6612FNG B01 | - |
| Point A | Point B | Notes |
|---|---|---|
| LD19 Tx | ESP32 pin set in config.json lidar/rx |
Default pins: - config.esp32-classic.json: GPIO 4 - config.esp32s3-devkitc1.json: GPIO 18 |
| LD19 PWM | Breadboard - rail | Rotation speed control input. Speed is not controlled externally, so tie it to GND to spin at the built-in speed control (10 Hz) |
| LD19 P5V | ESP32 5V | LiDAR power (5 V). It does not run on 3.3 V, so connect it directly to the ESP32's 5V pin, not to the left side of the + rail |
| LD19 GND | Breadboard - rail | - |
The wiring diagram for the ESP32-DevKitC (with the defaults in config.esp32-classic.json) is shown below.

Finished Result
Section titled “Finished Result”The completed robot looks like this.

Operation
Section titled “Operation”Check that everything works with the steps below.
Startup Procedure
Section titled “Startup Procedure”Follow the startup procedure here.
Then, in the 'Config' tab of smabo-web, enable:
- 'dc_drive' and 'encoder' inside it
- 'lidar'
Building a Map
Section titled “Building a Map”This section explains how to run SLAM.
In the 'Navigation/SLAM' tab of smabo-web, click 'Start SLAM'.

In the 'Drive' tab, drive smabo with the controller to build the map.
- If you place the 'Drive' tab and the 'Navigation' tab side by side, you can check how the map is coming along while you drive smabo.

When the map is finished, enter any map name and click 'Save'.

Navigation
Section titled “Navigation”In the 'Navigation/Navigation' tab of smabo-web, select the map you just built and click 'Start Navigation'.

Click the 'Nav2 Goal' button in 'View'.

When you specify any position on the map, smabo starts driving toward it.
- Arrow position: the goal position
- Arrow direction: the direction smabo faces after reaching the goal
This page is one of the end points of the roadmap.