Giter Club home page Giter Club logo

fyp-moovita's Introduction

AUTONOMOUS VEHICLE: CONTROL AND BEHAVIOUR

Ngee Ann Polytechnic Engineering Science Final Year Project with MooVita, 2020

ngeeann_av

Abstract

This project covers the development of a robust non-holonomic autonomous vehicle platform in a simulated environment using ROS and Gazebo. A sense-think-act cycle is implemented to navigate the virtual world, avoiding static and moving objects. This repository is deprecated and may no longer work. The maintained variant can be found in the AutoCarROS repository. A ROS 2 variant can also be found here.

Obstacle Avoidance

Table of Contents

Requirements

Hardware

Recommended its equivalent or higher:

  • Intel Core i7-8700 Desktop Processor
  • NVIDIA GeForce GTX 1080

Operating System

  1. Ubuntu 16.04.6 LTS (Xenial Xerus)

Software

  1. Desktop-Full ROS Kinetic

  2. Python 2.7

  3. Gazebo 7.16

  4. Git

  5. ackermann_msgs

Installation

  1. Install Ubuntu 16.04.6 LTS (Xenial Xerus)

  2. Git clone this repository

    • Open your terminal
    • Go to the directory you wish to clone the repository in
    • Type git clone https://github.com/reuben-thomas/fyp-moovita.git
  3. Change directory to your cloned path

    • Go to your terminal
    • Type cd <workspace>/src/fyp-moovita
  4. Install Desktop-Full ROS Kinetic

    • Type chmod +x ros-kinetic-desktop-full-install.sh
    • Type sh ros-kinetic-desktop-full-install.sh to install Desktop-Full ROS Kinetic
  5. Install the required packages

    • Type chmod +x requirements.sh
    • Type sh requirements.sh

Quick Start

  1. Launch ngeeann_av.launch
    • Launch your terminal
    • Type catkin_make
    • Type roslaunch launches ngeeann_av.launch
  2. Execute tracker.py
    • Type rosrun ngeeann_av_nav tracker.py

Scripts

circle_road_gen.py

Road Generation

Description

circle_road_gen.py is a custom script which uses the NumPy library to calculate and generate the three-dimensional coordinates of a circle for Gazebo's world file. This is primarily used to create a circular road of a certain radius and smoothness. The radius of the circle is calculated from the centre of the circle to the middle of the road (using Gazebo's SDF tag).

Usage

  1. Download the circle_road_gen.py script if you have not cloned this repository

  2. Go to the script's directory

    • Open your terminal
    • Type cd scripts
  3. Run the script

    • Type python circle_road_gen.py
    • Input your desired radius in metres
    • Input your desired smoothness in degrees (lower value is smoother)
    • Copy and paste result into your world file

circle_wp_gen.py

circle_wp_gen

Description

circle_wp_gen.py is a custom script which uses the NumPy and pandas library to calculate and generate a csv file that contains the two-dimensional coordinates; x-axis and y-axis in their respective columns. This is primarily used to generate waypoints on a circular road of a certain radius and smoothness. The user is given two different smoothness modes; Point mode and Angle mode. The radius of the circle is calculated from the centre of gazebo world.

Point mode

The user is able to choose how many waypoints to generate, and the smoothness of the circular waypoint is based on how many points the user has set. More points means a smoother waypoint

Angle mode

The user is unable to choose how many waypoints to generate, and the smoothness of the circular waypoint is based on the degree value the user has set. Lower value means a smoother waypoint.

Usage

  1. Download the circle_wp_gen.py script if you have not cloned this repository.

  2. Go to the script's directory

    • Open your terminal
    • Type cd scripts
  3. Run the script

    • Type python circle_wp_gen.py
    • Choose your desired smoothness mode
    • Input your desired radius in metres
    • Input your desired smoothness in number of points (if you chose Point mode) or degrees (if you chose Angle mode)

Launch Files

Launch File Launches Purpose
gazebo.launch gazebo, no world, ngeeann_av For debugging
road.launch gazebo, road.world, ngeeann_av Foundational launch file for future launch files
display.launch rviz, ngeeann_av Foundational launch file for future launch files
controller.launch axle controllers, steer controllers Foundational launch file for future launch files

ackermann_vehicle.launch

Launches the populated_road.world file into Gazebo and spawns the ngeeann_av onto a populated road world. It also launches ackermann_controller.launch, RViz, the controller spawner and ackermann controller. If your Gazebo does not start, this is because you do not have the required Gazebo models in your models folder. To fix this, you may change the ackermann_vehicle.launch parameters to launch the unpopulated road variant, road.launch.

ackerman_controller.launch

Launches nodes used by both RViz and Gazebo when visualizing a vehicle with Ackermann steering.

Renders

Renders

fyp-moovita's People

Contributors

reuben-thomas avatar winstxnhdw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.