Skip to content

The robot runs ROS on Raspberry Pi, using usb camera and opencv library to detect the line and using Arduino to control the wheels by PID.

Notifications You must be signed in to change notification settings

zebra314/Line_follower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS Line Follower

Brief

The robot runs ROS on Raspberry Pi, using usb camera and opencv library to detect the line and an Arduino to control the wheels by PID.

Body

Architecture

Architecture

Architecture

@startuml
!pragma teoz true

camera -> Line_detector : img
Line_detector -> Coachman : img, contours, points
Coachman -> toarduino : pwm_msg
camera -> recorder : img
Coachman -> recorder : img
toarduino -> motor_controll : pwm_msg
motor_controll -> wheels : pwm

box "ROS NODES"
  participant camera
  participant recorder
    box "detector"
      participant Line_detector
      participant Coachman
    endbox
  participant toarduino
endbox

box "ARDUINO"
  participant motor_controll
  participant wheels
@enduml

Commands

  1. To launch
roslaunch detector detector.launch 
  1. To view the image
rqt_image_view
  1. To view the node graph
rosrun rqt_graph rqt_graph
  1. To upload to ardunio
cd ~/Line_follower/onArdu/Line_follower
make upload clean

Devlog

3/17
Fix uart delay problem

3/13
Test on Pi
Couldn't reduce the period from arduino echo to the new msg arrived
It might caused by the while in toarduino.py for waiting the arduino echo

3/8
Optimize motor controll
Add recorder node

3/5
Optimize line detect

3/3
Fuck up raspberry

3/2
PID controll

2/20
Update line detect

2/19
Test Rasberry pi

2/18
Toarduino pkg

2/17
Line detect and camera pkg

ToDo

Tweak motor speed
Test on Pi
Adjust PID parameters
Check if the Arduino receieve the msg
Optimize the line detector

Reference

Canny
HoughLines
HoughLines vs HoughLinesP
Line detect algorithm
Upload to arduino using terminal

About

The robot runs ROS on Raspberry Pi, using usb camera and opencv library to detect the line and using Arduino to control the wheels by PID.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published