2017/06/30 Raspberry Piã¨ROSã§ç´æ£ã«ã¡ã©ãåããæ¹æ³ã«é¢ãã¦è¿½è¨
Raspberry Piã«ROSãå ¥ããæã«ä½¿ãUSBã«ã¡ã©
ãRaspberry Piã«ROSãå ¥ãã¦è²ã ããã£ã¦ãã¾ããROSã£ã¦ä½ï¼ã¨ãã¤ã³ã¹ãã¼ã«ããæé ã«é¢ãã¦ã¯ä»¥ä¸è¨äºåç §ä¸ããã
ãROS(Ubuntu)ã ã¨Raspberry Piã®Camera Moduleãåããªãã¦ãåããæ¹æ³ãç§ã¬ãã«ã§ã¯åãããªãã£ãã®ã§ãã¨ãããã大人ããUSBã«ã¡ã©ã使ããã¨ã«ãã¾ãããè²·ã£ã¦ããã®ã¯ä»¥ä¸ã®USBã«ã¡ã©ã
- åºç社/ã¡ã¼ã«ã¼: ã¨ã¬ã³ã
- çºå£²æ¥: 2012/06/14
- ã¡ãã£ã¢: Personal Computers
- ãã®ååãå«ãããã°ãè¦ã
ãé¸ãã çç±ã¯è¿ãã®å®¶é»ã·ã§ããã§å£²ã£ã¦ããããã§ããUVCè¦æ ¼ã«å¯¾å¿ãã¦ããå¤ãã®Webã«ã¡ã©ã¯Raspberry Piã§æ®éã«èªèãã¦ãããããã§ãããäºåã«èª¿ã¹ã¦ããã¨å®å¿ã§ãã
ROSã§USBã«ã¡ã©ã使ã
USBã«ã¡ã©æ¥ç¶ãã¹ã
ãROSãã»ããã¢ããããRaspberry Piã«USBã«ã¡ã©ãæ¥ç¶ãã¦ä»¥ä¸ã³ãã³ããå®è¡
$ ls /dev/video*
ã/dev/video0
ã表示ãããã°USBã«ã¡ã©ã¯èªèããã¦ãã¾ãã
ROSç¨ã®USBã«ã¡ã©ã½ããã¤ã³ã¹ãã¼ã«
ã以ä¸ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã
$ sudo apt-get update $ sudo apt-get install ros-indigo-usb-cam
USBã«ã¡ã©åä½
ãã¾ãã¯ä»¥ä¸ã³ãã³ãã§roscore
èµ·å
$ roscore
ã次ã«å¥ã®ã¦ã£ã³ãã¦ã§ä»¥ä¸å®è¡
$ rosrun usb_cam usb_cam_node
ãããã¨Webcam: expected picture but didn't get it...
ãªãã¨ã©ã¼ãã§ãã調ã¹ãã¨ä»¥ä¸ã®ã³ãã³ãã§ãã©ã¼ããããæå®ãã¦ãããªãã¨ãã¡ããããã«ã¡ã©ã«ãã£ã¦ã¯å¿
è¦ãªãã®ããããã¾ããã
$ rosparam set usb_cam/pixel_format yuyv
ãå度以ä¸ã³ãã³ããå®è¡ããã¨ç¡äºèµ·åã
$ rosrun usb_cam usb_cam_node
ããã®ç¶æ ã§ä»¥ä¸å®è¡ãã¾ãã
$ rostopic list
ããããã¯ã¨ããROSä¸ãæµãã¦ããæ
å ±ãããããã£ã¨åºã¦ãã¾ãã/usb_cam/image_raw
ã¨ããã®ãç»åã®ãã¼ã¿ã§ãã®ã§ä»¥ä¸ã³ãã³ãã§è¡¨ç¤ºãã¦ããã¾ãããã
$ rosrun image_view image_view image:=/usb_cam/image_raw
ãããã§ä»¥ä¸ã®ããã«ROSã§USBã®åç»ãåå¾ã§ãã¾ãã
USBã®ãããªããã¤ã¹ãè¤æ°ããå ´å
ãUSBã®ãããªããã¤ã¹ãè¤æ°ããã¨ã対象ã®ããã¤ã¹ã/dev/video1
ã¨ã/dev/video2
ã¨ãã«ãªã£ã¦ãã¾ãã±ã¼ã¹ãããã¾ãããã®å ´åã¯ä»¥ä¸ã§video_device
ãå¤æ´ãã¦ããã¾ãããã
$ rosparam set usb_cam/video_device "/dev/video1"
ããããããã¨ã¯ãããã¦ãROS Wikiï¼usb_cam - ROS Wikiï¼ã«æ¸ãã¦ããã®ã§ä½ãå°ã£ãã調ã¹ã¦ã¿ãã®ãããã§ããããã¤ã¹æ¯ã«ã対å¿ããããã¤ã¹ãã¡ã¤ã«ãæå®ãããã¨ãã¯ãæ´ã«udevã使ãã¨ããã§ããããudevã®ä½¿ãæ¹ã¯ããã§ã¯çç¥ãã¾ãã®ã§åèªã§èª¿ã¹ã¦ã¿ã¦ä¸ããã
ã¾ã¨ãã¨æ¬¡ã®äºå®
ãRaspberry Piã®Camera Moduleã使ããããã«ãããã®ã§ãããã¡ãã£ã¨è«¦ãä¸ã§ãï¼èª°ãæãã¦ä¸ããï¼ãç»åèªèãããããããããããã¦ãããã§ãããããã ãã ã¨ã¤ãã¤ããªã®ã§ã¡ãã£ã¨æ¤è¨ä¸ã
追è¨ï¼Raspberry Piã¨ROSã§ç´æ£ã«ã¡ã©ãåãããã¨ãã§ãã¾ãããä¸è¨è¨äºåç
§ä¸ããã