Go to Post I am surprised at the relative conservative capability you described on our 2006 machine. As for the 2007 machine, in anticipation of an aquatic game, we have completed a robot that "walks on water" and are well along with one that can "part the sea". - Bill Beatty [more]
Home
Go Back   Chief Delphi > Other > Math and Science
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 26-10-2013, 12:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Geometry & Trig Quiz

Quote:
Originally Posted by Aaron.Graeve View Post
I disregarded the width and length of the wheelbase because the initial and final coordinates were already based on the center of geometry, meaning I could treat this as an omnidirectional unicycle bot
Good move. I put that in there as a distraction.

Actually, since the bot as described does not rotate, any point on the bot could have been used (as long as it was the same point for both the initial and final coords).


Quote:
Phi = arctan((x1-x0)/(y1-y0))
Phi = Alpha + Sigma
Alpha + Sigma = arctan((x1-x0)/(y1-y0))
Sigma = arctan((x1-x0)/(y1-y0)) - Alpha


This is my solution for the posted problem; I trust it has errors, but I am not certain where they are, so any critiques or suggestions are welcome.
Nice work. Reps to you. You're 95% there...

The formula you gave gives the "correct" angle if y1>y0, but gives the "reverse" angle (180 degrees off) if y1<y0. If y1=y0, it crashes.

For example:

1) if x0=0, y0=0, x1=10, y1=-1, and alpha=90 degrees, the formula gives sigma= -174.3 degrees instead of +5.7 degrees.

2) if x0=0, y0=0, x1=10, y1=0, and alpha=60 degrees, the formula crashes instead of sigma=30 degrees.

There's a simple way fix the formula that does not involve any conditional logic in your code.


Quote:
Additionally, the wheels must be turned Sigma - Beta from their initial configuration
Let's call that angle "delta". Is there a simple formula (not involving conditional logic) that will compute the shortest value for delta? (For example if delta is 270 degrees the formula should give -90 degrees).


Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi