First of all, wb_supervisor_get_sf_rotation (documented here) is effectively a function of the supervisor and so it is not usable from 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
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.![]()