Difference between revisions of "RGB Swarm Robot Project E-puck Code (outdated)"

From Mech
Jump to navigationJump to search
Line 25: Line 25:
==Description of the files==
==Description of the files==


* color_cal
===color_cal===
** .c: Does some stuff
* .c: Does some stuff
** .h: Declares some stuff
* .h: Declares some stuff
=====function1=====
does all this stuff
=====function2=====
does some other stuff


* dsPIC_XBeePackets
===dsPIC_XBeePackets===
** .c:
* .c:
** .h:
* .h:


* e_acc
===e_acc===
** .c:
* .c:
** .h:
* .h:


* e_ad_conv
===e_ad_conv===
** .c:
* .c:
** .h:
* .h:


* e_init_port
===e_init_port===
** .c:
* .c:
** .h:
* .h:


* e_led
===e_led===
** .c:
* .c:
** .h:
* .h:


* e_motors_swarm
===e_motors_swarm===
** .c:
* .c:
** .h:
* .h:


* global_vars
===global_vars===
** .c:
* .c:
** .h:
* .h:


* main.
===main===
** .c:
* .c:
** .h:
* .h:


* send_packet
===send_packet===
** .c:
* .c:
** .h:
* .h:


* PI_consensus_estimator
===PI_consensus_estimator===
** .h:
* .h:


* wheel_speed_coordinator
===wheel_speed_coordinator===
** .c:
* .c:
** .h:
* .h:


==Description of the functions==
==Description of the functions==

Revision as of 12:47, 2 September 2009

This page documents the e-puck code for the RGB Sensing Swarm Robotics project. The code on the e-puck was written in C and compiled using Microchip's MPLAB C Compiler for dsPIC DSCs (student version).

This code is a branch of the Swarm Project E-puck Code.

Tasks

Complete

  • Restructured code to make more modular.
    • Split dsPIC_XBeePackets and wheel_speed_coordinator into h and c files
    • Pulled packet assembling code out of main and created send_packet() function in send_packet.h/c.
    • Pulled a bunch of variables and defines (NUM_DATA_SETS, NUMBERS_PER_SET, DATATYPE_BYTELENGTH , DATA_ARRAY_LENGTH , ADDITIONAL_NUMS, notRTS, T1_INT_FLAG, x_i, u_i, w_i, x_sum, w_sum, MAX_WHEEL_V_TICKS, deadband, COMMR, SAFEDIST, MINDIST, u_x_ideal, u_y_ideal, x_motion_integral, y_motion_integral, SQUARE) that were scattered across h files into global_vars.h/c. Makes it easy to include them in a particular file with the extern keyword.
  • Added color_cal() function in color_cal.h/c
  • Added wheelSpeedSingleBot to wheel_speed_coordinator

To Do

  • Finish color_cal
  • Make the vision system position information updater smarter.
  • Replace wheelSpeedSingleBot with the three step move controller from NUtest.c
  • Implement new algorithm


Project Package

The source code for the project is available here:

Description of the files

color_cal

  • .c: Does some stuff
  • .h: Declares some stuff
function1

does all this stuff

function2

does some other stuff

dsPIC_XBeePackets

  • .c:
  • .h:

e_acc

  • .c:
  • .h:

e_ad_conv

  • .c:
  • .h:

e_init_port

  • .c:
  • .h:

e_led

  • .c:
  • .h:

e_motors_swarm

  • .c:
  • .h:

global_vars

  • .c:
  • .h:

main

  • .c:
  • .h:

send_packet

  • .c:
  • .h:

PI_consensus_estimator

  • .h:

wheel_speed_coordinator

  • .c:
  • .h:

Description of the functions