Skip to content

If you are a Coventry student that is interested in joining the FSAI team then this repo is intended to supply you with the tools you need to get our attention

Autonomous-Vehicles/demo_webots_fsai

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
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

Coventry FSAI team

If you are a Coventry student that is interested in joining the FSAI team then this repo is intended to supply you with the tools you need to get our attention.

Easiest way to get on the team is to show us what you've got. Do something with these files and then show us what you've come up with. For example:

  • Computer vision - cone recogition
  • Performance boost - faster controller code
  • Simulation - improved simulated environments
  • Control code - get the vehicle driving round the tracks
  • Motion planning - racing lines etc
  • ROS - the real vehicle runs is controlled by a ROS system but this has a steep learning curve, probably best to join the team first

webots_fsai

This project contains example worlds and controllers for the FSAI vehicle. These files are structured so that they can be used either directly within Webots or as a ROS package.

These files were tested and working with Webots 2020b Revision 1.

Worlds

This repo contains a number of basic simulated worlds representing the FSAI competition events:

  • acceleration.wbt
  • endurance.wbt
  • fig8.wbt
  • training_data.wbt - Containing a modified vehicle to aid in the generation of training data for ML models.

Webots usage (easy)

The project contains two example webots controllers for use with the acceleration world.

  • example (python)
  • examplecpp (c++)

Selecting controllers

Simulation performance

Simulating worlds is a computationally expensive process. There are trade offs to be made between accuracy and time.

If you are having difficulty running the simulations you can try setting the following:

  • Increase value of basicTimeStep attribute of WorldInfo.
  • Set bodyShell attribute of CoventryVehicle to FALSE.

To increase the accuracy of your simulations, for example if you are getting inconsistent results between simulations.

  • Decrease value of basicTimeStep attribute of WorldInfo.
  • Set optimalThreadCount to 1 in WorldInfo
  • Enable synchronization in CoventryVehicle

Read the Webots documentation for a full examplation of these options.

Controller design

Both controllers function in the same way, this is a relatively poor controller design that is unlikely to function correctly in the real world. It only functions in the simulation due to the minimalist nature of the simulated worlds and unrealistically high quality sensor data that is generated. They are, however, useful examples for getting started.

  1. The contollers function buy getting the depth image from the Zedcam mounted on the vehicle.

  2. The pixels of the depth image are checked to identify the edge of objects. For a given pixel (x,y) is seen as the edge of an object if the distance to the pixel (x,y-1) is at least 0.5 meters further than the distance to pixel (x,y). The assumption is that these pixels all represent points of cones in the environment.

  3. The x, y and z coordinates of the edge pixels in the real world (local coordinated frame), are calculated. The example controllers include code to visualise these points within Webots from a top down viewpoint.

  4. The coordinates of the points on the left and right hand side of the vehicle are averaged seperately.

  5. A point half way between the left and right averages is used as the position to steer towards.

ROS usage (less easy)

This repo is structured so that it can be used within a catkin workspace. Example ROS nodes have been provided that operate according the the same design detailed above. However, the controller has been split into two nodes so as to allow for better visualisation of the data.

  • example_see (which identifies the edge pixels and calculates coordiates)
  • example_steer (which calculates the left and right averages and the steering angle)

If getting started in ROS you would be better off using this repository which contains this repo as a submodule but also includes additional ROS files showing how to run the project.

When using ROS you also need to remember to change the Webots controller to ros_automobile and (at a minimum) controller arg --name=fsai.

About

If you are a Coventry student that is interested in joining the FSAI team then this repo is intended to supply you with the tools you need to get our attention

Resources

Stars

Watchers

Forks

Releases

No releases published