The PiCarX project aims to create an AI-driven robotic car capable of autonomous navigation and precise sensor calibration. Main objectives include:
hostname -I
in terminal.Folder organization of documentation files:
/docs/
- Documentation HTML files/calibration/
- Calibration scripts for motors and camera/logs/
- Work logs for each team memberFolder organization of project files:
/CS371/
- Parent foldercd ..
in the terminal cd cs371a/picar-x/master-calibration/
in the terminal to reach the files/master-calibration/cameraHorizonCalibration.py/
- Calibrating the horizon of the camera/master-calibration/ImageRotation/
- File to test camera Horizon Calibration./master-calibration/PanAndTiltCalib/
- Calibrating the pan and tilt of the camera/master-calibration/line_wheel_calibration/
- Calibration done by the previous Pioneer Team/master-calibration/Line_tracking/
- Line Tracking/master-calibration/optical_flow.py/
-Line Tracking using Optical Flow - done by the prvious pioneer teamGoal: Adjust servo angles to allow the car to drive straight.
Key script Download: wheel_calibration.py
Key script View: wheel_calibration snippet
Goal: Set pan and tilt to face forward.
Key script Download: camera_calibration.py
Key script View: camera_calibration snippet
Further Imporovements: Instead of scanning across the entire room, search for the red dot once and move its head accoring to the adjustment, reducing the adjustments(by taking average) until it can find the red dot.
Assessment: The code works and returns a value of 0°
Goal: Correct rotational tilt of the camera using optical flow analysis.
Key script Download: camera_calibration.py
Key script View: camera_calibration snippet
Further Improvements: Calibrate using a chessboard pattern ensuring that it doesnt overshoot the measurements.
Assessment: The code works and returns a value of 2.5°. To get this value make sure you avoid any background noise and average over the angles found in the distance specified in the materials section below.
Goal: Use both camera and sensors for line following
Key script Download: optical_flow.py
Key script View: optical flow snippet
Further Improvements: The code still has some issues that we did not have time to address, it has been listed in the to-do comments in the code.
Goal:An attempt towards line following started by us.
Key script Download: line_tracking.py
Key script View: line tracking snippet
Further Improvements: Reduce the jitters and combine the sensor data and camera data such that it uses the camera after it cannot detect the sensor data ensuring that the robot is at the end of the line.
Assessment: We started our own code resembling the optical flow code of the previous pioneer team. We ran and tested the code multiple times, the robot stays on the line, make the improvement mentioned.
Common Errors | Solutions |
---|---|
Camera not found | Check if the camera is still being used by any other application and restart the picarx |
VNC connection failed | Ensure VNC is enabled on the Raspberry Pi, check the IP address, and check that you're connected to the same network. |
Indentation Error | Do not mix your tabs and spaces, be consistent. |
Calibration | Suggestion |
---|---|
Horizon Calibration | Make sure that you are in the right distance as specified and make sure that there is no other things that the picarx is reading introducing noise which might affect the calibration. |
Pan And Tilt | Keep the red dot on the same level as the picarx to ensure that we're getting accurate measurements. |
Vertical Line strips | Test using vertical line strips as chessboard and other pattern can over-estimate the angles. |