|
6.6 ExamplesWebots comes with several examples of physics plugin. When opening an example, the code of the physics plugin should appear in Webots text editor. If it does not appear automatically, then you can use the menu: Tools | Edit Physics Plugin A simple example is the WEBOTS_HOME/projects/samples/howto/worlds/physics.wbt world. In this example, the plugin is used to add forces to make the robot fly, to communicate with the Webots model, to detect objects using a Ray object, to display this object using OpenGL and to define a frictionless collision between the robot and the floor. The WEBOTS_HOME/projects/samples/howto/worlds/contact_points.wbt example shows how to detect collision of an arbitrary object with the floor, draw the collision contact points in the 3d window, set up contact joints to define the collison behavior, and determine the forces and torques involved in the collision. This example can be used for example if you need a detailed feedback about the contact points and forces involved in the locomotion of a legged robot. The WEBOTS_HOME/projects/samples/demos/worlds/stewart_platform.wbt example shows how to add extra ODE joints (universal joints and ball joints) to a simulation. The WEBOTS_HOME/projects/samples/demos/worlds/blimp_lis.wbt shows how to suppress gravity, and apply a thrust force (propeller) for a blimp model. The WEBOTS_HOME/projects/robots/shrimp/worlds/shrimp.wbt example shows how to create new ODE joints, to add a custom spring force and to create a spongy effect for the tires. ![]() ^ page top ^ |
| E-mail to webmaster | Last updated: | Copyright © 2010 Cyberbotics Ltd. |