2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

DonkeyCar カメラ画像をVNC経由でホストPCに表示する

Last updated at Posted at 2019-07-16

(1)Raspbian はLite版ではなくDesktop版を使用する.
デスクトップのメニューかターミナルのraspi-configでVNCを許可する.
(2)ホストPCにVNC Viewer をインストールする.
#ラズパイのmycar/manege.py を編集する
##class DriveMode: を修正
###追加
import cv2
###V.startの前に追加
class Disp:
def init(self):
cv2.namedWindow('DonkeyCamera', cv2.WINDOW_NORMAL)

    def run(self, image):
        try:
            tmp = image.copy()
            cv2.imshow('DonkeyCamera', tmp[:,:,::-1])
            cv2.waitKey(1)
        except:
            pass

V.add(Disp(), 
      inputs=['cam/image_array'])

##drive起動の次に追加
cv2.destroyAllWindows()
#manage.pyの起動
VNC経由で起動する事.
SSH接続で起動は不可.

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?