Team Six/Journal

From Maslab 2015
Jump to: navigation, search

Janky.jpg

Contents

Day 0, Jan 5

    • Successfully located the third floor of the IDC building and created this wiki page.
    • Set up our Edison board and created a playing field in Solidworks.
    • Github repo created.

Day 1, Jan 6

    • Members received shop training.
    • Basic prototypes of ball collection mechanisms.
    • Work with OpenCV

Day 2, Jan 7

    • Everything is broken
    • Board is broken
    • Power Supply is broken
    • Multimeter to test power supply is broken
    •  :(

Day 3, Jan 8

    • Everything is still broken
    • Test some sensors with an arduino.
    • Create a makefile that can compile all code together
    • Play with opencv
    • Cads cads and prototype

Day 4, Jan 9

    • Board is still broken
    • Ultrasensor,motorcontroller, short IR, ultra short IR tested!
    • All the wires are a mess. Lets try to standardize them. Red power, *black* ground, *Blue*/purple signal (Sensor ->Board) in, *white*/gray signal out (BOARD -> sensor)

Day 5, Jan 10

    • Board is still broken
    • Saturday!! We had pizza at the lab
    • We discuss the organization for the code.
    • Motor encoders tested and functional!
    • Wires are kinda organized

Day 6, Jan 11

    • Sunday. No Lab today. People coding alone.
    • Skeleton code!

Day 7, Jan 12

    • WE GOT THE EDISON BOARD
    • Strategy meeting with the staff!
    • Code architecture meeting with the staff!
    • New ideas about how to lift the blocks: Use only one movement! No need to lift and then spin
    • First prototype of the top sorting mechanism!
    • Code for the ultrasonic sensor and IR sensors pretty much finished.
    • Most of the electronics have very neat wiring now.
    • Multithread seems to be a real possibility now!
    • We can calculate our distance to a wall using the camera!


Goals for the next couple of days:

    • More prototypes
    • Finish PID control, and sensors, and change code from arduino to C++
    • Bring in cookies sometime

Day 8, Jan 13

    • GOT THINGS DONE!

CODE:

** All sensors code written(except color sensor, because we don't have it yet)

    • A sensor module thread written!
    • Simple PID written!
    • PwmUtils written!
    • Simple motor class and actuator written

Mechanical:

    • Worked on a 4 bar linkage system for the robot arm
    • Decided positions of the sensors
    • prototyped sorting mechanism

Day 9, Jan 14

** Gyroscope is working!

    • Prototorotypes of the sorting mechanism and columns
    • Proportional control for speed written, tested and discarded
    • infinity bugs everywhere fixed
    • Cleaned up the code for image processing!
    • Exited the lab at 1:45

Day 10, Jan 15

** Driving mechanism works!

    • Torque limiter for the wheels written, so that they don't slip
    • Integration of encoders with driving to tell distance
    • Test of proportional and derivative gains
    • Drive in a straight line!
    • The robot can now go backwards
    • Angle precision of ~1 degree on the driving code
    • Threshold for the minimum pmw for the motors, so that they can always move
    • Angle error tolerance and position error tolerance
    • Learning how to use the color sensor

Day 11, Jan 16

    • Encoders now give the distance in inches
    • Gains independent of the size of the wheeels
    • Antisocial robot test written.
    • The robot can go backwards!
    • Learning how to use the color sensor

Objectives for the day: Get the color sensor working Add a state machine to the motorscontrol to have a limit in what can be the angle of turning when it is moving Add way points on the motorcontrol code (using relative radial coordinates) Play with localization code

Day 12, Jan 17

** Prototype of the collection and sorting mechanism working. We collected our first block

    • Nice precision when driving: wheels don't slip. We have a 5% precision when moving a certain distance (2 inches in 50)
    • Start of the localization code: we have a map class that represents the positions of walls, blocks, etc.
    • State machine design defined!

Day 13,14,15, Jan 18,19,20

We forgot to write in the journal, so those three days are together

** We have our first version of the final robot, so we can test our algorithms on it

** Computer vision code integrated with the rest of the code, in its on thread (it still has many bugs)

    • Better defined the map class and how to do the localization code
    • Discussed the planning code
    • State machine and procedures are already done; We have to improve the logic decisions and calibrate the robot
    • Simple procedure for wall following with proportional gain on the tangent of the angle written and tested
    • Procedure to collect blocks written (not tested)
    • Procedure to go to block written (not tested)
    • Discovered that the servos + sensors +servoshield pull a lot of current. We have to use 2 dc converters to 5v.
    • Wires better organized, but we are still deciding how to make the wiring neat.
    • Decided to write log functions to better debug the robot (not written yet)

Day 16, Jan 21

    • Map class created and debugged
    • Logger created
    • Computer Vision code being tested
    • Gyroscope broke
    • Fuse blew up (we are drawing a lot of current to the servos + motors.
    • Better wiring
    • Discussing particle filtering
    • Procedures still not tested (robot constantly breaking) :(
    • git ls-files | xargs wc -l --> 6040 lines of code already written. We will probably have more than 7000 in the end of this week
    • Discussing other prototypes to get the blocks

Day 17, Jan 22

    • We collected blocks! The procedure to collect blocks is half reliable at the moment
    • We found cubes and drove to the cubes!
    • Failed at wall following: we are using long range IRs when we should be using short Range. Will be fixed.
    • Nothing throws exceptions anymore. All the code is functional together.
    • We have to change our long IRs to short IRs

Day 18, Jan 23

    • Wall Followed!
    • Went to point!
    • found cube nicely!
    • dynamic turning!
    • Follow cube!
    • Got LEDs from miters!
    • Packaging tape!

Day 19, Jan 24

    • Made a color sensor
    • Discovered bugs on the camera
    • improved camera
    • got some blocks
    • improved wall follow
    • implemented particle filter
    • implemented dead reckoning on the particle filter
    • Cut pieces of the robot

LAST DAYS (20 - 24; Jan 25 - 29)

We forgot to write on the journal.

Jessie and Ivan slept in the lab 3 nights in a row. Fisher pulled one all nighter.

Working on the robot all the time.

Servos broke. Servos fixed.

Color sensor unreliable, arduino+color sensor reliable.

Memory bugs, strategy bugs, etc. Fixed.


infinity amount of timeouts in all procedures, to never ever get stuck doing anything, not even circular stucking doing a limited set of things.

New camera working, calibrated and great.

Particle filter written and tested: unreliable or slow. Not going to be used (many many lines of code)

Maps and planning written and tested: depends on particle filter. Not going to be used. (so many lines of code)

Code for procedures got a lot messier with all the timeouts, but more reliable.

Increase speed of wall follow, increase speed of collecting blocks, stop to take better non blurred images, etc.

Working on purple line detection.

LAST DAY 25; Jan 30

We fix lots of bugs. We fix the wires. We didn't finish witting the purple line aligner to get 4 times more points... So we had to give up on this. The robot starts attacking the yellow platforms, but Jessie promptly fixes that.

We win first place!


Final code:

    • 8237 lines running in the robot.
    • 3997 lines of code related to planning and mapping not in use.
    • ~300 lines of arduino sensors test code
    • Many lines of code for purple line detection not in use.

Organization of the final code:

    • Threads: 2 for the encoders. 1 for the motors control module. 1 for the servo control module. 1 for the actuators and servo shield communication. 1 for image processing. 1 for the logger. 1 for the state machine. 1 for the color sensor running in an arduino.
    • Code sections: sensors, actuators, imageProcessing, loggers, high level decisions.


JANKY, THE COCOABOT

Janky.jpg

Personal tools