![]() ![]() This is usually more realistic because most robots don't have a GPS and therefore have no mean of precisely determining their position. Lastly, the position of a robot can also be approximated by using odometry or SLAM techniques. Note that this function returns the position of the center of mass of the body, which may be different from the center of the Solid. Webots environment variables needed by extern controllers: tab-component 'os'. Please refer to the documentation of your operating system to set environment variables. Get position using a physics pluginĪfter adding a physics plugin to your world (under the WorldInfo node), you can retrieve the information directly from the physics engine by using ODE's dBodyGetPosition function. In order to be able to run an extern Webots controller, a number of environment variables should be set or extended. These header files must be included using statements like include the functions described below will return the 3D position in meters and expressed in the global (world) coordinate system. There are different functions depending whether this information must be accessed in a normal controller, in a Supervisor controller or in a physics plugin.
0 Comments
Leave a Reply. |