tag:blogger.com,1999:blog-21402852.post115972907595626647..comments2017-09-16T00:23:44.510+10:00Comments on The NXT STEP is EV3 - LEGO® MINDSTORMS® Blog: Reader Question Submission #2Asha Seshannoreply@blogger.comBlogger9125tag:blogger.com,1999:blog-21402852.post-62029087198036596552008-06-12T09:36:00.000+10:002008-06-12T09:36:00.000+10:00Please any body could share the source code to rot...Please any body could share the source code to rotate the wheels in such a way.<BR/>Thanks.Zeeshannoreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159887287328983432006-10-04T00:54:00.000+10:002006-10-04T00:54:00.000+10:00Franklin again,the fomula did not get across well,...Franklin again,<BR/><BR/>the fomula did not get across well,<BR/><BR/>here is another attempt:<BR/><BR/>N = S / d (when both wheels turn!)<BR/><BR/>N = (2 * S) / d (when only 1 wheel turns)<BR/><BR/>FranklinAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159887127618545252006-10-04T00:52:00.000+10:002006-10-04T00:52:00.000+10:00Some Math,1) Distance between the Wheels is S2) Di...Some Math,<BR/><BR/>1) Distance between the Wheels is S<BR/>2) Diameter of the wheels is d<BR/><BR/>3) Circumference of Base Circle is pi * S<BR/><BR/>4) Circumference of Wheel is pi * d<BR/><BR/>When we devide 3) by 4) we get: N<BR/><BR/>N is de number of Wheel Turns required for 1 complete 360 degrees Base Turn.<BR/><BR/> pi * S S<BR/>N = ------ = ---<BR/> pi * d d<BR/><BR/>note: pi = 3.1415 falls out of the equation.<BR/><BR/>The above is only true when both wheels turn at the same time!!!<BR/><BR/>When only 1 wheel turns and the other stays fixed the Circumference of the Base Circle then becomes 2 * pi * S<BR/><BR/>(S becomes the radiant of the circle and not the diameter!)<BR/><BR/><BR/> 2 * S<BR/>then N = -----<BR/> d<BR/><BR/><BR/>So , now one can easily calculate the number of wheel turns in any situation.<BR/><BR/>Regards from a Dutch Lego Fan,<BR/><BR/>FranklinAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159799415455226682006-10-03T00:30:00.000+10:002006-10-03T00:30:00.000+10:00First suggestion: you're right, try it. Actual res...First suggestion: you're right, try it. Actual results are always preferable to estimations and theory.<BR/><BR/>Second, you made the observation that a wheel odometry count of 192° corresponds to a heading change of 90° (in, I assume, a spin turn, with both wheels going in opposite directions - it will be different for, say, a pivot turn with one wheel fixed!). That *should* be due to just the geometry of the platform (the wheel radius, any gearing, and the wheelbase (distance between the wheels), so the speed with which you go into the turn shouldn't make a difference, *IF* there is no wheel slip. But in practice... try it and see.<BR/><BR/>-- <BR/>Brian DavisBrian Davishttps://www.blogger.com/profile/13348160352741782598noreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159796864954740942006-10-02T23:47:00.000+10:002006-10-02T23:47:00.000+10:00I was the one who submitted the question, so thank...I was the one who submitted the question, so thanks for the answers. Yeah, it's been awhile since I've taken geometry. :)<BR/><BR/>Without using formulas we found a value of 192 degrees (for the motors) turns the tribot pretty close to 90 degrees.<BR/><BR/>Now, does friction or momentum also enter into the question? I mean, say the bot is travelling forward at some at 30 speed, then you tell it to turn 45 degrees right. What if it were travelling forward at 75 or 90 speed...? <BR/><BR/>I guess I can always experiment, but having the reason behind something does help--just as having the answer to my original question. <BR/><BR/>Thanks!nxt.dadhttp://nxtdad.wordpress.com/noreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159781259679510072006-10-02T19:27:00.000+10:002006-10-02T19:27:00.000+10:00Yes, Off coarse, you are talking about a 90 degree...Yes, Off coarse, you are talking about a 90 degree rotation of the whole NXT in a plane perpendicular to that of the rotation of the wheels. The NXT software only looks at rotation of the wheel shaft and not of any other rotation which is always a translation.<BR/><BR/>Regards, FranklinAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159738733724255792006-10-02T07:38:00.000+10:002006-10-02T07:38:00.000+10:00yay... i was calculating tha same thing... TODAY! ...yay... i was calculating tha same thing... TODAY! not joking :OAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159734002721621622006-10-02T06:20:00.000+10:002006-10-02T06:20:00.000+10:00Also, as the distance between the two wheels incre...Also, as the distance between the two wheels increases, you'll see a substantial jump in the number of degrees each individual motor must spin a wheel... try it out by building a bot with wheels about 10 inches apart...<BR/><BR/>JimJim Kellyhttps://www.blogger.com/profile/13876934942928389738noreply@blogger.comtag:blogger.com,1999:blog-21402852.post-1159733791068757422006-10-02T06:16:00.000+10:002006-10-02T06:16:00.000+10:00The fact that you have to turn the motors 180 degr...The fact that you have to turn the motors 180 degrees to turn your TriBot 90 degrees actually is a coincidence.<BR/><BR/>The amount of degrees you actually have to turn depends on the distance the wheels have to go to traverse a 90 degree circle. <BR/><BR/>This is:<BR/> Pi/2 * r<BR/><BR/>This may look a bit cryptic so I'll explain in detail. The first part is the 90 degrees angle in radians. To convert an angle from degrees to radians, just divide by 180 and multiply by Pi.<BR/><BR/>The second part is the radius, which is the distance between the two wheels divided by 2. <BR/><BR/>Let's take the TriBot example. the centers of its wheels are spaced 13 studs apart. A stud is 7.9mm wide, so the distance between the wheels is 10.3mm.<BR/><BR/>Now we need to know how many rotations the wheel should make to traverse 10.3mm. The circumference of the weels is 18.4mm, so traversing 10.3mm takes 56% of a full revolution, which is pretty close to 180 degrees (assuming there is no gear reduction between the motor and the wheel).Bram Fokkehttp://lego.fokke.net/noreply@blogger.com