About the project
We are participating in the NXP Cup, it’s a competition where we build and program an autonomous robotic car. We want to demonstrate that anybody with determination can learn to code, with the majority of the team having never coded before. We would like your support to demonstrate that anybody can do it.
Estimated time: 6 months
Items used in this project
2021 Back at it!
PACEd has signed up for the NXP Cup 2021. Our car is the same, building on our "Curries Futuristicus" project, except from that we have changed the servo as the original one was defect. However, the code is new and constantly changing.
Line Following 1
We find the angle of the line we're tracking and convert it to a linear scale. An angle in the range [0, 180] becomes a double in the range [-1.0, 1.0] where +1.0 is a left turn, -1.0 is a right turn, and 0.0 is straight forward. As the 0.0 doesn't necessarily make the car go straight forwards, we introduce a trim variable trying to adjust for this.
We then store the x latest angles (converted to a double [-1, 1]) in an array and use their average to set the servo angle. As per 04.01.21, our x is 10.
The Car Turns too Much to the Right
Even with trim corrections. We may need to use a non-linear mapping from the [0, 180] angle to the [-1, 1] steering value.
There's no way of telling whether out battery is fully charged or not.
Ultrasonic Sensor (USS)
The USS doesn't fit into the FMU. There exist adapters, but not yet obtained. Yet, we have not found out how to retrieve the signal from the USS to the FMU. We don't know what C++ commands we must use.
If you also participate in NXP Cup 2021 and have faced some challenges you'd like to discuss, don't hesitate to contact us on email or on our Facebook page.
Facebook: UoE NXP Cup 2019/20