Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1161

HATs and other add-ons • Re: Build HAT-enabled SLAM robot?

$
0
0
I have done something that achieves similar goals but in a different way.

You can find the main repo for my project at https://github.com/gregorianrants/composed-robot

Some things you should know:
  • There are problems with the official build hat python library and it is not really up to the task of controlling the motors on a differential drive robot. See viewtopic.php?p=2128743#p2128743 there are other posts about the problems on this forum and the offical GitHub repo. I have written a library which provides an alternative way of controlling the motors.
edit: just noticed another thread you are involved (viewtopic.php?p=2276386&hilit=build+hat ... s#p2276386) in that discusses this issue and goes into depth beyond my knowledge, so maybe you know of a way to do this, i will leave my answer in case anything else is of intertest to you.

How I went about it
I run speed control pid algorithms for the motors in python on the raspberry pi and send command to the firmware on the buildhat over serial
Rather than using ros I wrote a custom pub sub library using zeromq.
I prefer ultrasonic distance sensors to lidar they are cheap and detect obstacles at all heights rather than just on a plane
I use computer vision along with odometry for localisation.

This allows the robot to drive about, not crash into things and know where it is.
Beyond that It can also find the real world co-ordinates of a piece of lego then collect that piece of lego, the last thing I have to implement is returning the piece of lego to designated coordinates
Once I have done this last part. I will write extensive documentation about how it all works, that should help anyone that wanted to replicate the project.

Statistics: Posted by gregorianranter — Sun Mar 30, 2025 9:16 pm



Viewing all articles
Browse latest Browse all 1161

Trending Articles