Let's Make Robots!

Write a algorithm for Chris and be Loved...

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.

 

Walter_1_3_Joystick_001.jpg

AttachmentSize
Walter_1.3_Joystick_001.jpg2.68 MB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
I have the same problem when coding the nunchuck controller and the most clever solution I find was the if/else coding mess.... I have came up with this remote controller as OddBot already metioned and it feeds my needs :)

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

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.

(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.

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

 

No prob, hope it gets Walter going well. I hope to use this idea on an outdoor wanderer, to take over control when needed. Probably use an XBee link, with some of the little joysticks. I have some like you've shown, except no knob on the end so may have to Shapeloc something.

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?

I know robots don't seem to stay on the front page for very long, but have you seen GreenRoomBaa? What you describe is precisely what she does.

Did you figure it out, or do you still need that algorithm? It's 11.30pm, I'm going for Zzzz, but can probably chat tomorrow.

I would like to thank you all, as it is awesome to have a (few) new sets of eyes on a problem... First off rik, I should have mentioned I am moving away from the VEX controller as I would like to build my own. I know the VEX system has the arcade/tank style controls built in, but the controler I am working on will only be one stick. By the way, have you guys seen these?    It is almost the same joystick as the one in a PS2 controller, pots and all for 4 bucks from Sparkfun. At first glance, I am liking Robo's math with some min's and max's added but I thank everyone for their help. When I get this guy going I will be sure to do a neat walkthrough for y'all. Thanks again, folks.

They're exactly the same as the ones I used in Pictomatix's remote control.

Joysticks__small_.jpg

In fact I did a mini walkthrough on making your ownIR remote using these within Pictomatix's posting.

It may have some information to help you. Beware though that if your making an IR remote you will have some limitations such as it won't work in bright daylight and the transmission rate is fairly slow making it not very responsive in realtime.

Check out Guibot's custom remote with an X-bee.

How dissatifying 8-( .

You promised us a problem to crack! I bet your just checking your firmware version right now...