Close

When your own code annoys you

A project log for Twerk Lidar Robot

An insect-quad style robot with an IMU plus ToF lidar sensor for mapping and navigation.

jacob-david-c-cunninghamJacob David C Cunningham 10/24/2022 at 01:100 Comments

This weekend I worked on the ToF scanning and IMU sampling. Overall have not really landed on anything concrete. I need to study up on basic physics. I also need to work out the beam sampling more, specifically for overhead stuff since if the servo wires get caught on anything it pulls the board off the IMU pins.

Anyway I'm getting closer to starting from scratch ha... not entirely because I'm still not at the point where I'm using real robotics code eg. inverse kinematics... all my stuff is manually coded regarding the gaits/servo positions. Which sucks when you gotta change it and the motions don't propagate.

I have a lot of random bits and pieces of existing code I can pull eg:

But what I have right now is just random crap thrown together... bad code.

I did improve the navigation code but I kind of just half-assed it, lost track of the different edge cases/logic for the cone scanning.

The goal was to build this thing, have it safely navigate on its own and plot a rough map of where it's been. Did I accomplish that? Kind of... I'm lacking on the IMU side (true values).

That will be easier to do with the wheeled robot (Floating Navigation Sensor Assembly project) since it moves more smoothly than a legged robot.

These projects are a time sink. I don't know when it will be "done".

There is something new I did, I designed and printed a basic battery clip, since the battery does fall out eventually from all the twerking the robot does.

I'll focus on getting this into a "done" state with the hard-coded version. It's a good physical platform for writing better code.

IMU video

ToF scanning video

Discussions