Re: z-value in eulerAngles

Anders Lyhagen <[email protected]> Fri, 19 Mar 2004 09:23:32 +0100
Newsgroups gmane.comp.cybernetics.webot.contest
Message-ID <[email protected]>
Thanks, it works fine!
/Anders

> Anders,
>  
> Here is the routine I use to determine the fall type. 
>  
> ThemaxAngleXand maxAngleZare the absolute tilt angles that would 
> result in the robot falling. These are the threshold values for 
> detecting a fall.  The values should be in the range from 0 to (pi / 
> 2).
>  
> The angleXand angleZvalues are the values returned from the 
> methodeulerAngles().
>  
> if (Math.abs(angleX) < maxAngleX) {
>    if (angleZ > maxAngleZ) { // Fall on Right Side detected. }
>    if (angleZ < -1*maxAngleZ) { // Fall on Left Side detected. }
> }
> else {
>    if (angleX > maxAngleX) { // Fall on Back detected. }
>    if (angleX < -1*maxAngleX) { // Fall on Front detected.}
> }
>  
> Mike Jost
>
>  
> Hi,
> I don't quite understand what the inclinometer method eulerAngles 
> return. The x-value seems to be the inclinometer value in the 
> direction of back_1 (no matter the orientation of the robot), but the 
> z value seems a bit wierd though. For example, a robot standing up 
> straight has z = 0 (as expected), but when lying on its belly the z 
> value is pi, thus z cannot be the tilt value.(?) I would like to find 
> an exclusive criteria telling whether the robot is lying on its side. 
> Any Suggestions?
>
> Best,
> Anders.L
>
>
> Yahoo! Groups Links
>
> 	• 	To visit your group on the web, go to:
> http://groups.yahoo.com/group/webots-contest/
>  
> 	• 	To unsubscribe from this group, send an email to:
> [email protected]
>  
> 	• 	Your use of Yahoo! Groups is subject to theYahoo! Terms of Service.
>
>