What you guys call a "euler matrix" is actually a "rotation matrix" or "DCM matrix" (Direction Cosine Matrix).
See there.
http://en.wikipedia.org/wiki/Rotation_representation
In fact the matrix returned by gps_get_matrix() was a 4x4 matrix containing the rotation matrix in its upper left 3x3 corner.
Now I don't think that it is possible to find the rotation matrix with two Compasses, but maybe someone has a idea about that ?
However, using a Compass (magnetic sensor) device you can know where the robot is heading.
Using a Gyro (angular speed) device you can know if you robot (e.g. humanoid) is falling and how fast.
And using the Accelerometer you can find out whether your robot is upright.
For what purpose do you need the rotation matrix ?
Cheers,
Yvan
On Wed, Jul 8, 2009 at 1:50 PM, Yongjin Liang <yl3908@...> wrote:
Thank you for the help. according to what you said, i need to computed
the euler matrix by myself. could any one tell me what is euler matrix
and how to compute it?
Regards
Yongjin> <http://www.cyberbotics.com/cdrom/common/doc/webots/reference/section3.41.html#wb_supervisor_field_get_sf_bool>)
Fabien Rohrer wrote:
>
>
>
> Hi Yongjin,
>
> First of all, /wb_supervisor_get_sf_rotation/ (documented here
> is effectively a function of the supervisor and so it is not usable from> 2009/7/7 <yl3908@... <mailto:yl3908@...>>
> an EDU version. This function is used to get the current orientation
> relatively to the parent node of the given node (here, the GPS solid).
>
> The old GPS was overkilled because it gave information that none of any
> real device can return (both the position and the exact orientation). As
> the policy of the new API is to render accessible the non realistic only
> from the supervisor, we decided to split into several more specialized
> devices such as the new GPS and the Compass which allows the same
> abilities than the old GPS. Basically, if you need:
>
> * the position of your robot, use the new GPS device with the
> wb_gps_get_values function
> * the orientation of your robot according to the north, use the
> Compass device with the wb_compass_get_values function
>
> The orientation given by the old GPS matrix was a little more powerful
> than the one given by the compass, i.e., getting the orientation along
> the Compass-North axis is no more possible with the new API unless to
> use 2 perpendicular compasses. So the euler matrix is no more directly
> available but must be computed by yourself if needed.
>
> I hope this is clear enough!?
> Regards,
> Fabien
>
>
>
> Hi,
>
>
> I was converting some code written in webots5 to webots6. the code
> invole two method gps_get_matrix() and
> gps_euler().
>
> >From the file giving online said that
> The rotation of an object must now be estimated either by using the
> new Compass device, or with the new
> wb_supervisor_field_get_sf_rotation() function.
>
> Webots 5 (deprecated) Webots 6
> gps_get_matrix() wb_compass_get_values()
> gps_euler() wb_supervisor_field_get_sf_rotation()
>
> I have replace the gps_get_matrix() method by
> wb_compass_get_values(). But I cann't found the method
> wb_supervisor_field_get_sf_rotation() in the API. It seem that this
> method are in the supervisor class. but I am using education
> license. Is that mean I can not replace the gps_euler() method? What
> I can do then?
>
> Regards
>
> Yongjin
>
> .
>
>
>
--
--------------------------
Yvan Bourquin
Software Engineer
Cyberbotics Ltd.
http://www.cyberbotics.com
+41 21 69 38624
--------------------------