Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WHERE IS ALL THE STUFF

There is a dropbox on the computers with all the project files. The dropbox account is delvecchiodropbox@gmail.com with password delvecchio. You can also find all the TEA files (Brainstem folder) used in all the projects in this lab. If you need to find something else, the best way to it is to turn on the old computers: they have a lot of files used in the past. If you need to change something inside the TEA files, please talk with Domitilla first. If your changes are not correctly, you can burn the components (brainstem and h-bridge).

...

2. While you are running the experiments, look at the computers that runs the CPS for the camera system so you can stop the run if the tracking has been lost. If you don't do it, the car will hit the wall.

LAB WIKI CHANGES

I cannot edit the lab wiki page (https://wikis.mit.edu/confluence/display/DelVecchioLab/Lab+DocumentationImage Removed) directly so I am using this section to add changes.

...

3. LINKS. You cannot access to all the links in that page, so you probably find a way to do this.

INFORMATIONS ABOUT THE PROJECTunmigrated-wiki-markup

The paths in this project are stored in fig8Ain fig8AL.txt, fig8CL.txt and fig8Bfig0.txt. (Note: there may be different versions of these; the correct one should have 1327 2307 as the first line in fig8A.txt.) Also, I have been using fig8C.txt, which is fig8B.txt backwards, because there are issues with the positioning system switching between cameras in one direction but not the next. Supposedly, the corrected data in myStances\[\] is used for the path follower for better individual accuracy to follow the paths, while carStances\[\] contains the "official" positions of all the cars, so that they all use the same data in their path-following algorithmThere are two different versions of these files. The first one is used by the cars and contains only 10-20 points. This has to be placed in the folder ~/Desktop/brainstem/aDebug/aUnix/i686 of the car (they are already there, but if you need to do changes remember this) and it is used by the car to decide the steer value needed to follow the path. The second one is used by the CPS (camera program) and it is used to project the x-y measurement into a 1D position. This files has to be placed in the CPS folder (for example ~/Desktop/camera_programs/LeoCPS_3 of all the computers) and it contains a lot of points, about 1000, so that the projection is good and precise.

In the current code, the cars start moving along the two paths. At each normal time-step, if the projected future positions of the cars are safe, then the velocity controller sustains the car's speed cars are moving normally at the speed measured throughout the past time-stepconstant speed we have set. Note that this does not effectively keep the car's speed constant throughout the run , but it keeps the normal acceleration close to 0, which is all that is needed. Also in each time-step, the positions of the cars are projected 1 sec. forward, and the code checks whether the projected positions are in the capture set. If so, the supervisor finds an acceleration for the current positions. If the supervisor cannot find a solution for the current positions either (which shouldn't happen in theory in an ideal situation, but during a real experiment the position of the cars can jump suddenly into the capture set), then the supervisor uses the previously found solution.Still to be worked on: any better way to handle situations in which the cars suddenly jump into capture set? Currently, it seems that the capture set changes rapidly, because the measurement of speed is not precise and jumps a lotbecause we are controlling the linear speed that is low during the turns. If the future positions are not safe, the supervisor finds an acceleration for the current positions and use it. At the moment, everything is made by a trajectory tracking controller that guarantees that the position of the car will be inside the to bounds used to schedule a solution.

TO RUN THE CODE

Currently the supervisor works on three cars, Car 1, Car 2 and Car 3. Car 1 carries Car 6's symbol, whose white background makes it easier for the positioning system to track, the other two are using the right symbols. To run the code, first start the CPS on the three camera computers. For this project, use LeoCPS_3 on the camera computers.

You can access the car using Putty on the laptop (all the cars are already configured, you just need to select the right one and digit the username and the password). If you have a mac, you can access to the wireless connection eecs4315 (you can find the password on the lab wiki), and from the terminal type ssh root@192.168.1.10x. Insert the password and you are ready to go. Since you need to control all the cars at the same time, my suggestion is to download csshX that allows you to control all of them at the same time, but this is up to you.

Then on the cars, go to ~/Desktop/brainstem/aProject/Disturbance_carx (x is the number of the car) and type "make clean" followed by "make new" to compile the code into the directory i686. There is a symbolic link to i686 in the home directory; go there (~/Desktop/brainstem/aDebug/aUnix/i686) and type ./ca <path filename> to run the code. The file is fig8AL.txt for Car 1, fig8CL.txt for Car 2 and fig0.txt for Car 3. The cars need to start on their respective paths (they can start anywhere on the path, but they need to be in the right direction and it is better to start in the straight line because the steering control will start after few seconds, so the risk is to see the car go straight). After you lunch the program, press S on the keyboard to enable the supervisor control.

PLEASE NOTE THAT you can make Car 1 run in the fig0.txt, that is not a problem, but you have to change the CPS code before! To do this, just open the project in the folder, select main.cpp and the change the array that contains the paths. REMEMBER that since Car 1 uses Car6's symbols, you have to change also the path for Car 6. You don't need to do this for the other cars.

C CODE

The C code is made by different functions. All the files should be well commented, but you can refer to Kevin's page to have an idea of what everything does.

TEA FILES

In my project I am using a new TEA file which sets directly the PWM. So the main difference is that you won't find in my C code the variable 'throttle' and in my TEA files the dynamic maps. If you need to use them, you can find all the TEA file in the dropbox folder.

CPS CODE

Again, this is made by different function. I used for a while Kevin CPS but then I modified something in the projection to have it correctly. Also care that in Kevin CPS folder you will find the old .txt file with just 10 point, but to have a better projection you need a larger number of points.