Giter Site home page Giter Site logo

anas's Introduction

A.N.A.S Development Guide

1. Introduction

This is a repository for the development of A.N.A.S by Group 2 Studio 1 EG2310. In here, you will find the code for ANAS and all the design and iteration of ANAS. You will also find all the tool chain that we use and version update log.

2. Development Tools

Visual Studio Code

VSCode is a lightweight and highly functional text editor and pseudo-IDE which is recommended for this project. You can find the installation guide here:

Visual Studio Code

Git & Github

Collaboration in programming world would be impossible without one of mankind greatest invention Git. Git is a Source Code Management It is necessary that all members are familiar with how to use Git and Github to do basic code management such as commit, pull, and push. You can find out how to install Git here:

Git

On the same website, there is also a book for indepth exploration of what Git can do (TLDR: it can do A LOT of thing). Here is a joke for you:

How do you win a programming competition?

You need to "Git good"

For those who are starting out and a bit clueless about Git or those who already know what is Git but have trouble navigating around, here is some resources for you all:

PS: although Github make life easier by putting GUI so you don't have to use CLI to execute Git command, I still recommend you to use Bash as it will let you understand Git better and you can easily do more complex stuff in the future.

Powerline for Linux terminal

Powerline is a way to customize the terminal in Linux so that it looks nicer and easier to understand. It will help you a lot in making sense of Git and for navigating using CLI in general. Follow the instruction here to set up your ClI nicely:

Powerline setup

If you meet an error that does not show you the branch position you are on, please see the discussion here:

Fix branch status not showing

Huy's personal recommendation (for an easier and stress free life)

You might want to download the following extensions on your VSCode (from the extension tab) which can do a lot of cool stuffs (eg. auto complete, header finding, intellisense, ...) that help manage your workflow and monitor other workflow, just type the key words as you see bellow:

  • Git History
  • GitLens
  • C/C++
  • Python
  • TabNine (this is some cool sorcery stuff)

Markdown

Want to know how I make this cool document? I written it in a markup language called Markdown (yeah I know ironically). You can find more information about it here:

Markdown

If you decide to pick up this cool documentation language and want to help with documenting, you can also download this following extensions in VSCode:

  • Markdown preview
  • Mardown All in One

3. Libraries

This project uses some libraries that may have or may have not been included within Python 3 or ROS 2 Python. Please ensure you have the following libraries:

  1. numpy
  2. math
  3. cmath
  4. time
  5. matplotlib
  6. cv2 (Python OpenCV)
  7. scipy
  8. pathfinding

4. Progress

A.N.A.S v1.0 (Wall Follower) (Deprecated)

This is legacy code which is not saved

Logic

  • Hugs right
  • Using rotatebot() and lidar data
  • Minimum distance from the wall is 20cm
  • Maximum distance from the wall is 30cm
  • Everytime it is closer than 20cm it turns left 10o, if it is more than 30cm it turns right 10o
  • After turning, move forward for 2 seconds

Problems:

  • A lot of jitter
  • Movement speed and turning is prety slow and inaccurate
  • The forward movment is hardcode and not adaptive
  • Cannot turn corner well and

A.N.A.S v2.0 (A*STAR Path Finding) (Unstable)

To run this logic
ros2 run anas_ai pos
ros2 run anas_ai nav

Logic

  • Based on Andreas Bresser Pathfinding library, we can generate a path (list of coordinates) to a certain coordinate given the map, the starting position and the ending position of the bot.
  • Using OpenCV Python Library CV2 and examine the map generated from occupancy msg. Highligh all the intersection between unexplored region and explroed region which have a clear path. (Run ros2 run anas_ai occ to see what the highligh would looks like).
  • Find the furthest highlight point from the bot and move take that as the target.
  • Input the target into the pathfinding library, get the list of path coordinate, and feed it into the bot.

Problems

  • The turning and moving between coordinate takes very long time
  • To complete one set of path takes more than 2 mintues
  • The orientation of the map generated and the map is in wrong orientation regularly, making the rotatebot code very confusing for the bot, because it doesnt know where to go.

A.N.A.S v3.0 (Wall Follower v2) (Stable)

To run this logic
ros2 run anas_ai state
ros2 run anas_ai follow

Logic

  • Same logic but upgrade and use some more advanced code with reference to Bug2 Algorithm on this webpage

Problems

  • Does not work really well when all the walls are disconnected
  • The speed is still relatively slow, but acceptable

anas's People

Contributors

lazyyuuki avatar nickchen526 avatar

Watchers

 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.