LostXine / pyCyberCar

A driver for Raspberry PI 3B+ Car.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyCyberCar

CyberCar driver on Raspberry Pi 3 in Python 2.

The project includes a driver for CyberCar and a visualization tool cybercar.html.

CyberCar is made from FREESCALE Type B. We use Raspberry Pi 3B+ as a controller. Then we added a CSI camera, a S-D5 servo motor, a 540 DC motor and other DC-DC modules. It can perform several image processing experiments and can work with many extensions.

本工程包括使用python2编写的智能小车CyberCar驱动pyCyberCar以及配套的可视化网页cybercar.html

CyberCar是在飞思卡尔B型车基础上,添加树莓派3B+作为上位机的改造型。全车搭载CSI摄像头,S-D5舵机,540直流电机以及相关电源模块,可以执行多种图像处理实验。而且支持多种模块的拓展。


Dependence

  • RPi.GPIO: To output PWM (输出控制信号)
  • nrf24pihub: To drive NRF24L01+ module (驱动2.4G通讯模块NRF24L01+)
  • OpenCV: To process images from camera (处理图像)
  • simple-websocket-server: To push data to the viewer (使用websockt推送数据)
  • bootstarp: To build CyberCar Viewer's framework (用于搭建CyberCar Viewer)
  • echarts: To draw line charts (用来绘制折线统计图)

Usage

  • Run the car's server first (-d: debug mode):
python run_server.py
  • Open another terminal
  • (For OpenCV user) Edit dip.py, then run run_cybercar.py(-f: show fps | -mp: using multi-processing pool):
python run_cybercar.py

OR

  • (For NRF24 user) Run the nrf24 receiver:
python run_nrf24.py

使用方法

python run_server.py
  • 打开另一个控制台窗口
  • (使用OpenCV控制) 编辑dip.py以设计图像处理算法,然后运行run_cybercar.py(-f: 显示fps | -mp: 使用进程池处理图像):
python run_cybercar.py

或者

  • (使用2.4G遥控) 运行nrf24接收模块:
python run_nrf24.py

请参加“数字图像处理基础”的同学注意:

为了方便代码评阅,建议只修改 dip.pyconfig.py 两个文件,最后使用git提交代码。


Developer

  • Yue ZHOU, A.P. Department of Automation, Shanghai Jiao Tong University.
  • Xiang LI, MEng Department of Automation, Shanghai Jiao Tong University.
  • Shuo SHAN, MEng Department of Automation, Shanghai Jiao Tong University.

Contact me

  • Email: lostxine@gmail.com
  • Address: Room 2#302B, SEIEE Building, 800 DongchuanRd., Shanghai, PR China (200240)

About

A driver for Raspberry PI 3B+ Car.


Languages

Language:Python 72.6%Language:HTML 20.8%Language:JavaScript 6.5%