Go to Post FIRST robots definitely meet many commonly agreed upon definitions of robots. Some will disagree. Good for them. In my opinion, it's not worth arguing over. - Mikell Taylor [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-10-2013, 09:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,004
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: calculating position using follower wheels


Great work, Jacob and Ryan. Reps to you both.

Ryan: what CAS did you use for that? The syntax you used was rejected by Maxima, Octave, and SciLab. (I got it to work in Maxima by changing the syntax a bit)

Jacob: You got the right answer, but didn't show your work. How did you solve it?


This has a potential practical application for FRC. If you put 3 omni follower wheels -- in the the correct configuration -- on a robot, you can get FWD, STR, and RCW information from them. Then you can use something like the attached C code to get the position and orientation of the robot.



Attached Thumbnails
Click image for larger version

Name:	3 omni follower wheels.png
Views:	28
Size:	2.3 KB
ID:	15266  
Attached Files
File Type: txt 3 omni followers C code.txt (974 Bytes, 46 views)

Last edited by Ether : 05-10-2013 at 14:22.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-10-2013, 10:01
maths222 maths222 is offline
FTC FTA
AKA: Jacob Burroughs
no team
 
Join Date: Nov 2011
Rookie Year: 2010
Location: United States
Posts: 148
maths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to behold
Re: calculating position using follower wheels

I used Microsoft mathematics, which only allows radians in calculus functions:
X:
integral((5+1t)cos((90-15)(pi/180)-120pi/180t)+3sin((90-15)(pi/180)-120pi/180t), t, 0, 3)
Y:
integral((5+1t)sin((90-15)(pi/180)-120pi/180t)+3cos((90-15)(pi/180)-120pi/180t), t, 0, 3)
__________________
--Jacob
Illinois FTC FTA
Reply With Quote
  #3   Spotlight this post!  
Unread 05-10-2013, 11:08
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,004
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: calculating position using follower wheels


Question 4:

In the code block highlighted in blue at the bottom of post 11 the following code appears for calculating position and heading:

Code:

Q+=dR/2.0;
X+=dF*sin(Q)+dS*cos(Q);
Y+=dF*cos(Q)-dS*sin(Q);
Q+=dR/2.0;
Give the mathematical justification for updating the heading "Q" twice in half-steps, instead of doing it like this:

Code:

Q+=dR;
X+=dF*sin(Q)+dS*cos(Q);
Y+=dF*cos(Q)-dS*sin(Q);

Reply With Quote
  #4   Spotlight this post!  
Unread 05-10-2013, 12:06
maths222 maths222 is offline
FTC FTA
AKA: Jacob Burroughs
no team
 
Join Date: Nov 2011
Rookie Year: 2010
Location: United States
Posts: 148
maths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to behold
Re: calculating position using follower wheels

Spoiler for Justification:

For a given time interval, the robot turns from Q_i to Q_f. The average velocity over that time period is not in the direction of Q_i or Q_f, but somewhere in between; within the sample rate of the idler wheels, the most accurate angle is halfway in between. Therefore, half of dQ is added before, then the sin and cos of Q are used to calculate the new X and Y positions, and then the other half is added.


It is not the best proof, but it explains the general reasoning.
__________________
--Jacob
Illinois FTC FTA
Reply With Quote
  #5   Spotlight this post!  
Unread 05-10-2013, 12:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,004
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: calculating position using follower wheels

Quote:
Originally Posted by maths222 View Post
Spoiler for Justification:

For a given time interval, the robot turns from Q_i to Q_f. The average velocity over that time period is not in the direction of Q_i or Q_f, but somewhere in between; within the sample rate of the idler wheels, the most accurate angle is halfway in between. Therefore, half of dQ is added before, then the sin and cos of Q are used to calculate the new X and Y positions, and then the other half is added.


It is not the best proof, but it explains the general reasoning.
Excellent. A very intuitive explanation.

See attachment for additional explanation using geometry and a bit of calculus.


Attached Files
File Type: pdf arc & chord.pdf (15.8 KB, 39 views)
Reply With Quote
  #6   Spotlight this post!  
Unread 06-10-2013, 21:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,004
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: calculating position using follower wheels


Just for fun.


Attached Thumbnails
Click image for larger version

Name:	XYplot1.png
Views:	41
Size:	41.8 KB
ID:	15276  Click image for larger version

Name:	XYplot2.png
Views:	27
Size:	39.1 KB
ID:	15277  Click image for larger version

Name:	XYplot2e.png
Views:	21
Size:	56.6 KB
ID:	15278  Click image for larger version

Name:	XYplot2err.png
Views:	23
Size:	14.7 KB
ID:	15279  Click image for larger version

Name:	path distance vs time.png
Views:	22
Size:	8.8 KB
ID:	15280  


Last edited by Ether : 07-10-2013 at 17:20. Reason: added plot with sensor error
Reply With Quote
  #7   Spotlight this post!  
Unread 06-10-2013, 02:20
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 688
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: calculating position using follower wheels

Quote:
Originally Posted by Ether View Post
Ryan: what CAS did you use for that? The syntax you used was rejected by Maxima, Octave, and SciLab.
It's Mathematica's syntax, which is also accepted by Wolfram Alpha, making it useful for quick one-line integral problems.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
Reply


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 23:02.

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