Autonomous Car – Week 8


Abdiqani 

I have kind of got stuck trying to fix the car turning using sensor, so instead of wasting time getting stuck I decided to work with the pathfinding algorithm. To understand the pathfinding algorithm, I have used a couple of videos as a reference, the first one is a YouTube video about the different pathfinding algorithms and comparing them. The second one is two tutorials from the Unity Learning showing how to use the solve a maze, and the second one is a video about pathfinding algorithms. 

YouTube: 

A Comparison of Pathfinding Algorithms 

Unity Learn: 

https://learn.unity.com/project/a-36369ng?uv=2021.3

https://learn.unity.com/tutorial/unity-navmesh?projectId=5f60d859edbc2a001ee947ea#

I started a new project then tried to use the NavMeshAgent by making every obstacle static and placing a target at the exit of the maze. This resulted in the car navigating through the maze effectively without any sensors. I then decided to see if there are other methods, I could use to navigate the car through the maze and went back to try and fix the raycast. 

NavMesh Navigation 

I decided to go back to ray cast and try to fix it, but it gets complicated fast. The conditional statements that I thought would be better for the car, have made the code harder to process and in turn made it impossible to move past the first corner. 

I have had a hard time making the car just stop if it detects something in front and then turn depending on the left and right sensor, I have done these different ways and all of the come to the same conclusion.  

I have also been fidgeting between placing waypoint in every single intersection where there would be a decision made, but then again, I would have to place it and it would not be very autonomous, additionally it would be following in a line, like I could put a for loop that would make it go through every single waypoint before it reaches the last. 

To use the above pathfinding algorithm like A star, Dijkstra I would need to have a grid, I have already designed the maze, that is also one of the reasons I have been placing the waypoint, so that the algorithm would use it as a node for the search. Unfortunately, I lost all the nodes I had placed, when I was trying to do that method, so I’ll try to place them again and try. 

In conclusion this has been a week where I have managed to make the car navigate through the maze, but I have also been stuck trying to figure find out another way. 

Abdirahman 

A lot of things took unexpected turns this week. I thought that my raspberry pi set up on my laptop would lead to using the raspberry pi on any monitor or desktop. Unfortunately, I had to set up the entire raspberry pi from scratch on a monitor at the campus. That went well and fast. Another problem popped up which was that the camera pi wasn’t working. We dealt with it after troubleshooting it and changed the camera. That really solved the problem and the new camera up and running.  

Now that the hardware part was in place, I turned my attention to the software part. I’ve been working on learning OpenCV in python for the past days. I managed to write a code that I believe will fulfil my objective which is to program the camera pi so that it can be able to track/follow a black line. 

Here is the code: 

Ghebre: 

This week I made some progress with the line sensor and the PID controller. 

Here is some of the codes I was working on, but I still not done with it. I was trying to troubleshoot the line sensor alone to see if it follows the line and if the algorithm work. I check some video on how to make the car move fast using the PID controller. And I hope by next week I will be able to make the car to use not only the front and line sensor, but also the right and lift sensors. That enables the car to use all the sensors and move a bit faster. 

Alinur: 

Gonna Speak to you! 


Leave a Reply