# Write a algorithm for Chris and be Loved...

By Chris the Carpenter

February 26, 2009

February 26, 2009

Well folks,

I have been working on this problem for 4 days now and don't seem to be making any headway. There has got to be a math or programming geek out there that can figure this one out. The video should be self-expanitory, and the chart with the values is right here. In addition, I attached the pic as a file as well (full size) so you might be able to see the numbers a bit better. --Sorry no scanner.

Attachment | Size |
---|---|

Walter_1.3_Joystick_001.jpg | 2.68 MB |

## Yup, Robologist...

You nailed it dude...

Now, I do have to kick myself for the 4 days I racked my brain on this one... I can't believe how simple the final code is!

Thanks again

## Coded

Ah. you coded it already. Fairy nuff. My approach was only slightly different. My bot takes as its inputs (1) speed and (2) radius of turn. I was about to sit and figure out how to convert speed and radius of turn (the results from MY algorithm) into coaxial track PWMs!

Do I still get the Coveted Rusty Soldering Iron Trophy for doing it first?

## No prob, hope it gets Walter

## This diagram stinks

I recreated a diagram like it, using expected values. Correcting for SIN(joystick-angle). The Y/X numbers along the SE and SSE positions are reversed. And most numbers are off from the predicted values by as much as 30 (at ESE and NNW for example).

But from the resulting values I can deduce that your stick does not move around in a circle, but in a square. And a motor does not get full power unless the other motor is completely stopped.

But maybe that is just the way I expected them to be.

## Normal

(Little geometry joke for you there!)

2D pots are normally like that. The X limit is flat for the full Y extents and vice-versa. I agree - it's not intuitive. My first calculations overflowed for exactly the reasons you mention. Whatever I'd done, the bot went wherever I told it EXCEPT in a straight line.

## I have the same problem when

must try to understand the robologist solution, seems much more easier than I though

2