The ZED Stereo Camera is a lightweight depth camera based on passive stereo vision. It outputs up to 2208x1242 high-resolution stereo video on USB 3.0, and can work in high-speed mode in VGA at 100 FPS. The ZED SDK computes a depth map of the environment on the GPU of the host machine at the frame rate of the camera. It also gives you access to a strong odometry that learn its environment, making it able to relocate itself at any moments.
Get the package
This package is a wrapper for the ZED SDK in order to use the ZED stereo Camera with ROS. It provides access to the ZED camera stereo images, depth map, 3D point cloud and 6-DOF tracking.
This package is designed to work with the ZED stereo camera and requires the installation of the ZED SDK. For more information: https://www.stereolabs.com
You can download the zed-ros-wrapper on Github: https://github.com/stereolabs/zed-ros-wrapper
- Left camera
/zed/rgb/image_rect_color : Color rectified image (left RGB image by default).
/zed/rgb/image_raw_color : Color unrectified image (left RGB image by default).
/zed/rgb/camera_info : Camera calibration data.
/zed/left/image_rect_color : Color rectified left image.
/zed/left/image_raw_color : Color unrectified left image.
/zed/left/camera_info : Left camera calibration data.
- Right camera
/zed/right/image_rect_color : Color rectified right image.
/zed/right/image_raw_color : Color unrectified right image.
/zed/right/camera_info : Right camera calibration data.
- Depth and point cloud
/zed/depth/depth_registered : Depth map image registered on left image (by default 32 bits float, in meters).
/zed/point_cloud/cloud_registered : Registered color point cloud.
- Visual odometry
/zed/odom : Absolute 3D position and orientation relative to zed_initial_frame.
- Get the necessary Point Cloud Library dependencies:
sudo apt-get install libpcl1
sudo apt-get install ros-kinetic-pcl-ros (where you might want to change "kinetic" to the distro you use)
Get the package from Github and put it in your catkin src folder
- Build the package from your catkin root folder
Test the package
Open a terminal and enter the following command :
roslaunch zed_wrapper zed.launch
It will launch the zed-ros-wrapper, so make sure that your ZED camera is connected to your computer. Note that the ZED camera needs to be connected through an USB3.0 port to work at full speed.
To see the rectified image from the ZED camera, just enter the following command in an other terminal :
rosrun image_view image_view image:=/camera/rgb/image_rect_color
The easiest way to visualize ZED's topics is to use rviz http://wiki.ros.org/rviz:
rosrun rviz rviz
At the bottom left of rviz, click on the Add button, and select the By topic tab, you can now see the list of all the available topic, by default the zed one's are under /camera.
For example, select the /point_cloud/cloud/PointCloud2 to see the point cloud from the ZED.
Note that the point cloud is something that slows down rviz, so you should open an other rviz if you want to see an other topic.
To visualize the odometry in rviz, select the Add button, and select the odom topic under the By topic tab.
Important: By default rviz is badly displaying the odometry, be sure to set it up correctly by opening the newly created Odometry object in the left list, and by setting Position tolerance and Angle Tolerance to 0, and Keep to 1.
You can also see the point could fused with the odometry by subscribing to the 'odom' topic (even in an other rviz or an other node).
To change your referential, use the 'Fixed Frame' parameter at the top-left of rviz.
Launch with a recorded SVO video
With the ZED you can record and play back a stereo video using the .svo file format. To record a video, just use the ZED Explorer as explained in the ZED documentation. https://www.stereolabs.com/developers/documentation/API/page2.html
To launch the zed-ros-wrapper with an SVO file, use the svo_file parameter in the command line at the launch of the package.
roslaunch zed_wrapper zed.launch svo_file:=/path/to/file.svo
An SSD drive is recommended for real-time video capture and playback.
"svo_file" is just one of the parameters available in the package. For the full list of available parameters, please check the readme file on Github: https://github.com/stereolabs/zed-ros-wrapper/blob/master/README.md
Using the URDF file
The zed-ros-wraper provide the URDF model of the ZED to help you visualize and integrate the ZED in your robot. The topic name of the URDF description is zed_description.
Report an Issue
If you encounter an issue with the zed-ros-wrapper, please refer to the dedicated issue list on Github at https://github.com/stereolabs/zed-ros-wrapper/issues