GitHub basic tutorial
  • Introduction
  • Khởi động hệ thống Ground station computer - Companion computer (Odroid) - Pixhawk
  • Tao 1 private Folder tu public Folder
  • Tạo folder dev PX4 code
  • PX4 modification
  • MAVROS modification
  • Tạo node I3S_receiver
  • Kết nối đọc dữ liệu trong Pixhawk
  • Terminal Linux Ubuntu
  • Kết nối ROS hai máy tính
  • Build ros package in Odroid
  • Pressure sensor
  • Kết nối camera oCAM trên ROS
  • Cài đặt và sử dụng Matlab 2017b trên Linux Ubuntu
  • Một vài vấn đề trên Windows 7
  • Terminator
  • Upload compiled firmware of Pixhawk from odroid
  • Kết nối internet và Ethernet với Odroid (qua Switch) và 1 card mạng kết nối internet
  • IMU, Camera, Pixhawk connection to odroid
  • Kết nối ssh
  • Tham khao code homography cua Ninad
  • Matlab_2017b_problems
  • Eigen library - Mathematical toolbox for C++
  • Kinh nghiệm chuẩn bị presentation
  • Tap lenh lam viec voi Pixhawk px4
  • Offboard mode in PX4
  • P51 Lenovo, trackpad and trackpoint
  • P51 Lenov, Install Quadro M2200 graphic card
  • Gilab
  • Tao 1 private Folder tu public Folder
  • Ubuntu tips: show desktop by pressing Super + D
  • Install eclipse
  • Windows error
  • How to update Sublime Text 3 in ubuntu 16.04
  • PX4 Pixhawk hardfault
  • Install CUDA for computer with NVIDIA graphic card
  • Install openCV after installing CUDA
  • Meld - tool for file or folder comparison
  • GIT - move a full git repository from one remote sever to another one
  • Jetson Nano Installation
  • Working in Jetson Nano
  • Backup and Restore micro sd card
Powered by GitBook
On this page
  • Trong folder catkin_ws/src,
  • Rồi chạy
  • Cách khác để chạy:
  • Chú ý,
  • Sửa đổi tham số file usb_cam-test.launch
  • Báo lỗi:
  • Sửa lỗi:
  • Check fps
  • Calibration:

Was this helpful?

Kết nối camera oCAM trên ROS

PreviousPressure sensorNextCài đặt và sử dụng Matlab 2017b trên Linux Ubuntu

Last updated 5 years ago

Was this helpful?

Trong folder catkin_ws/src,

git clone

Folder usb_cam này đã được fork từ vào tài khoản github lamhung81

Sau đó catkin_make hay catkin build

Rồi chạy

roslaunch usb_cam usb_cam-test.launch

Cách khác để chạy:

rosrun usb_cam usb_cam_node

Chú ý là khi chạy lệnh này, thông tin confìguration sẽ được load từ file usb_cam-test.launch

Do đó cần sửa thông số trong file .launch này

Chú ý,

Kiểm tra xem oCAM đã được nối vào cổng USB 3.0 của máy tính chưa? Lưu ý có thể có cổng USB3.0 ở mặt trươc của desktop ko cho kết nối đúng.

dùng lệnh

ls /dev/

để kiểm tra xem có phải là camera đã được nhận trong hệ thống là video0 chưa?

Sửa đổi tham số file usb_cam-test.launch

Có thể sửa đổi, ví dụ kích cỡ frame, tần số, định dạng yuyv hay mjpeg ...

Tham khao thông tin tham số trên trang của ros

Báo lỗi:

Lưu ý là nếu định dạng yuyv thì tốt, còn nếu là mjpeg

<param name="pixel_format" value="mjpeg" />

thì báo lỗi

Webcam: expected picture but didn't get it...

Sửa lỗi:

Ví dụ dùng camera oCAM oCam-5CRO-U, cần update firmware.

Tính đến ngày 21/12/2017 thì phiên bản mới nhất là R1707

Để update firmware, cần thực hiện trên máy tính cài Windows, chi tiết theo link

(Theo hướng dẫn này cần download 170703_UpdateFW.zip và drv_1.2.3.10.zip)

Sau khi update firmware thì sẽ ko còn bị lỗi như trên nữa.

Check fps

rostopic hz --window=1000 /usb_cam/image_raw

Calibration:

Để calibrate camera trên ROS, theo link

Thực hiện theo chỉ dẫn, chú ý câu lệnh sau phải sửa theo thực tế

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/usb_cam/image_raw camera:=/usb_cam

Sau khi calibrate xong, ấn SAVE để lưu.

Nếu calibrate ok, thì ấn COMMIT để lưu nội dung lại trong file /home/nguyen/.ros/camera_info/head_camera.yaml

Theo link

Có firmware mới nhất là

https://github.com/lamhung81/usb_cam.git
http://wiki.ros.org/usb_cam
http://wiki.ros.org/usb_cam
https://github.com/withrobot/oCam/tree/master/Firmware
oCam-5CRO-U_R1707_170629.img
https://github.com/withrobot/oCam/tree/master/Firmware/Update_FW
http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration