Sunday, April 19, 2015

Week 14

The Robot: Constructed but still being programmed
This week, Trent Wargo was working on assembling the electronics on the robot. The smaller Jupiter battery now powers the electronics tower which provides power to the Beaglebone and mini box. All connections are secure and working to power both of these devices. The larger NAPA battery now powers the H-bridge, logic boards and both motors. All power switches will be attached to the outer shell to be accessed by the outside. For this reason, Trent has installed several Anderson Plugs that are capable of handling high current and can be disconnected in order to completely remove the outer shell with the electronics reaming attached to the shell. Trent intends to continue interfacing the electronics with the robot.   


For the last two weeks Haris has worked on parts of a Calibration code in MATLAB. This code will not autonomously calibrate the cameras when they are moved from their initial position with reference to the robot, however, this code is simple enough to input a set number of measurements for where the camera is in terms of x, y and z coordinates with respect to the robot and the selected marker point in the registered images.



Derivation of PNP for vision system
Haris has applied different inputs for the testing phase and tried computing the vectors and transformation matrices with different unit measurements of length. It appears that in the original code the number of cells of the images taken for the calibration test were incorrect. The newer version of the code is within ten percent of error when calculating the distance of the vector aligning the measured features. Dr. Isenberg is suggesting refining the code to compute all vectors and angles to be within one percent of marginal error.

Gabe spent the week completing the localization method for the vision system. The program is now capable of determining the robot's distance from the edge of any given sidewalk to within an accuracy of about 0.5 inches.

Gabe will spend the next week implementing the vision system with the rest of the control system and hardware.

Brigette helped integrate the odometry code with Karl. She designed a PCB that will be used to mount the decoder chips along with the necessary logic to make the decoders work. She aided Karl is developing code where she could. Also, she looked into possible solutions to get the GPS and IMU integrated into the system. She and Trent Wargo checked out a small, accurate IMU and GPS unit from Dr. Bruder and she is looking into possible solutions to integrate the data taken from this more accurate unit, into the current control code.

Karl  was responsible for verifying the output of the odometer, when tested on Tour-PNADDER itself. Originally, the odometer was set up  to simply reset once the encoder’s count limit was reached, and subsequently rolled over. Karl ensured that the count remained continuous as soon as a roll over was detected. He has also tested PWM output to the h-bridges, which was met with success. As such, he is now incorporating pwm signal change into the system, to ensure that the pwm signal is modified as the minibus server code sends new values

Here are some pictures of the work that we have done.


Shell with control panel and speakers

Shell: Before Sanding


Motors and Power and Control Circuitry

Electronics Housing

Interface area composed of tablet and speakers

Sunday, April 12, 2015

Week 13


Over the course of the week, Karl researched and tested creating a threaded server, capable of connecting to multiple clients, and differentiating the data those clients are sending/sent. By the end of the week, a successful system was implemented with test code. With this capability, having a threaded server running running in the main script, on the minibox, will now be able to connect to both clients managing the individual decoder data, as well as the client running on the tablet. Karl also tested the odometry on the robot itself, demonstrating that values were being returned sequentially. A small bug needs to be addressed, however, considering the values returned were slightly shifted from their true values. 


Gabe spent the week finalizing camera localization. The Vision System is now capable of determining the distance and orientation of the robot from the edge of the sidewalk. Gabe will spend the next week preparing the system for full integration with the robot and other control and sensor systems.

This week, Trent Wargo has been working on the power supply system. He has been able to assemble several PCBs and stack them together into a tower type assembly. With the tower fully assembled, the minibox, Beaglebone, fans, encoder/decoders and other electronics can now be successfully powered with the on-board batteries.



This week Brigette had a breakthrough with the H-Bridges. She got a set of H-Bridges and Logic-Boards working and wired together. The H-Bridges are now mounted to the chassis and fully functional. The robot took its maiden voyage this week and successfully went forward and backwards using an Analog Discovery to send a single PWM and direction signal to the logic boards. Within the next few weeks she anticipates helping with the odometry, IMU, and software control system. 



This week Harris has figured out the proper format of the equations that are used in the camera calibration process. His MATLAB code will be refined and completed by the beginning of next week. The parameters being solved for must then be implemented into a simply Python code which will give Gabe the x, y, and z coordinates of the vector that translates the camera frame to the ground’s frame along with the rotation angles of the transformation matrix of the camera.

Jaya and Jason spent this week assembling the individual pieces of the foam shell, and sanding/filling the surface to represent the desired shape. Once the necessary supplies are in, they will layer fiberglass, using a wet layup technique, overtop the foam.


Sunday, April 5, 2015

Week 12

The Primary Chassis
In the past week we have received what will hopefully be our interfacing tablet. Karl has been researching how to interface the table with the minibox, so that it can serve as the user console to control desired position of the robot, and to start and stop the program itself. Karl also helped Tanner become familiar with the currently developed code(s) and the projected system flow, so that he could begin putting every thing together appropriately. The decoders were causing a lot of problems, so not much progress has been made it that department, but Gardner did return on Friday, and thinks to have fixed whatever the bug was. Hopefully now,  proper testing of the odometry can be conducted. 


This week Brigette has been sick but still put effort into debugging the H-Bridge. She redesigned the Logic board and had that printed. The logic board is now consistently outputting the correct data values. She also redesigned the H-Bridge and had that printed. After soldering the new H-Bridge components together, the motor is spinning due to logic from the H-Bridge but there is way too much current being drawn from the supply. She is aiming to completely debug the H-Bridge over the weekend so the team can test the robot software.
Gabe has spent the last week working to implement an alternate version of the PNP localization into the vision system. Currently the system is not performing as expected. The localization is set to be completed on April 6, so Gabe will spend the weekend completing the implementation.




This week Trent Wargo worked on the power supply board and got the prototype working. After completing the prototype, he worked on creating a PCB for the power supply. After the first revision of the PCB was made he decided to split the power supply board into several smaller boards to make debugging easier. He successfully designed the PCBs and is finishing soldering all the necessary components to finalize his design.

Jason And Jaya worked on the shell this week. They used the CAD drawing to measure out pieces of the foam and began to cut the foam into the shape and size needed to make the shell mold. Once all the pieces are cut they began to glue the pieces together. Next is for the shell to be completely glued together and sanded into the final shape. then the wet layup will be applied.

For the last two weeks Haris has worked on parts of a Calibration code in MATLAB

which will not autonomously calibrate the cameras if they are moved from their 
initial position with reference to the robot. However, this code is simple enough to 
input a set number of measurements of where the camera is in terms of x, y and z 
coordinates with respect to the robot and the selected marker point in the 
registered images.     

The first part of the code uses Newton’s method and the raphson method to solve 

for the roots of our roots which are three angle values in our camera transformation 
matrix and three values of x, y, and z components of the translational vector from 
the camera frame to the real world frame. The week before this Gabe and I were 
trying to find a solution for the calibration problem in python but we decided to take 
an easier measure as suggested by Dr. Isenberg which was to use initial 
measurements of the camera with respect to the body fixed frame and implement a 
calibration program just once rather than having the robot autonomously calibrate 
the camera every time the robot is powered up.

Sunday, March 29, 2015

Week 11


This week Brigette submitted the revision 2 PCBs and printed the H-Bridge and logical boards. She soldered all the components onto the PCBs and then began testing. There are flaws with the H-Bridge PCB and the logic PCB. This week has been completely utilized towards debugging the PCBs. She is not completely aware of the problem with the boards right now but is working hard to make sure they are up and running by the end of next week.




Trent Wargo was assisting Brigette Cochran in working on the H-Bridge. After spending several hours trying to debug the H-Bridge and logic board, Trent moved back to working on the power distribution circuit board that he had already been working on. By the end of the week, Trent had a PCB design created with Eagle and sent his design to Jim Weber to be printed. Next week, Trent plans to have parts implemented in the power distribution circuit board to begin testing the PCB.


The computer vision team is now trying to combine Gabe's current algorithm with a camera calibration program. Harris is currently writing a MATLAB code that can solve for the values of the transformation matrix and the translational vector of the camera plane to the real world plane, RRrc. After this Gabe will utilize the following code to complete the required tests.


Monday, March 23, 2015

Week 10

This week Brigette worked on finalizing the second revision of the PCB. Jim was trying to get the PCB mill up and running so she also started and completed the first revision of the Logic board to be utilized in conjunction with the H-Bridge. After the PCBs are completed next week she will run a continuity test and solder on the necessary components to each board. This will allow the mechanical and software teams to plug into the robot and begin final phase testing. This week she and Trent wargo also finished the final testing document for the H-Bridge to be submitted to Dr. Mangum and Dr. Isenberg this Monday.

This week, Trent Wargo has been working on the Linear Power Supply circuit. The circuit is designed to have a 12V input and linearly regulate a 3.3V, 5V and 12V output to be used by other electronics. A prototype has been built and tested. The final step for completion of the Linear Power Supply circuit is to have it implemented as a PCB. 

Gabe has spent the last week and spring break putting the final touches on the vision system. He has nearly completed final testing. Thus far the system seems to maintain an accuracy of approximately one inch. Gabe will be completing a test document for the system over the weekend. After that Gabe will be working with Harris to complete the PNP calibration script.
Gabe and Karl have also worked to create a remote desktop between the minibox and an android tablet to create a user interface.

This week, Karl continued his work towards establishing a socket network between the minibus computer and the beaglebone black micro controller. After consulting with a few Dr. Isenberg and Dr. Davis, the bug in the prototype code was resolved and a line of communication was established Friday afternoon. The decoder input program written by Trent Gardner was slightly modified to calculate the decimal value of the decoder output. With both these pieces working, progress towards establishing an odometer and position generator for the robot are making rapid headway. 

This week, Jaya finished writing the test document for the controller to be used by the robot. Net week Jaya will convert the controller code from MatLab to Python while Karl works on connecting the minibus to the beaglebone black micro controller. After that is done, Jaya will write the real control program that will be used by the beaglebone black. 

Sunday, March 15, 2015

Weeks 8 & 9

At the beginning of  week 9, Brigette Cochran and Trent Wargo completed testing and analyzation of the H-Bridge prototype. Brigette will continue with the H-Bridge until its final completion. She is currently constructing a PCB design for the H-Bridge using EAGLE. Upon completing the design in EAGLE, it will be printed on campus with the PCB mill. The PCB for the H-Bridge is in the final stage of design in Eagle so it should be printed over spring break. 

Trent has moved on to a different area of design and has begun to create a circuit that will serve as the 3.3, 5 and 12 volt power supply to be used by the various electrical components. The power supply will receive its input power from the Jupiter 12 volt battery which with be passed into several parallel linear voltage regulators. The regulated voltages will be passed into a relay circuit that can be activated by the Beaglebone. The power supply design has been designed and the schematic has been drawn. More testing and development will be done in the near future.

For week 8, Gabe was able to complete rough outs of all vision system components. The program he has created is capable of detecting the edge of the sidewalk reliably.
He will spend the next couple of weeks increasing the robustness of the program and completing testing of the localization abilities of the system. Gabe intends to have the vision system completely finished and verified by March 16. After that point he will be working to integrate the vision system with the other sensors

For week 9, Gabe spent this week finalizing a usable draft of the vision code. His code is now capable of determining the camera distance from the edge within an accuracy of about half an inch. He also has set up a series of test grids and lines that will allow him to perform final tests to verify the system accuracy and write a report on its performance.

Week 8, Harris was trying to calculate the camera position and pose in real world
coordinates.  An eight by eight grid map was drawn and registered into the camera
feed. Three image points were chosen to match the object points of the grid map.
The H homography transformation turns all the real world coordinates into image
coordinates. However, a stipulation in the python code is matching the image
coordinates with the real world coordinates incorrectly. Once this code is refined,
the camera matrix can be entered by using translation and rotation matrices and
will be able to output the camera position and pose. The only problem that can be
foreseen is entering the translation and rotation matrices incorrectly into the
program or solving them with a minor math error in the calculations.
Starting next week , Harris hopes to apply this program using the Tour PNADDER as
the inertial frame and make changes accordingly for the minor tests.

Week 9,  Harris was able to translate real world object points into image points
and translate between them in a Python code written from scratch. The eight by
eight grid map was registered into an image feed using OpenCV in Python and
random object points were selected to be translated and outputted as image points.
The translation from object points to image points has become more accurate and
will help with the camera calibration program. However, when the camera was put
at an angle greater than twenty degrees the outputted angle was incorrect. This will
have to be fixed within the next week.

Week 9,  Jason measured the robot and started to design the outer shell. Using the measurements, he made a model of the shell using CATIA. He also designed a way to attach the shell onto the base platform. Finally, Jason looked into the use of foam and the methods of working with foam for how to build the shell. 
Next week Jason plans to get the foam and start measuring and cutting the foam to create the mold for the shell. He plans to have the mold finished by the end of the week after spring break.

Week 8, Tanner was trained on how to use the lathe and milling machine, Using these machines he was able to turn down shafts to fit encoders. He was aslo able to use the millin machine to fabricate the tensioner for the chains. 
Week 9, Tanner started making final touches on the drive systen and was able to size, cut, and tension the drive chains into place. After a test run with attaching the motors to a power supply it was seen that the Nomex Honeycomb composite used for the base of the rover did not posses the strength to hold the drive system sturdy. Tanner will be fabricating a couple alluminum parts to make up for this issue in the next week. 


Sunday, February 22, 2015

Week 7

This week, Wargo and Brigette continued to refine their work on the H-Bridge. All of the testing documents were completed and ready to turn into Dr. Mangum on Monday. PCB development for the H-Bridge will also begin Monday.
The testing documents included a current limit test and temperature tests. The current limit test was run in conjunction with the component temperature test. An Analog Discovery was used to generate a 5 Volt PWM signal and direction signal. The PWM was set to 1 kHz at 10% duty cycle and the direction signal was set at 1 Hz. Wargo and Brigette took temperature readings on all of the MOSFETs and recorded them in five minute intervals. After half an hour, they stopped the test and let the motor cool down. The test was repeated at a 50%, 75%, and 90% duty cycle. This test concluded that the board will fail before the components reach their current or temperature limits.



The motor temperature test was conducted over a one hour time interval with measurements taken every five minutes. The PWM was set to 1 kHz at 95% duty cycle and the direction signal was set to ground. This test concluded that the motor will need heat sinks to dissipate heat of up to 300 degrees Fahrenheit.


Gabe has spent this week finalizing the generation of a trajectory from the sidewalk edge data. The vision system is robust enough now to deal with multiple variations in edge landscape on the edge of the sidewalk and still return a viable location of the edge. From that information the program is able to generate a trajectory that the robot can use to localize its position. Gabe is currently working of improving the prediction of the edge so that the robot doesn't “lose” its way if it ever can’t reliably identify the edge.
Gabe is going to continue working on the trajectory and has set up several test videos to do so. From this point on Gabe will strive to develop an x and y output to send to Jaya’s control program. This should  only take a few days since the vision system will function essentially as a line follower for now.

This week, Harris was trying to calculate the camera position and pose in real world coordinates. An eight by eight grid map was drawn and registered into the camera feed. Three image points were chosen to match the object points of the grid map. The H homography transformation turns all the real world coordinates into image coordinates. However, a stipulation in the python code is matching the image coordinates with the real world coordinates incorrectly. Once this code is refined, the camera matrix can be entered by using translation and rotation matrices and will be able to output the camera position and pose. The only problem that can be foreseen is entering the translation and rotation matrices incorrectly into the program or solving them with a minor math error in the calculations.
Starting next week , Harris hopes to apply this program using the Tour PNADDER as the inertial frame and make changes accordingly for the minor tests.

This week, Tanner and Jason applied bondo to the edge of the base platform to fill in the honeycomb and then sanded it down to make the edges smooth. They also keyed a keyway into the sprockets and started to align them. Also, they took measurements and started to make the heat sink and tensioner for the motors.
Next week they will continue to smooth out the edges and fabricate the heat sink and tensioner. Alse, they will be learning how to use the new machine in AXFab to be able to finish modifying the intermediate rod.

This week Karl continued development of a filtration program for data from Tour PNADDER’s sensors. This program will help finalize various gains used in the control algorithms in the system. Dr. Isenberg provided all the necessary tools to both formulate the filtration program and simulate system responses, for the sake of testing the program prior to its use on the actual system. The goal for the upcoming week is to complete these two pieces of code so that Jaya can complete his work on the controller. For this to happen, much of the isolated work done by different individuals will need to come together; properly functioning/measured locomotion system, working encoder/decoder sets, 
and odometer software.

This week Jaya completed the controller for our robot, and managed to enable it to work for voltages between negative 12 and positive 12 volts. Next week Jaya is planning to work with Karl to get the code translated to a python format. Jaya also plans to start replacing test variables in his code with actual values, and if he complete these two tasks he will start working on imputing the controller into Simulink. There shouldn't be any major issues that he will have to face while completing these tasks.

Monday, February 16, 2015

Week 6

This week Karl has created a method for collecting data from a python simulation of the robot's controller, and demonstrating the control of the robot on a the previously simulated matlab simulation animator. By doing this, time does not need to be allocated in determining how to create a similar animator in python.

Karl has also begun organizing a group of functions, provided by Dr. Isenberg, such that they will filter data retrieved by the robot's inputs and outputs (voltages and odometry) and determine the necessary kinematic parameters for the robot. This data will help Jaya complete his controller so that it can then be implemented in python and tested on the real system. While Jaya is completing his work on the controller, Karl will be finishing his work in developing the filtering program.

Gabe and Haris are in the final stages of detecting the edge of the sidewalk reliably. They are now waiting for the platform to be completed in order to refine the filtering based on camera position and robot motion.

In the meantime, the vision team has begun developing camera calibration code and a strategy for implementing the edge detection data into the control system being developed by Jaya and Karl. This will likely result in using the vision system to generate a local trajectory for the robot to follow. Though methods of performing localization with respect to a campus map have been considered.


Tanner and Jason have mounted all the battery mounts, added rubber to them to help secure the battery, and attached the strap that will hold the batteries in place. They aligned and mounted the encoders down to 1/100th of an inch. They have also cut more pieces for the intermediate section and also started to design the heat sink that will act as a tensioner for the motors and chain. Finally, they created a part for Patrick to fabricate.


Next week, Tanner and Jason will design and finish building the heat sink and tensioner. They will also be finishing up the attachment of the locomotion system. They are going to apply bondo to the edge of the base and sand it down to a smooth surface.


Trent Wargo and Bridgette have continued testing and improvement of the H-bridge circuit.

Saturday, February 7, 2015

Week 5

February 7th 2015

By the end of this week Tanner and Jason have successfully installed bearings, aligned sprockets, aligned battery mounts, designed battery strap, glued caster blocks in place, and made cut supports for the bottom of the robot to prevent bending of the base.
Patrick, who is in charge of the machine shop, has finished machining intermediate drive system parts. Next week, this group will hopefully finish putting together the drive system along with having batteries fully mounted in place and will also design and build a heat sink for the motors.

This week Jaya completed integrating the back-stepping control method into an odometry code. Although he managed to get the two control theorems to produce an output, he is currently facing an issue where the robot simulation will follow the trajectory backwards instead of forwards. Next week Jaya plans to have solved this problem and fully completed the controller in MATLAB. A few potential problems that can be foreseen right now are that simply adjusting the gains cannot solve this problem, or that instead of a gain error it is a coding error which is hidden by a small typo or misunderstanding of the material.

The computer vision team, consisting of Gabe and myself, has made enormous amounts of progress but still have many issues to tackle with the OpenCV coding in python. We have applied a simple vertical line-filtering algorithm to a python code that enables the cameras to determine vertical lines in the environment with respect to the video feed that registers. We are currently trying to use a PnP solving method in our code. Applying this algorithm will enable the robot to determine its position and pose based on an initial point in the environment and image feed.

This week Wargo and Brigette continued working on the H-Bridge. They have delayed the PCB production to allow for extra time to fine tune the H-Bridge and make sure that it capable of running at a PWM signal of at least 1kHz. Dr. Isenberg has approved this delay because if the H-Bridge is not fine-tuned the robot will not function even with precise software implementation. Most of the control code is sampling at 50kHz and with a PWM of only 200Hz, as the current design allows, the robot will not be actively responsive to any control software being implemented.
This week the team was able to adjust the original schematic of the H-Bridge and add in diodes to clear out ripple voltages across the MOSFETs. With this new prototype the team will hopefully to be able to increase the PWM signal frequency. Next week Brigette and Wargo will continue testing the H-Bridge at higher PWM frequencies and analyze what the limits of the new design are.

Karl has begun creating various functions in python. First, the odometer function was created and updated, allowing the main program to call it at any point in the running process. Second, some functions such as parameter derivation using the runga-kutta method were also developed in python, for purposes of control simulation. The goal for this upcoming week is to research how to develop plots and animations in python in order to successfully create a simulated robot that will be able to demonstrate the control algorithm being implemented into Tour PNADDER’s system.