Git Product home page Git Product logo

antix's Introduction

STARTING THE SIMULATION
======================================================================


SCRIPT RUN SEQUENCE
======================================================================
     1. Change directory to Controller/
     2. Fix the settings in configuration.py to the proper values.
     3. Make sure you have the following files:
        - grid.config
        - drawer.config
     4. See below for how to format these files.
     5. Command for running everything:

     python controller.py SFU_USERNAME PATH_TO_ANTIX grid.config drawer.config

     The output for remote processes is piped to ~/antix.machine_name.out, and to ~/antix.nameX.out for local processes.

     6. When you want to kill all the processes on every machine, run:

     python killthemall.py SFU_USERNAME

     Note: To see output from individual processes in your home directory (in files called antix.machine.out), you must disable stdout buffering. Add the following line to your code, somewhere near the top:

     setbuf(stdout, NULL);

MANUAL RUN SEQUENCE
======================================================================

  1.) Clock
  2.) Grid Servers
  3.) ControllerClient
  4.) RobotClients
  5.) Drawer



    RUN: Clock
    ======================================================================

      Description: 

	  The clock helps keep the simulation in sync.

      How to: 

	  ./clock.bin -p {{port}} -c {{# of robot clients}} -g {{# of grid servers}}

      Configuration file:

	  None.


    RUN: Grid Servers
    ======================================================================

      Description: 

	  The grid servers are the robot's playing field.

      How to: 

	  ./grid.bin -f {{config file}} -p {{port}}

      Configuration file:

	  NUMBER_OF_TEAMS {{integer}} # Required: specifies the number of teams on the grid
	  ROBOTS_PER_TEAM {{integer}} # Required: specified the number of robots per team
	  CLOCK {{IP ADDRESS}} {{port}}
	  NUM_CLIENTS {{integer}} # Required: specified the number of robots clients


    RUN: ControllerClient
    ======================================================================

      Description: ControllerClient

	  The ControllerClient regulates the simulation

      How to: 

	  ./controller.bin -f {{config file}}

      Configuration file:

	  HOME_RADIUS {{float}} 
	  WORLD_SIZE {{integer}} 
	  NUM_GRIDS {{integer}} 
	  PUCK_TOTAL {{integer}} 
	  GRID {{IP Address}} {{port}}
	  CLOCK {{IP Address}} {{port}}


    RUN: RobotClient
    ======================================================================

      Description: RobotClients

	  The RobotClients are the clients who will take part in the simulation.

      How to: 

	  ./robot.bin -f {{config file}}

      Configuration file:

	  GRID {{ID}} {{IP ADDRESS}} {{port}}
	  CLOCK {{IP ADDRESS}} {{port}}
	  INIT_GRID {{ID}} # will request a team from this grid


    RUN: Drawer
    ======================================================================

      Description: Drawer

	  The Drawer is responsible for taking the information passed by the GridServers and drawing them.

      How to: 

	  ./drawer.bin -f {{config file}}

      Configuration file:

	  WINDOW_SIZE {{integer}} 
	  WORLD_SIZE {{float}}
	  HOME_RADIUS {{float}}           
	  ENABLE_FOV {{ 'T' or 'F' }}
	  TOTAL_NUM_TEAMS {{integer}}
	  TOTAL_NUM_ROBOTS {{integer}}
	  TOTAL_NUM_PUCKS {{integer}}
	  [ FOV_ANGLE {{float}} ]
	  [ FOV_RANGE {{float}} ]
	  GRID {{id}} {{IP ADDRESS}} {{port}}

antix's People

Contributors

teebs avatar hora avatar tedtate avatar elcurto99 avatar rtv avatar leifstroman avatar cynlee avatar jansepar avatar hardeep avatar

Stargazers

 avatar  avatar  avatar  avatar Team Horseplay CMPT 431 avatar  avatar Steve Gill avatar  avatar  avatar

Watchers

 avatar Corey Baker avatar  avatar Team Horseplay CMPT 431 avatar  avatar  avatar  avatar  avatar

antix's Issues

Drawer SegFaults after being pushed Robots from GridServer

FILE_PARSER STATUS:  Handeling line GRID 1 127.0.0.1 10000
PARSED: GRID ID 1 with IP 127.0.0.1 and PORT 10000
CLIENT STATUS:   Connection to host:127.0.0.1:10000
send left = 0
FILE_PARSER STATUS:  Handeling line GRID 2 127.0.0.1 10001
PARSED: GRID ID 2 with IP 127.0.0.1 and PORT 10001
CLIENT STATUS:   Connection to host:127.0.0.1:10001
send left = 0
FILE_PARSER STATUS:  Empty line read 
nfd: 1
MSG_GRIDTEAMS: Expecting 1 teams.
Team: id=0  x=588.000000    y=127.000000
MSG_GRIDTEAMS: Finished.
Segmentation fault

Team Colours not displaying in Drawer

Robots need to draw with their team colors
Home locations need to draw, with colors, they also need to be more distinguishable from other robots.

Pucks are being identified as Robots on the Drawer

Object: id=1000001 x=8.722433 y=8.684833 angle=0.000000 puck=0
Object type=0, id=1000001
Robot doesn't exist at 1000001
Object: id=1000002 x=1.043242 y=3.789894 angle=0.000000 puck=0
Object type=0, id=1000002
Robot doesn't exist at 1000002
Object: id=1000003 x=2.536704 y=5.029928 angle=0.000000 puck=0
Object type=0, id=1000003
Robot doesn't exist at 1000003
Object: id=1000004 x=6.012843 y=0.749733 angle=0.000000 puck=0
Object type=0, id=1000004
Robot doesn't exist at 1000004
Object: id=1000005 x=7.561574 y=0.411881 angle=0.000000 puck=0
Object type=0, id=1000005
Robot doesn't exist at 1000005
Object: id=1000006 x=3.195589 y=3.369955 angle=0.000000 puck=0
Object type=0, id=1000006
Robot doesn't exist at 1000006
4760: robots=100 pucks=6.

GridServer is not updating positions on robots sent to the Drawer

Grid Sends:
Object: id=1 x=6.190003 y=1.122271 angle=0.000000 puck=0 grid=512

Object: id=1    x=6.190003    y=1.122271    angle=0.000000    puck=0    grid=512

Object: id=1    x=6.190003    y=1.122271    angle=0.000000    puck=0    grid=512

Object: id=1    x=6.190003    y=1.122271    angle=0.000000    puck=0    grid=512

Drawer Receives:

4757:   Expecting 106 objects.
Object: id=1    x=6.190003  y=1.122271  angle=0.000000  puck=0
Object type=0, id=1

4758:   Expecting 106 objects.
Object: id=1    x=6.190003  y=1.122271  angle=0.000000  puck=0
Object type=0, id=1

4759:   Expecting 106 objects.
Object: id=1    x=6.190003  y=1.122271  angle=0.000000  puck=0
Object type=0, id=1

4760:   Expecting 106 objects.
Object: id=1    x=6.190003  y=1.122271  angle=0.000000  puck=0
Object type=0, id=1

SegFault on GridServer @ gridGameInstance->getRobots(l_Team, l_robots);

After connecting Clock, GridServer and RobotClient, GridServer thows segfault at:

gridGameInstance->getRobots(l_Team, l_robots);

Parsing file
Handeling line NUMBER_OF_TEAMS 1
Entering handler
PARSED: Number of teams: 1
Handeling line ROBOTS_PER_TEAM 10
Entering handler
PARSED: Robots Per Team: 10
Handeling line ID_RANGE 1 1
Entering handler
PARSED: ID Range from 1 TO 1
Empty line read
hasrange=1 hasnumteams=1 hasperteam=1
Attempting to create a server socket on port: 10001
Server initialized and listening on port: 10001
A client connected.
3, 2
ts
Segmentation fault

2a3cc33#undefined

Homes can overlap

Needs RS clarification: The home base of different teams can overlap. Is this a bug?

As a side note, I don't think this should affect anything other than AI strategy, so it's not that big of an issue (yet).

Controller Script needs to distribute GridServers/RobotClients smarter

The Controller Script needs to launch a GridServer on a Host, then launch a RobotClient on the same Host and let that RobotClient take control of teams in the local Host's GridServer.

This will allow us to better utilize the machines in CSIL, as GridServer is CPU bound, and RobotClient is IO bound. This way, due to Robots being attracted to their home locations, RobotClient to GridServer communication will be done through IPC instead of LAN.

RobotClient stops execution

RobotClient fails to continue execution after this line:

unsigned int l_MessageSize = l_Robo.size*l_NumRobots.msgSize;
printf("%ui\n", l_MessageSize);

About to readfile
Parsing file
Handeling line GRID 1 127.0.0.1 10002
Entering handler
PARSED: GRID ID 1 with IP 127.0.0.1 and PORT 10002
Connection to host:127.0.0.1:10002
Handeling line CLOCK 127.0.0.1 10003
Entering handler
PARSED: CLOCK with IP 127.0.0.1 and PORT 10003
Connection to host:127.0.0.1:10003
Handeling line INIT_GRID 1
Entering handler
PARSED: INIT_GRID with ID 1
Initializing a new grid.
send left = 0
Handeling line INIT_GRID 1
Entering handler
PARSED: INIT_GRID with ID 1
Initializing a new grid.
send left = 0
Empty line read
Done reading files
Handling file descriptor: 5
Received message 24 from 2
Receiving robot ids and positions for a team.
Expecting ids and positions for 6723 robots.
80676i

Drawer throws Segmentation fault

When the total number of robots/pucks exceeds 30000.

Scenario 1: glibc detected
Scenario 2: new robots and pucks before receiving messages, "stack smashing detected"

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.