RK-JetBot下載映像檔進行安裝
學校購買了一批RK-Jetbot,秉持愛物惜物精神,就來研究一下RK-Jetbot。
Step1)下載JetBot映像檔jetbot_image_v0p4p0.zip
到https://jetbot.org/master/software_setup/sd_card.html下載JetBot映像檔,目前測試JetPack4.3的4G版本(jetbot_image_v0p4p0.zip),可以正常驅動車子與WebCam相機。
Step2)下載安裝映像檔燒錄程式etcher(https://etcher.balena.io/),使用Step1的映像檔燒錄到64G的記憶卡。
Step3)使用HDMI螢幕、鍵盤與滑鼠連接RK-Jetbot,開機後設定無線網路,使用指令「sudo nmtui」啟動一個無線網路連線設定,使用指令「ifconfig」查詢無線網路的IP。
#sudo nmtui
#ifconfig
Step4)使用http://無線網路IP:8888,連線JetBot的Jupyter Lab,點選「Terminal」開啟Terminal。
Step5)下載Cavedu的RK-JetBot安裝程式jetbot-0.3.0套件(https://github.com/cavedunissin/jetbot)
#git clone https://github.com/cavedunissin/jetbot.git
#cd jetbot/
#sudo python3 setup.py build
#sudo python3 setup.py install
Step6)使用Jupyter Lab開啟Step5的Cavedu所提供的Jupyter記事本,在資料夾Notebooks_CAVEDU下的資料夾basic_motion,記事本basic_motion.ipynb。
我的RK-JetBot馬達驅動版為waveshare,需要修改如下
robot = Robot(driver_board="waveshare")
就可以讓車子移動。
waveshare馬達驅動板,如下圖。
Step7)查詢jupyter lab的狀態
#sudo service jetbot_jupyter status
├─ 3697 /bin/sh -c jupyter lab --ip=0.0.0.0 --no-browser
├─ 3792 /usr/bin/python3 /usr/local/bin/jupyter-lab --ip=0.0.0.0 --no-browser
在記事本輸入以下到cell,執行後可以查詢目前JupyterLab所提供的kernel
!jupyter kernelspec list
Available kernels:
python3 /usr/local/share/jupyter/kernels/python3