Versions Compared

Key

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

...

  • "Andrea/src": contains the C code divided in 3 folders
    • "Andrea/src/car_src": contains the code specific for the car, the ca2 program (See #CA2).
    • "Andrea/src/sim_src": contains the code of the simulator (See #SIMULATOR).
    • "Andrea/src/util": contains the code shared between the car and the simulator (See #C UTILITIES).
  • "Andrea/scriptscripts": contains all the python scripts that can be used to compile the simulator, identify parameters and debug the experiment (See #SCRIPTS).
  • "Andrea/paths": contains the new paths definition files used by the cars which specify also the steer compensator directives and the path-dependent disturbances functions (See #PATH SPECIFICATION).
  • "Andrea/data": various data gathered during experiments on the test-bed.

...

  • Grouped utility functions in a separate folder that is shared with the simulator. This makes the code more modular.
  • Implemented a new Reimplemented the target detection algorithm so that allow the car to and CPS can work with the path with lots paths defined by a large number of points.
  • Steer controller has been reworked, the monodimensional speed has been substituted by the one read from the encoder, the PD has been calibrated and a path-dependent compensator has been added. The compensator can be configured through the path specification file (See #COMPENSATOR DIRECTIVES).
  • Implemented a new filter for the heading measure to cancel the effect of leaps (See #HEADING FILTERING).
  • Set the limit of steer input to (-100,100) since the curvature radius saturates above it.
  • Implemented the online estimation of the engine gain parameter (fitness) (See #FITNESS ESTIMATION).
  • Implemented speed disturbances correction which uses a path-dependent disturbance function defined in the path specification file.

...

Compilation
To compile both ca2 and the simulator I wrote there is the simple shell script "Andrea/src/scripts/compile.sh".

  • path file name changed

...

CA2

...

scripts/compile.sh". First of all, check that the constant CODE_IN_CAR in "src/car_src/const_car.h" is set to 0. This allows to compile the code without the requirement of the Brainstem library and setups the sockets to connect to localhost instead of the IP addresses of the CPS and the cars. From the main folder, just type in the console

Code Block

cd scripts
./compile.sh

The two executable ca2 and simulator should appear in your main folder. Other than the standard POSIX library, the simulator uses GSL (Gnu Scientific Library) so if you have problems compiling, make sure it is installed.

Run
From the main folder, to run a simulated experiment first run the simulator.

Code Block
./simulator

and then run the car code with the normal syntax.

Code Block
./ca2 paths/figX_precise.txt

Where X can be "8AL", "8CL" or "0". Note that I added the suffix "_precise" to the path specification files to differentiate them from the previous ones which define the path with a limited number of points. The path files I have used are contained in the folder "Andrea/paths". Specifying great number of points allows the car to follow its path more effectively.

...

CAR SOFTWARE

...

  • where is the folder
  • I changed the makefile so if you want extend the code copy from mine
  • paths are called _precise now

...