Go to Post I think a lifetime of learning properly and then teaching others and inspiring the youth is more important to myself at least than being on the news for a couple seconds during a voice over. - Elgin Clock [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 04-10-2013, 17:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,028
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
calculating position using follower wheels


A certain robot with a 3 degree-of-freedom drivetrain (FWD, STR, RCW) is on a flat level floor. At time T=0, its center of geometry (CoG) is located at the origin of an XY coordinate system fixed with respect to the floor; it is facing 15 degrees clockwise from the +Y axis; and it has the the following robot-centric constant motions:
forward = 5 ft/s
strafe_right = 4 ft/sec
rotate_CW = 120 degrees/sec
Question 1: What are the coordinates 3 seconds later, and what direction is the robot facing?

Students, Mentors, engineers, and professors welcome.


Last edited by Ether : 04-10-2013 at 17:44.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-10-2013, 18:07
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: calculating position using follower wheels

It is at the origin, facing 15 degrees clockwise from the +Y axis.

EDIT: 120 deg/sec * 3 sec = 360 degrees -- it just goes in a circle.

Last edited by flameout : 04-10-2013 at 18:07. Reason: Added a tiny bit of math
Reply With Quote
  #3   Spotlight this post!  
Unread 04-10-2013, 18:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,028
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 flameout View Post
It is at the origin, facing 15 degrees clockwise from the +Y axis.

EDIT: 120 deg/sec * 3 sec = 360 degrees -- it just goes in a circle.
Nice work. That was quick.

Question 2: What's the radius of the circle?



Reply With Quote
  #4   Spotlight this post!  
Unread 04-10-2013, 18:14
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: calculating position using follower wheels

Spoiler for solution:
Speed = sqrt(4^2+5^2), which approximately equals 6.4 ft/s

6.4 ft/s * 3 sec = 19.2 feet (circumference of the circle).

Thus the radius is 19.2 feet / (2*pi), or approximately 3.06 feet


EDIT: Perfectly matched text color w/ background color.
EDIT2: Oops, it's 5 ft/s forward and 4 ft/s strafing, not 4 ft/s and 3 ft/s
EDIT3: Changed colored text to a spoiler -- thank you EricH

Last edited by flameout : 04-10-2013 at 21:53. Reason: color -> spoiler
Reply With Quote
  #5   Spotlight this post!  
Unread 04-10-2013, 18:41
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,028
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 flameout View Post
Text made the same color as the background so as not to give it away for others -- highlight to read.
Good job. I see this is too easy.

This one is quite a bit more difficult:

Question 3: Exactly the same as Question 1, except the FWD speed is a function of time, as follows: FWD = 5.0 + 1.0*T. In other words, FWD starts with the value 5.0 at T=0, and increases smoothly and linearly at a rate of 1 ft/sec/sec. The STR and RCW remain constant at 4 ft/sec and 120 deg/sec respectively.



Reply With Quote
  #6   Spotlight this post!  
Unread 04-10-2013, 21:33
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 Solution:

(1.3836,-0.3707); 15 degrees clockwise

Can this be done without integrals?
__________________
--Jacob
Illinois FTC FTA

Last edited by maths222 : 04-10-2013 at 21:47. Reason: Add spoiler tag
Reply With Quote
  #7   Spotlight this post!  
Unread 04-10-2013, 21:41
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,726
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: calculating position using follower wheels

Not answering the math questions... just this one.
Quote:
Originally Posted by flameout View Post
Text made the same color as the background so as not to give it away for others -- highlight to read. (Is there a way to spoiler tag text here?)
A spoiler tag looks like [ spoiler=yourspoilernamehere] what the spoiler is[/spoiler] (without the space in the first bracket) and ends up looking like:

Spoiler for This is a spoiler:
I warned you this was a spoiler.


And now back to the math...
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

Reply With Quote
  #8   Spotlight this post!  
Unread 04-10-2013, 22:14
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: 689
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
Question 3:
Spoiler for Question 3:
T=0: (0,0) pi/12 (from +Y axis)

FWD = (5.0 + 1.0*T) ft/s
STR = 4 ft/sec
RCW = 120 degrees/sec

T=3:
x = Integrate[(5 + t)*Sin[(2*Pi/3)*t + Pi/12] + 4*Cos[(2*Pi/3)*t + Pi/12], t, 0, 3]
= -1.3836

y = Integrate[(5 + t)*Cos[(2*Pi/3)*t + Pi/12] - 4*Sin[(2*Pi/3)*t + Pi/12], t, 0, 3]
= 0.3707

angle = (2*Pi/3)*3 + Pi/12 = Pi/12 = 15 degrees


Quote:
Originally Posted by maths222 View Post
...
maths222, what coordinate orientation did you use? If X x Y is out of the page (like axes are usually drawn), I think you got your angle sign wrong (the strafe movement cancels out. rotation is clockwise, so the robot's forward movement is toward +X for most of the first half of the movement, and -X for the second half. since the robot moves faster during the second half, a negative result makes sense)
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #9   Spotlight this post!  
Unread 04-10-2013, 22:17
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: calculating position using follower wheels

Quote:
Originally Posted by RyanCahoon View Post
maths222, what coordinate orientation did you use? If X x Y is out of the page (like axes are usually drawn), I think you got your angle sign wrong (the strafe movement cancels out. rotation is clockwise, so the robot's forward movement is toward +X for most of the first half of the movement, and -X for the second half. since the robot moves faster during the second half, a negative result makes sense)
I think he's just reporting the angular orientation of the robot. Since the angular rate does not depend on the location (in the XY plane), it is still facing 15 degrees clockwise from the Y axis.
Reply With Quote
  #10   Spotlight this post!  
Unread 04-10-2013, 22:31
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 did have it rotate counter-clockwise (oops). Corrected answer is the same, with both coordinates their opposites.
__________________
--Jacob
Illinois FTC FTA
Reply With Quote
  #11   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,028
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
  #12   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
  #13   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,028
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
  #14   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
  #15   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,028
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
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 12:08.

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