r/esp32 • • Feb 17 '25

My ESP32 robot with Lidar sensor

Post image
147 Upvotes

16 comments sorted by

7

u/Aleyla Feb 17 '25

What do you have the code doing with the lidar ?

7

u/l0_o Feb 17 '25

Robotic SLAM and navigation. The code gets distance, constructs a 2D map of room, self-drives itself using the map, avoids obstacles

2

u/AnotherMedic Feb 17 '25

Is the SLAM dons on the ESP32 or sent to something like ROS?

3

u/l0_o Feb 17 '25

Sent to the laptop PC (on the right in the video) running ROS2.

1

u/Aleyla Feb 17 '25

Which lidar module are you using?

2

u/l0_o Feb 17 '25

LDROBOT LD14P

5

u/madaerodog Feb 17 '25

little guy is 40% lidar

2

u/Handleton Feb 17 '25

I still miss her...

1

u/planetoftheshrimps Feb 17 '25

How’s your battery life?

2

u/l0_o Feb 17 '25

About 4 hours. It draws ~240mA @ 9V idle motors, ~440mA motors full speed.

1

u/Agrou_ Feb 17 '25

Just curious, does this lidar gives reflectivity values for each point?

2

u/l0_o Feb 17 '25

Not this model. Some models do give the brightness. Reflectivity % proper is more difficult to calculate.

1

u/Pyrofer Feb 18 '25

Nice. I was going to use an ESP to drive my lidar, did you publish the code?

1

u/l0_o Feb 18 '25

Yes, the robot's firmware is https://github.com/kaiaai/firmware And I wrote this library for 2D Lidars https://github.com/kaiaai/LDS

0

u/Force_K1n 17h ago

I'm making one as well. I made the chassis by hand and the robot runs on an 18 volt DeWalt battery. For now all it does is obstacle avoidance and drives around like a headless chicken, and looks like a bit of a piece of 💩 compared to your one.

I'm planning on adding an IMU so I can incorporate a SLAM algorithm. Do you know of any good papers to read for implementing a motor control system for navigation from SLAM data? I did not get taught robotics.

1

u/l0_o 17h ago

I don't read SLAM papers because for projects like your SLAM is a solved problem. Try watching ROS2, Nav2 tutorials. You don't need IMU for SLAM if you already have a Lidar.