Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 634 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 634 Bytes

droidcam-ros2

This ROS package is simply inspired by this python code.

import cv2

cap = cv2.VideoCapture('http://<DROIDCAM_IP>:4747/mjpegfeed')

while True:
    ret, frame = cap.read()
    if ret and frame is not None:
        cv2.imshow("frame", frame)
    cv2.waitKey(1)

After git clone and colcon build you can run

$ ros2 run droidcam_ros publisher -ros-args -p ip:=<DROIDCAM_IP>

Which will launch the node that publish the image from droidcam to ROS topic named camera_image constantly.

View the published image by open rqt image viewer.

$ ros2 run rqt_image_view rqt_image_view