logo资料库

Webots User Guide.pdf

第1页 / 共264页
第2页 / 共264页
第3页 / 共264页
第4页 / 共264页
第5页 / 共264页
第6页 / 共264页
第7页 / 共264页
第8页 / 共264页
资料共264页,剩余部分请下载后查看
Installing Webots
Webots licenses
Webots PRO
Webots EDU
Webots for NAO
Webots FREE
System requirements
Installation procedure
Linux
Windows 7, Vista, XP
Mac OS X
Webots license system
License agreement
License setup
USB Dongle (optional)
License administration
Verifying your graphics driver installation
Supported graphics cards
Unsupported graphics cards
Upgrading your graphics driver
Hardware acceleration tips
Translating Webots to your own language
Getting Started with Webots
Introduction to Webots
What is Webots?
What can I do with Webots?
What do I need to know to use Webots?
Webots simulation
What is a world?
What is a controller?
What is a Supervisor?
Starting Webots
Linux
Mac OS X
Windows
Command Line Arguments
The User Interface
File Menu
Edit Menu
View Menu
Simulation Menu
Build Menu
Robot Menu
Tools Menu
Wizards Menu
Help menu
Speedometer and Virtual Time
The 3D Window
Selecting an object
Navigation in the scene
Moving a solid object
Applying a force to a solid object with physics
Applying a torque to a solid object with physics
The Scene Tree
Buttons of the Scene Tree Window
Citing Webots
Citing Cyberbotics' web site
Citing a reference journal paper about Webots
Sample Webots Applications
Samples
blimp_lis.wbt
gantry.wbt
hexapod.wbt
humanoid.wbt
moon.wbt
ghostdog.wbt
salamander.wbt
soccer.wbt
sojourner.wbt
yamor.wbt
stewart_platform.wbt
Webots Devices
battery.wbt
bumper.wbt
camera.wbt
connector.wbt
distance_sensor.wbt
emitter_receiver.wbt
encoders.wbt
force_sensor.wbt
gps.wbt
led.wbt
light_sensor.wbt
pen.wbt
range_finder.wbt
How To
binocular.wbt
biped.wbt
force_control.wbt
inverted_pendulum.wbt
physics.wbt
supervisor.wbt
texture_change.wbt
town.wbt
Geometries
Real Robots
aibo_ers210_rough.wbt
aibo_ers7.wbt
alice.wbt
boebot.wbt
e-puck.wbt
e-puck_line.wbt
e-puck_line_demo.wbt
hemisson_cross_compilation.wbt
hoap2_sumo.wbt
hoap2_walk.wbt
ipr_collaboration.wbt
ipr_cube.wbt
ipr_factory.wbt
ipr_models.wbt
khepera.wbt
khepera2.wbt
khepera3.wbt
khepera_fast2d.wbt
khepera_gripper.wbt
khepera_gripper_camera.wbt
khepera_k213.wbt
khepera_pipe.wbt
khepera_tcpip.wbt
koala.wbt
magellan.wbt
pioneer2.wbt
rover.wbt
scout2.wbt
shrimp.wbt
bioloid.wbt
Language Setup
Introduction
Controller Start-up
Using C
Introduction
C/C++ Compiler Installation
Using C++
Introduction
C++ Compiler Installation
Source Code of the C++ API
Using Java
Introduction
Java and Java Compiler Installation
Link with external jar files
Source Code of the Java API
Using Python
Introduction
Python Installation
Source Code of the Python API
Using MATLAB™
Introduction to MATLAB™
How to run the Examples?
MATLAB™Installation
Compatibility Issues
Using ROS
What is ROS?
ROS for Webots
Using ROS with Webots
Interfacing Webots to third party software with TCP/IP
Overview
Main advantages
Limitations
Development Environments
Webots Built-in Editor
Compiling with the Source Code Editor
The standard File Hierarchy of a Project
The Root Directory of a Project
The Project Files
The "controllers" Directory
Compiling Controllers in a Terminal
Mac OS X and Linux
Windows
Using Webots Makefiles
What are Makefiles
Controller with Several Source Files (C/C++)
Using the Compiler and Linker Flags (C/C++)
Debugging C/C++ Controllers
Controller processes
Using the GNU debugger with a controller
Using Visual C++ with Webots
Introduction
Configuration
Starting Webots Remotely (ssh)
Using the ssh command
Terminating the ssh session
Transfer to your own robot
Remote control
Cross-compilation
Interpreted language
Programming Fundamentals
Controller Programming
Hello World Example
Reading Sensors
Using Actuators
How to use wb_robot_step()
Using Sensors and Actuators Together
Using Controller Arguments
Controller Termination
Shared libraries
Supervisor Programming
Introduction
Tracking the Position of Robots
Setting the Position of Robots
Using Numerical Optimization Methods
Choosing the correct Supervisor approach
Resetting the robot
C++/Java/Python
Classes and Methods
Controller Class
C++ Example
Java Example
Python Example
Matlab
Using the MATLAB™desktop
Controller plugin
Fundamentals
Robot window plugin
Qt utility library
Motion editor
Remote-control plugin
Webots Plugins
Physics plugin
Fast2D plugin
Sound plugin
Tutorials
Prerequisites
Install Webots
Create a directory for all your Webots files
Start Webots
Create a new Project
The Webots Graphical User Interface (GUI)
Tutorial 1: Your first Simulation in Webots (20 minutes)
Create a new World
Add an e-puck Robot
Create a new Controller
Conclusion
Tutorial 2: Modification of the Environment (20 minutes)
A new Simulation
The Solid Node
Observation of the Floor
Create a Ball
Geometries
DEF-USE mechanism
Add Walls
Efficiency
Conclusion
Tutorial 3: Appearance (15 minutes)
New simulation
Lights
Modify the Appearance of the Walls
Add a Texture to the Ball
Rendering Options
Conclusion
Tutorial 4: More about Controllers (20 minutes)
New World and new Controller
Understand the e-puck Model
Program a Controller
The Controller Code
Conclusion
Tutorial 5: Compound Solid and Physics Attributes (15 minutes)
New simulation
Compound Solid
Physics Attributes
The Rotation Field
How to choose bounding Objects?
Contacts
basicTimeStep, ERP and CFM
Minor physics Parameters
Conclusion
Tutorial 6: 4-Wheels Robot
New simulation
Separating the Robot in Solid Nodes
HingeJoints
Sensors
Controller
Conclusion
Tutorial 7: Using ROS
Creating a Webots project that contains a ROS package
Conclusion
Going Further
Robots
Using the e-puck robot
Overview of the robot
Simulation model
Control interface
Using the Nao robot
Introduction
Using Webots with Choregraphe
Using motion boxes
Using the cameras
Using Several Nao robots
Getting the right speed for realistic simulation
Known Problems
Source Code
Using the Pioneer 3-AT and Pioneer 3-DX robots
Pioneer 3-AT
Pioneer 3-DX
Webots FAQ
General
What are the differences between Webots FREE, Webots EDU and Webots PRO?
How can I report a bug in Webots?
Is it possible to use Visual C++ to compile my controllers?
Programming
How can I get the 3D position of a robot/object?
How can I get the linear/angular speed/velocity of a robot/object?
How can I reset my robot?
What does this mean: "Could not find controller {...} Loading void controller instead." ?
What does this mean: "Warning: invalid WbDeviceTag in API function call" ?
Is it possible to apply a (user specified) force to a robot?
How can I draw in the 3D window?
What does this mean: "The time step used by controller {...} is not a multiple of WorldInfo.basicTimeStep!"?
How can I detect collisions?
Why does my camera window stay black?
Modeling
My robot/simulation explodes, what should I do?
How to make replicable/deterministic simulations?
How to remove the noise from the simulation?
How can I create a passive joint?
Is it possible fix/immobilize one part of a robot?
Should I specify the "mass" or the "density" in the Physics nodes?
How to get a realisitc and efficient rendering?
Speed/Performance
Why is Webots slow on my computer?
How can I change the speed of the simulation?
Known Bugs
General
Intel GMA graphics cards
Virtualization
Collision detection
Mac OS X
Anti-aliasing
Linux
Window refresh
ssh -x
Webots User Guide release 7.2.4 Copyright c 2013 Cyberbotics Ltd. All Rights Reserved www.cyberbotics.com August 28, 2013
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 performed on this documenta- tion. 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 and exploitation 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. UbuntuTMis a registered trademark of Canonical Ltd. Visual C++TM, WindowsTM, Windows 98TM, Windows METM, Windows NTTM, Windows 2000TM, Windows XPTMand Windows VistaTMWindows 7TMare registered trademarks of Microsoft Corp. UNIXTMis a registered trademark licensed exclusively by X/Open Company, Ltd.
Foreword Webots is a three-dimensional mobile robot simulator. It was originally developed as a research tool for investigating various control algorithms in mobile robotics. This user guide will get you started using Webots. However, the reader is expected to have a minimal knowledge in mobile robotics, in C, C++, Java, Python or MATLAB programming, and in VRML97 (Virtual Reality Modeling Language). Webots 7 features a new layout of the user interface with many facilities integrated, such as a source code editor, motion editor, etc. We hope that you will enjoy working with Webots 7. 3
4
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. Moreover, many thanks are 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 guide. 5
6
Contents 1 . . . . . . Installing Webots 1.1 Webots licenses . 1.2 System requirements 1.3 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.1.1 Webots PRO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.1.2 Webots EDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.1.3 Webots for NAO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.1.4 Webots FREE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Installation procedure . 1.3.1 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 . . 1.3.2 Windows 7, Vista, XP . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.3.3 Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.4 Webots license system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.4.1 License agreement 1.4.2 License setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.4.3 USB Dongle (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.4.4 License administration . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.5 Verifying your graphics driver installation . . . . . . . . . . . . . . . . . . . . . 29 Supported graphics cards . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.5.1 . . . . . . . . . . . . . . . . . . . . . . . . 29 1.5.2 Unsupported graphics cards . . . . . . . . . . . . . . . . . . . . . . 30 1.5.3 Upgrading your graphics driver 1.5.4 Hardware acceleration tips . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.6 Translating Webots to your own language . . . . . . . . . . . . . . . . . . . . . 32 7
8 CONTENTS 2.1 . . . . . . 2.2 Starting Webots . 2 Getting Started with Webots 33 Introduction to Webots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.1.1 What is Webots? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.1.2 What can I do with Webots? . . . . . . . . . . . . . . . . . . . . . . . . 33 2.1.3 What do I need to know to use Webots? . . . . . . . . . . . . . . . . . . 34 2.1.4 Webots simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.1.5 What is a world? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.1.6 What is a controller? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.1.7 What is a Supervisor? . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.2.1 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.2.2 Mac OS X . 2.2.3 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . 2.2.4 Command Line Arguments . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.3 The User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.3.1 File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.3.2 Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.3.3 View Menu . . Simulation Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 . 2.3.5 Build Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 . 2.3.6 Robot Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.3.7 Tools Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.3.8 Wizards Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.3.9 Help menu . . 2.3.10 Speedometer and Virtual Time . . . . . . . . . . . . . . . . . . . . . . . 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.4.2 Navigation in the scene . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.4.3 Moving a solid object . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.4.4 Applying a force to a solid object with physics . . . . . . . . . . . . . . 46 2.4.5 Applying a torque to a solid object with physics . . . . . . . . . . . . . . 46 Selecting an object 2.4 The 3D Window . . . . . . . .
分享到:
收藏