Giter Club home page Giter Club logo

ia_robot's Introduction

IA_robot

Intelligence artificielle pour robot destiné à participer à la Coupe De France de Robotique

alt text

Installation

  • Install python 2.7 on your windows/mac/linux
  • Install the numpy and the pyserial python package
    • python -m pip install numpy pyserial
  • Run the IA with python main.py

Usage

This IA is designed to be easily customizable with new xml files describing the maps, goals, and robots.

The map is the top down 2D view of the environment. It contains the position of the object and obstacles with some metadat like: color of the object, type of object, position to be reached to access it, shape and so on.

The goals are the list of action to be done on the map. They are executed by the IA if the conditions are matched.

The robot is a set of value describing its size, its starting positions on the table, it storage capacity, its connected boards and so on.

All the aspect are described from the following architecture:

  • IA
    • map map2017.xml
      • size 3000x2000
      • points of interest list
        • name BlueStartingArea
        • type starting_area
        • color blue
        • shape rectangle x y w h
        • avoidance area rectangle x-10 y-10 w+10 h+10
        • access position x y angle
    • goals goalsStategy1FirstRobot2017.xml
      • goals list
        • name
        • points
        • time to execute
        • actions list
          • pythonMethod moveToElement
            • argument1 name=BlueStartingArea
            • argument2 speed=0.5
          • onError
            • actions closeLeftStorageDoor
        • conditions list
          • or/and
            • variable
              • name leftStorage
              • condition notZero
    • robot FirstRobot2017.xml
      • name FirstRobot
      • class FirstRobot
      • radius 175mm
      • startingPositions
        • name Blue side start position
        • color blue
        • x, y, angle
      • boards
        • name movingBase V1
        • function movingBase
        • communication serial
      • equipments
        • name LeftStorageUnit
        • type variable
        • value 0
        • max 5

        • name Front IR sensor
        • type telemeter
        • id 0
        • x, y, angle In the robot

Customize

All the used (xml) files are declared in the main.py file. It is also where they are loaded and used by the IA. The main.py file is self documented.

Creating a new map

All the previous map.xml files are contained in the corresponding folder. Just duplicate and rename the latest one, and edit the point of interest.

Creating a new Robot

To create a new robot, just duplicate a modify an existing robot file, and implement a class which inherits from the actual Robot.py class. It will contain all the custom functions of your robot like openLeftStorage, moveRoboticArm, startCollectedObjectSorting and so on. The default Robot.py class handles the more shared functions like moveToXY or waitForStartSignal. The name of the robot your xml file will be used to fing a corresponding python class. The default robot class will be loaded if not found.

name=myRobot in robots/myRobot.xml will load robots.myRobot.MyRobot from robots/myRobot.py

Creating new goals

To create a new goal file, just duplicate a modify an existing one. Since it will be used with your own robot class, you can use your own robot functions and the ones from the root Robot class. You can also use conditions on the variables (storageLocations) on your robot.

Interfacing with your hardware robot

Your robot.xml file list the boards connected to it. It can use the default existing ones like controlPanel, movingBase, or collisionDetector. The IA will look for these boards to execute the movements and recieve signals.The communication protocol is described in each files and in the root board.py.

Feedback

Please write an issue if any bug is found or if you want to discuss about an implmentation. Notice that the project is still under development (june 2017).

ia_robot's People

Contributors

nesnes avatar koisell avatar

Watchers

James Cloos 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.