Giter VIP home page Giter VIP logo

zed_cpu_ros's Introduction

zed_cpu_ros

A simple zed camera driver which only use CPU and only publish left and right raw images and its camera info.

Build Status

Usage:

  1. git the packge into your working space

    cd catkin_ws/src
    git clone https://github.com/transcendrobotics/zed_cpu_ros
    cd ..
    catkin_make
    
  2. Get your calibration files: You can get your calibration files from zed or do a calibration your self by using ROS camera calibration package.

    (1). From zed:

    Find your zed calibration files in

    cd /usr/local/zed/settings
    

    or download from: http://calib.stereolabs.com/?SN=XXXX

    Note: XXXX is your last four digit S/N of your camera, make sure to change it!!

    put the .conf file into zed_cpu_ros/config folder

    update launch file configuration file name in zed_cpu_ros.launch into your SNXXXX.conf

    roscd zed_cpu_ros/launch
    gedit zed_cpu_ros.launch
    

    change XXXX into the .conf file you have, for example 1010

    <arg name="config_file_location" default="$(find zed_cpu_ros)/config/SN1010.conf"/>
    

    (2). Do a calibration yourself:

    This option is suggested. Reference: http://wiki.ros.org/camera_calibration

    roslaunch zed_cpu_ros camera_calibration.launch
    

    After calibration: Find the left.yaml and right.yaml in the tar file and put them into the zed_cpu_ros/config folder. The calibration file will be loaded if you turn <load_zed_config> off in the launch file.

  3. launch the code

    roslaunch zed_cpu_ros zed_cpu_ros.launch
    

Launch file parameters

Parameter Description Value
device_name camera device_name sting
resolution ZED Camera resolution '0': HD2K
_ _ '1': HD1080
_ _ '2': HD720
_ _ '3': VGA
frame_rate Rate at which images are published int
left_frame_id Left Frame ID string
right_frame_id Right Frame ID string
load_zed_config Whether to use ZED calibration file bool
config_file_location The location of ZED calibration file string
show_image Whether to use opencv show image bool
encoding image encoding string

TODO:

  1. add the launch file for stereo_proc.
  2. add the nodelet functionality.

Transcend Robotics:

Patented articulated traction control ARTI technology for stair climbing and obstacle traversal without complex software or controls http://transcendrobotics.com/

Author:

Di Zeng

zed_cpu_ros's People

Contributors

hierom avatar michaelgrupp avatar philbotseesu avatar virgile-dauge avatar willdzeng avatar winf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zed_cpu_ros's Issues

[Help] can't change the frame rate

Thanks your solid work very much!

But it seems one question. I can't change the frame rate by the frame rate in the zed_cpu_ros.launch file.

Whatever the value of frame rate in the launch file, the frequency is about 4.6.

Do you know the possible problem?

Can‘t find camera

I have connected the zed with computer, and the zed_ros_wrapper provided by stereolabs can work. But this package can't find camera. why did the situation happen?

Launch file logs webcam instead of Zed

Hi, the node for some reason opens up my webcam instead of the zed camera. The zed ros wrapper works fine though. Any idea as to why this is happening?

strange resolution

I use the packages on Intel NUC and everything is OK,but when I change the platform to a laptop Dell
G3 corei7-8750 with Ubuntu16.04 ROS-kinetic
then It showed a strange resolution 640x480 annd it never change when I rewrite the config's resolutio

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /stereo/zed_cpu_ros_node/config_file_location: /home/sia/catkin_...
 * /stereo/zed_cpu_ros_node/device_id: 0
 * /stereo/zed_cpu_ros_node/frame_rate: 30
 * /stereo/zed_cpu_ros_node/left_frame_id: left_frame
 * /stereo/zed_cpu_ros_node/load_zed_config: False
 * /stereo/zed_cpu_ros_node/resolution: 6
 * /stereo/zed_cpu_ros_node/right_frame_id: right_frame
 * /stereo/zed_cpu_ros_node/show_image: False

NODES
  /stereo/
    zed_cpu_ros_node (zed_cpu_ros/zed_cpu_ros)

auto-starting new master
process[master]: started with pid [20888]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 7c3f7312-dc07-11e8-89b0-3f1cd687ce13
process[rosout-1]: started with pid [20910]
started core service [/rosout]
process[stereo/zed_cpu_ros_node-2]: started with pid [20921]
[ INFO] [1540878534.827338966]: Try to initialize the camera
**_Stereo Camera Set Resolution: 640x480_**
[ INFO] [1540878535.132263766]: Initialized the camera
[ INFO] [1540878535.188934238]: Try load camera calibration files
[ INFO] [1540878535.188955303]: Loading from ROS calibration files
[ INFO] [1540878535.189423434]: camera calibration URL: package://zed_cpu_ros/config/left.yaml
[ WARN] [1540878535.190079310]: [camera] does not match name narrow_stereo/left in file /home/sia/catkin_zed/src/zed_cpu_ros/config/left.yaml
[ INFO] [1540878535.190106370]: camera calibration URL: package://zed_cpu_ros/config/right.yaml
[ WARN] [1540878535.190657588]: [camera] does not match name narrow_stereo/right in file /home/sia/catkin_zed/src/zed_cpu_ros/config/right.yaml
[ INFO] [1540878535.191176929]: Got camera calibration files 
[ INFO] [1540878535.906672264]: Success, found camera
^C[stereo/zed_cpu_ros_node-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete

everybody knows why?
thanks!

Error when running roslaunch zed_cpu_ros depth.launch

I successfully run roslaunch zed_cpu_ros zed_cpu_ros.launch
as follows:

===================================================================================
... logging to /home/adminpc/.ros/log/5d24293c-490a-11ec-80ef-00e04c36415c/roslaunch-adminpc-GB01-26583.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:43709/

SUMMARY

PARAMETERS

  • /camera/zed_cpu_ros_node/config_file_location: /home/adminpc/cat...
  • /camera/zed_cpu_ros_node/device_name: /dev/video0
  • /camera/zed_cpu_ros_node/encoding: bgr8
  • /camera/zed_cpu_ros_node/frame_rate: 30
  • /camera/zed_cpu_ros_node/left_frame_id: left_frame
  • /camera/zed_cpu_ros_node/resolution: 1
  • /camera/zed_cpu_ros_node/right_frame_id: right_frame
  • /camera/zed_cpu_ros_node/show_image: False
  • /camera/zed_cpu_ros_node/use_zed_config: True
  • /rosdistro: melodic
  • /rosversion: 1.14.12

NODES
/camera/
zed_cpu_ros_node (zed_cpu_ros/zed_cpu_ros)

ROS_MASTER_URI=http://localhost:11311

process[camera/zed_cpu_ros_node-1]: started with pid [26603]
[ INFO] [1637307014.349376559]: Try to initialize the camera
[ INFO] [1637307014.676106411]: Stereo Camera Set Resolution 1, width 3840.000000, height 1080.000000
[ INFO] [1637307014.676197052]: Initialized the camera
[ INFO] [1637307014.845490653]: Try load camera calibration files
[ INFO] [1637307014.845552208]: Loading from zed calibration files
[ INFO] [1637307014.845947793]: Got camera calibration files
[ INFO] [1637307014.879999386]: Success, found camera

=================================================================
But when I try to run roslaunch zed_cpu_ros depth.launch ,

I encounter the following error:

... logging to /home/adminpc/.ros/log/5d24293c-490a-11ec-80ef-00e04c36415c/roslaunch-adminpc-GB01-26870.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

RLException: roslaunch file contains multiple nodes named [/camera/depth_nodelet_manager].
Please check all 'name' attributes to make sure they are unique.
Also check that $(anon id) use different ids.
The traceback for the exception was written to the log file

Found bugs when trying to use stereo_image_proc

Thank you for the great work. It do help us to work on ZED without GPU.
I have tried to use your zed_cpu_ros with the stereo_image_proc ROS package. I found several bugs as follow.

line 232-237

switch (resolution) {
		case 0: reso_str = "2K";
		case 1: reso_str = "FHD";
		case 2: reso_str = "HD";
		case 3: reso_str = "VGA";
}

reso_str always select VGA resolution. You should add the break here.

line 288-289

left_info.R.fill(0.0);
right_info.R.fill(0.0);

I think you can compute R from RZ and RX in zed config file, or it should be at least identity matrix

Sincerely yours,
Prarinya

opencv 4.2 roi error in ubuntu 20

Hi , i am not able run this package in ubuntu 20 with openCV 4.2.0
when i launch , it fails with cv::Exception displaying some roi error.
like 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function Mat

Change frame rate

Hi.

I am trying to change the frame rate, but I always get the error
VIDIOC_QUERYMENU: Invalid argument

Is there any restriction about going over 30 fps even for WVGA?
Because I had no problems lowering the fps, but I cannot go over 30.

Thanks!

Crash on subscribe

When I attempt to subscribe to most stereo_image_proc topics it crashes with the below error:

process[camera/stereo_image_proc-3]: started with pid [24665]
OpenCV Error: Assertion failed (_map1.size().area() > 0) in remap, file /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/imgproc/src/imgwarp.cpp, line 4936
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/imgproc/src/imgwarp.cpp:4936: error: (-215) _map1.size().area() > 0 in function remap

Are there additional system setup requirements to get this working? Any pointers on getting a better root cause?

Cannot change the resolution

Hello, I came across a problem that I cannot change the resolution by setting the resolution id in launch file, whatever I set, the output of "camera_->get(WIDTH_ID)" and "camera_->get(HEIGHT_ID)" always be 1344*376, I don't know why,while I use the image to calibrate via ros_camera_calibration, it came out that the resolution is 672 376

[camera] does not match name warning

Hi,
I followed all the steps in the Usage section, but when I run roslaunch zed_cpu_ros zed_cpu_ros.launch, I receive the following error: [camera] does not match name narrow_stereo/left (similar for right camera, too).
I saw that inside zed_cpu_ros.cpp there is a line info_manager.setCameraName("zed/left"), so I renamed narrow_stereo to zed in both yaml files, but now the error is ... does not match name zed/left, so this did not resolve the issue.

Do you know if I'm doing something wrong here?

Thanks in advance

Does it work with ubuntu 14.04 ??

Hello
I tried to install it with ubuntu 14
I got the following error
would you please help !!

abdulrahman@abdu:~$ roslaunch zed_cpu_ros zed_cpu_ros.launch
... logging to /home/abdulrahman/.ros/log/991f3eae-c40b-11e8-a48a-3c970eeb89f7/roslaunch-abdu-19539.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Unknown substitution command [eval resolution>3]. Valid commands are ['find', 'env', 'optenv', 'anon', 'arg']
The traceback for the exception was written to the log file

coordinate frame

hi , in which coordinate frame does this publish, like z forward x left and y down or x forward y left and z up

VIDIOC_QUERYMENU: Invalid argument

Hi,
thanks for offering this code. I tried to run it and ROS spits out the following message by running either roslaunch zed_cpu_ros camera_calibration.launch or roslaunch zed_cpu_ros zed_cpu_ros.launch

[ INFO] [1470673522.009342437]: Try to initialize the camera
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument

I tried several things. Such as, making sure that opencv is cimpiled wtih libv4l support, libv4l is installed at all, 2 different machines. I can receive a stream with Ubuntu's "Cheese Wevcam Boot" of ZED.

Would be very nice from you if you could point me into the right direction.

Thanks!

Why I get a green image from the webcam?

This wrapper works on my Mac Pro. But when I get image from camera. I show it by opencv function cv::imshow, as follows
if (camera_->grab()) { camera_->retrieve(raw); **cv::imshow("rawImg",raw); cv::waitKey(0);** cv::Rect left_rect(0, 0, width_ / 2, height_); cv::Rect right_rect(width_ / 2, 0, width_ / 2, height_); left_image = raw(left_rect); right_image = raw(right_rect); cv::waitKey(10); return true; }
Screen Shot 2019-07-26 at 12 09 25 AM

and Why? How could I get correct image?

Library Usage

I've installed the library on my robot. When I run the launch file, I get "Success, found camera". How can I use this library now to capture images and save them?

Camera coordinate system

Where is the origin for the camera coordinate system for these drivers and what is the orientation of the coordinate axes? Is it the standard right handed system with Z as the optical axis?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.