Skip to content

ac0745/webots_intro

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

webots_intro

Setup

Coventry lab machines

Installation

  1. Open AppsAnywhere.
  2. Search for and install Webots (R2020b-rev1).

Additional Python steps

  1. Open AppsAnywhere.
  2. Search for and install Python (Anaconda Python 3.4).
  3. Open Webots.
  4. Edit Tools -> Preferences -> "Python command" option to "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python".

Personal machines

Installation

  1. Download from https://cyberbotics.com/.
  2. Install.

Although these activities should work with the latest version of Webots they were tested against R2020b-rev1. Previous versions of Webots are available at https://github.com/cyberbotics/webots/releases.

Additional Python steps

  1. Install Python 3.7, 3.8 or 3.9.
  2. If Webots is unable to find your Python install you may need to edit the Tools -> Preferences -> "Python command" option within Webots.

Getting started

Open one of the sample environments using the File -> "Open Sample World" -> dji -> mavic -> mavic_2_pro.wbt

Camera controls

  • Pan/Tilt camera - click and hold left mouse button in simulation window.
  • Move camera - click and hold right mouse button in simulation window.
  • Roll camera - click and hold middle mouse button in simulation window.

Control simulation

  • Play, pause and fast forward options on top menu bar.
  • Can also step through the simulation one timestep at a time.
  • Reset simulation to the start (rewind icon).

Move objects

  • Whilst holding Shift key, left click and drag on object.
  • Or, left click on object and use movement arrows.

Rotate objects

  • Whilst holding Shift key, right click and drag on object.
  • Or, left click on object and use rotation arrows.

Modify objects

  • Select object in the scene tree (menu on left hand side).
  • Change attribute values.

Robot window

View the sensor information from the robot in the robot window.

  • Double left click on the robot.
  • Or, right click on the robot and select "Show Robot Window".

Write control code

  • Select robot in the scene tree.
  • Select controller attribute.
  • Use "Select..." button to see available controllers.
  • Use "Edit" button to open the code window.
  • Controllers are stored in the "controllers" follow in seperate directories.
    • The controller program must match the name of the folder to be automatically detected.
    • I.e. controllers/myController/myController.py for Python and controllers/myController/myController.cpp for C++.
    • You will need to compile your C++ code, there is a compile button in the code window (the cog icon).

Documentation

The Webots documentation is available at https://cyberbotics.com/doc/guide/index.

In particular the programming documentation is availabel here https://cyberbotics.com/doc/reference/index.

Activities

Using a modified version of the GCTronic E-puck.

Line follow

  1. Open Webots.
  2. File -> Open World
  3. Select the worlds/linefollow.wbt file from this repo.
  4. Create your own version of the example_line controller to navigate the course and quickly as possible.

Line follow with avoidance

  1. Open Webots.
  2. File -> Open World
  3. Select the worlds/linefollow.wbt file from this repo.
  4. Move the robot to the second course (features 3 obstacle blocks).
  5. Create your own version of the example_line controller to navigate the course and quickly as possible.

Sumo

  1. Open Webots
  2. File -> Open World
  3. Select the worlds/sumo.wbt file from this repo
  4. This is a two robot environment, the red and blue E-pucks can each run seperate controllers.
  5. Develop and test your controller against each other. The objective is to push the other robot out of the ring.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published