logo资料库

Webots Reference Manual release 8.1.0.pdf

第1页 / 共324页
第2页 / 共324页
第3页 / 共324页
第4页 / 共324页
第5页 / 共324页
第6页 / 共324页
第7页 / 共324页
第8页 / 共324页
资料共324页,剩余部分请下载后查看
Introduction
Nodes and Functions
Nodes
Functions
ODE: Open Dynamics Engine
Node Chart
Chart
Nodes and API Functions
Accelerometer
Description
Field Summary
Accelerometer Functions
Appearance
Description
Field Summary
Background
BallJoint
Description
BallJointParameters
Description
Field Summary
Box
Description
Brake
Description
Brake Functions
Camera
Description
Field Summary
Camera Type
Frustum
Noise
Spherical projection
Camera Functions
CameraZoom
Description
Field Summary
Capsule
Description
Charger
Description
Field Summary
Color
Compass
Description
Field Summary
Compass Functions
Cone
Connector
Description
Field Summary
Connector Axis System
Connector Functions
ContactProperties
Description
Field Summary
Coordinate
Cylinder
Description
Damping
Description
Device
Description
Device Functions
DifferentialWheels
Description
Field Summary
Simulation Modes
DifferentialWheels Functions
DirectionalLight
Description
Field Summary
Display
Description
Field Summary
Coordinates system
Command stack
Context
Display Functions
DistanceSensor
Description
Field Summary
DistanceSensor types
Infra-Red Sensors
Sonar Sensors
Line Following Behavior
DistanceSensor Functions
ElevationGrid
Description
Field Summary
Texture Mapping
Emitter
Description
Field Summary
Emitter Functions
Fluid
Description
Fluid Fields
Fog
GPS
Description
Field Summary
GPS Functions
Group
Gyro
Description
Field Summary
Gyro Functions
HingeJoint
Description
Field Summary
HingeJointParameters
Description
Field Summary
Hinge2Joint
Description
Field Summary
ImageTexture
Description
Search rule of the texture path
ImmersionProperties
Description
ImmersionProperties Fields
IndexedFaceSet
Description
Field Summary
Example
IndexedLineSet
InertialUnit
Description
Field Summary
InertialUnit Functions
Joint
Description
Field Summary
Joint's hidden position fields
JointParameters
Description
Field Summary
Units
Initial Transformation and Position
Joint Limits
Springs and Dampers
LED
Description
Field Summary
LED Functions
Light
Description
Field Summary
LightSensor
Description
Field Summary
LightSensor Functions
LinearMotor
Description
Field Summary
Material
Description
Field Summary
Motor
Description
Field Summary
Units
Initial Transformation and Position
Position Control
Velocity Control
Force and Torque Control
Motor Limits
Motor Functions
Pen
Description
Field Summary
Pen Functions
Physics
Description
Field Summary
How to use Physics nodes?
Plane
Description
PointLight
Description
PositionSensor
Description
Field Summary
PositionSensor Functions
Propeller
Description
Field Summary
Receiver
Description
Field Summary
Receiver Functions
Robot
Description
Field Summary
Synchronous versus Asynchronous controllers
Robot Functions
RotationalMotor
Description
Field Summary
Servo
Description
Field Summary
Units
Initial Transformation and Position
Position Control
Velocity Control
Force Control
Servo Limits
Springs and Dampers
Servo Forces
Friction
Serial Servos
Simulating Overlayed Joint Axes
Servo Functions
Shape
SliderJoint
Description
Field Summary
Slot
Description
Field Summary
Example
Solid
Description
Solid Fields
How to use the boundingObject field?
SolidReference
Description
Field Summary
Sphere
SpotLight
Description
Supervisor
Description
Supervisor Functions
TextureCoordinate
TextureTransform
TouchSensor
Description
Field Summary
Description
TouchSensor Functions
Track
Texture Animation
Geometries Animation
Transform
Description
Field Summary
Viewpoint
WorldInfo
Motion Functions
Motion
PROTO
PROTO Definition
Interface
IS Statements
PROTO Instantiation
Example
Procedural PROTO nodes
Scripting language
Template Engine
Programming Facts
Example
Using PROTO nodes with the Scene Tree
PROTO Directories
Add a Node Dialog
Using PROTO Instances
PROTO Scoping Rules
PROTO hidden fields
Physics Plugin
Introduction
Plugin Setup
Callback Functions
void webots_physics_init(dWorldID, dSpaceID, dJointGroupID)
int webots_physics_collide(dGeomID, dGeomID)
void webots_physics_step()
void webots_physics_step_end()
void webots_physics_cleanup()
void webots_physics_draw(int pass, const char *view)
Utility Functions
dWebotsGetBodyFromDEF()
dWebotsGetGeomFromDEF()
dWebotsGetContactJointGroup()
dGeomSetDynamicFlag(dGeomID geom)
dWebotsSend() and dWebotsReceive()
dWebotsGetTime()
dWebotsConsolePrintf()
Structure of ODE objects
Compiling the Physics Plugin
Examples
ODE improvments
Hinge joint
Hinge 2 joint
Troubleshooting
Execution Scheme
Webots World Files
Generalities
Nodes and Keywords
VRML97 nodes
Webots specific nodes
Reserved keywords
DEF and USE
Other APIs
C++ API
Java API
Python API
Matlab API
Webots Reference Manual release 8.1.0 Copyright c 2015 Cyberbotics Ltd. All Rights Reserved www.cyberbotics.com May 12, 2015
2 Permission to use, copy and distribute this documentation for any purpose and without fee is hereby granted in perpetuity, provided that no modifications are made to this documentation. The copyright holder makes no warranty or condition, either expressed or implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose, regarding this manual and the associated software. This manual is provided on an as-is basis. Neither the copyright holder nor any applicable licensor will be liable for any incidental or con- sequential damages. The Webots software was initially developed at the Laboratoire de Micro-Informatique (LAMI) of the Swiss Federal Institute of Technology, Lausanne, Switzerland (EPFL). The EPFL makes no warranties of any kind on this software. In no event shall the EPFL be liable for incidental or consequential damages of any kind in connection with the use of this software. Trademark information AiboTMis a registered trademark of SONY Corp. RadeonTMis a registered trademark of ATI Technologies Inc. GeForceTMis a registered trademark of nVidia, Corp. JavaTMis a registered trademark of Sun MicroSystems, Inc. KheperaTMand KoalaTMare registered trademarks of K-Team S.A. LinuxTMis a registered trademark of Linus Torvalds. Mac OS XTMis a registered trademark of Apple Inc. MindstormsTMand LEGOTMare registered trademarks of the LEGO group. IPRTMis a registered trademark of Neuronics AG. PentiumTMis a registered trademark of Intel Corp. Red HatTMis a registered trademark of Red Hat Software, Inc. Visual C++TM, WindowsTM, Windows 95TM, Windows 98TM, Windows METM, Windows NTTM, Windows 2000TM, Windows XPTMand Windows VistaTMare registered trademarks of Microsoft Corp. UNIXTMis a registered trademark licensed exclusively by X/Open Company, Ltd.
Thanks Cyberbotics is grateful to all the people who contributed to the development of Webots, Webots sample applications, the Webots User Guide, the Webots Reference Manual, and the Webots web site, including Yvan Bourquin, Fabien Rohrer, Jean-Christophe Fillion-Robin, Jordi Porta, Emanuele Ornella, Yuri Lopez de Meneses, S´ebastien Hugues, Auke-Jan Ispeert, Jonas Buchli, Alessandro Crespi, Ludovic Righetti, Julien Gagnet, Lukas Hohl, Pascal Cominoli, St´ephane Mojon, J´erˆome Braure, Sergei Poskriakov, Anthony Truchet, Alcherio Martinoli, Chris Cianci, Nikolaus Correll, Jim Pugh, Yizhen Zhang, Anne-Elisabeth Tran Qui, Gr´egory Mermoud, Lu- cien Epinet, Jean-Christophe Zufferey, Laurent Lessieux, Aude Billiard, Ricardo Tellez, Gerald Foliot, Allen Johnson, Michael Kertesz, Simon Garnieri, Simon Blanchoud, Manuel Jo˜ao Fer- reira, Rui Picas, Jos´e Afonso Pires, Cristina Santos, Michal Pytasz and many others. Many thanks are also due to Cyberbotics’s Mentors: Prof. Jean-Daniel Nicoud (LAMI-EPFL), Dr. Francesco Mondada (EPFL), Dr. Takashi Gomi (Applied AI, Inc.). Finally, thanks to Skye Legon and Nathan Yawn, who proofread this manual. 3
4
Contents 1 Introduction 1.1 Nodes and Functions . . . . . 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.2 ODE: Open Dynamics Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.1.1 Nodes . 1.1.2 . . Functions . 2 Node Chart 2.1 Chart . . . . . . . . . . . 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3 Nodes and API Functions . 3.1 Accelerometer . . . . . Field Summary . . 3.2.1 Description . . 3.2.2 21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1.1 Description . . 3.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1.3 Accelerometer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 . . 3.4.1 Description . . . 3.5.1 Description . . 3.5.2 Field Summary . . . . . . . . . . . . . . . . . . . . 3.5 BallJointParameters . . 3.2 Appearance . . 3.3 Background . 3.4 BallJoint . . . 3.6 Box . 5
6 CONTENTS 3.7 Brake . 3.8 Camera . . 3.9 CameraZoom . . . 3.10 Capsule . . 3.10.1 Description . . . . . . 3.11 Charger . . . . . . . . . . . . . Frustum . 3.6.1 Description . . 3.9.1 Description . 3.9.2 . . . 3.7.1 Description . . 3.7.2 Brake Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.8.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 . 3.8.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.8.3 Camera Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 . 3.8.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.8.5 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.8.6 Spherical projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.8.7 Camera Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.11.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 . 3.11.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.13.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.13.2 Field Summary . 3.13.3 Compass Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.15.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.15.2 Field Summary . 3.15.3 Connector Axis System . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.15.4 Connector Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 . . . . . . . . . . . . . . . . . . . . . . 3.12 Color 3.13 Compass . . . . . . 3.14 Cone . 3.15 Connector . . .
CONTENTS 7 3.17 Coordinate . 3.18 Cylinder . . 3.19 Damping . 3.20 Device . . . 3.21 DifferentialWheels 3.24 DistanceSensor 3.16 ContactProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.21.1 Description . . 3.21.2 Field Summary . 3.21.3 Simulation Modes 3.21.4 DifferentialWheels Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.16.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.16.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.18.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.19.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 . 3.20.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.20.2 Device Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 . . . . . . . . . . . . . . . . . . . . . . . 64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.22.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.22.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.23.1 Description . . 3.23.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.23.3 Coordinates system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.23.4 Command stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 3.23.5 Context . 3.23.6 Display Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.24.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 3.24.2 Field Summary . 3.24.3 DistanceSensor types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 3.24.4 Infra-Red Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 . . . . . . . . . 3.22 DirectionalLight . . . 3.23 Display . . . . .
8 CONTENTS 3.25 ElevationGrid . . 3.26 Emitter 3.27 Fluid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.27.1 Description . 3.27.2 Fluid Fields . 3.24.5 Sonar Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 3.24.6 Line Following Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . 80 . . . . . . . . . . . . . . . . . . . . . . . . . 80 3.24.7 DistanceSensor Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 3.25.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 3.25.2 Field Summary . . 3.25.3 Texture Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 . . 3.26.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3.26.2 Field Summary . . 3.26.3 Emitter Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 3.29.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 . 3.29.2 Field Summary . 3.29.3 GPS Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.31.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 . 3.31.2 Field Summary . 3.31.3 Gyro Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 3.32.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 . 3.32.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 3.33.1 Description . . 3.33.2 Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.33 HingeJointParameters . . 3.34 Hinge2Joint 3.28 Fog . 3.29 GPS . 3.30 Group . 3.31 Gyro . . 3.32 HingeJoint . . . . .
分享到:
收藏