You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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).

The code for the camera system is already inside all the computers. Remember that you have to select "user" to enter correctly in computer 0. You will find the folder "camera_programs" on the desktop and then all the code used in different project.

The code for the cars is already there as well. The folder is ~/Desktop/brainstem/aProject/Disturbance_carx where x is the number of the car. Since the code is working well, if you need to make some changes please think about them carefully, specially if you are going to change the coefficients of the control system.

If you need to replace some hardware parts, they are in the cupboard near the windows. You can find there new brainstem modules, new H-bridge, cables, etc. There are a lot of electrical components and new batteries too. A new car has also been bought to have new plastic parts for the cars. To avoid breakage:

1. Follow the instructions to turn on the cars (ALWAYS).

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+Documentation) directly so I am using this section to add changes.

1. TEA FILES. You don't have to compile the library RoboCar_Lib.tea and you don't have to load it in 4 2.

2. NEW CAR MOTOR SETTINGS (car 4, 5, 6). I put the videos for this in the dropbox.

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

INFORMATIONS ABOUT THE PROJECT

The paths in this project are stored in fig8AL.txt, fig8CL.txt and fig0.txt. There 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 paths. At each normal time-step, if the future positions of the cars are safe, then the cars are moving normally at the constant speed we have set. Note that this does not effectively keep the car's speed constant throughout the run because 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.

  • No labels