Design, Build, Test, Iterate

Posts Tagged ‘programming’

Robotic sensing, moving, and localization using probability fields

If you were somehow dropped to a random location in your hometown, you would most likely be able to orient yourself based on landmarks and other sensory inputs of your surroundings. Even if you were dropped into an unfamiliar neighborhood, you could probably read street signs and guess at your location with a certain probability […]

ESC configuration for multirotors — enable hard acceleration!

The factory defaults for the Mystery 40A ESCs I use on my tricopter are fine for RC planes but are not so good for multirotors because of their “soft acceleration,” which means the ESCs deliberately spin up the motors over the course of a half second or two. This is so that if I am […]

Using accelerometer data to correct for gyro drift

Gyroscopes do not measure acceleration, so they obviously cannot be used to calculate the direction of gravity. In other words, we can use gyro outputs to calculate an estimation of the direction cosine matrix, but the estimate will drift over time. A 3-axis accelerometer can be used to correct the roll and pitch drift, which […]

Orientation Kinematics with Direction Cosine Matrices

In a sentence, a direction cosine matrix is a 3×3 matrix containing the cosines between each of the 9 possible pairs of axes of two separate Cartesian coordinate systems. In the context of inertial measurement units in robotics applications, a 3D vector could be represented in either the global (earth) or the body (local) frames […]

Tricopter: Progress?

The code involves a lot of math that I don’t understand! They never taught rotation matrices in high school. This post is just to share that I haven’t fallen asleep or anything. Okay, more honestly, I’ve just started coding again after a month of chemistry. It was still fun! Check out my (slow) progress on […]

Tricopter: Wireless Communication With XBees

The short story: Lowered baudrate to 19200, and wireless communication works! The problems that take me the most time to solve have the dumbest, simplest solutions. Bah. A fascinating video of the tricopter turning on. Almost worthless since it’s not flying, but it’s the first video of the tricopter in a decently working state. I […]

Tricopter: Accident Update

The shafts are a bit scratched up. I found that the prop savers had come a little loose, perhaps as a result of vibrations. I will need to apply loctite or at least check them before each flight. The tail rotor must have cut into the tail ESC and the ESC leads as it ripped […]

Raiderbot X Meeting 5, 38 Days to Robot Ship

Meeting time: 10:00 to 18:00 Hours logged: 36.74 Programming The idea this year is to overload the bots with sensors of all kinds. Current sensors on every wheel, arm joint, and main circuit breaker to graph power consumption. Proximity sensors to avoid collision with other bots and facilitate scoring (automate entire process!). Encoders, gyro, and […]

Global constructor bug in GCC 4.5.1

I’ve recently returned to programming my Seeeduino Mega (ATmega1280) for my tricopter. Yesterday I discovered that every time I included serial code in the sketch, the sketch seemed to freeze as if it was not running the loop(). After several hours, I identified the source of the bug to be in the gcc-avr compiler that […]

Haskell

Again from If programming languages were cars…: Haskell is an incredibly elegantly-designed and beautiful car, which is rumored to be able to drive over extremely strange terrain. The one time you tried to drive it, it didn’t actually drive along the road; instead, it made copies of itself and the road, with each successive copy […]