AutoMecUA / AutoMec-AD

Autonomous RC car with the help of ROS Noetic and ML.
GNU General Public License v3.0
15 stars 2 forks source link

Cross walk detection #154

Open manuelgitgomes opened 2 years ago

manuelgitgomes commented 2 years ago

Discover and implement a way to detect the crosswalk. See particle filter for detection - @Almeida-a Record video of the car passing on the crosswalk, create package for crosswalk detection - @manuelgitgomes

Almeida-a commented 2 years ago

The new/issue154 will be the development branch for this issue.

Almeida-a commented 2 years ago

I created a test (test.py) environment in the previous commit. TODO:

Almeida-a commented 2 years ago

Work progress:

Almeida-a commented 2 years ago

This simple approach seems to extract well the characteristics of the track within the gazebo environment.

White pixels probability variation

This image depicts the probability [0, 1] of the presence of white pixels in each frame.

Needless to say, the spike indicates the car was seeing, at the respective frames, a crossroad. This indicates us that, in a gazebo environment:

Next task is to map these probabilities to the distance of the car to the crossroad.

manuelgitgomes commented 2 years ago

Me and @Almeida-a started implementing this algorithm in ROS. When doing so, an issue arose as the ml_driving script was being used as a decision making script. To avoid multiple responsibility, a new package was created called prometheus_decision, in which a script receives the steering angle from the cnn, the signal detected and if a detection of a crosswalk is detected. Then, a decision is taken and sent to the robot. Commits will come soon.

Almeida-a commented 1 year ago

A new problem arose: the car should ideally stop when the front wheels are within the area of the first strip of the crosswalk which is closest to the car. This is an issue because it will always coincide within the downward slope region of the bright pixels algorithm's graph -- image -- meaning that the robot's reaction to the crosswalk will not be proportional to how much 'white' it sees, contrary to this basic algorithm's goal.

Therefore, a change in approach is due.

Two approaches were brought up to address this matter:

TatianaResend commented 1 year ago

Since the panel is not centered on the right side the car is stopping almost in the correct place, but on the left side it is stopping way behind. Therefore, it is necessary to correct the position of the panel and retest where the car stops.

TatianaResend commented 1 year ago

Changing the height of lcd1 and lc2 from 1m to 1.0856m so that the base of the lcd's are 0.87m from the ground.

TatianaResend commented 1 year ago

The car is stopping in the right place on both sides.

manuelgitgomes commented 1 year ago

Thanks @TatianaResend! This, however, has not been tested in real life. What do you think, should we reopen it?