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. Read More
The ZED Mini camera introduces a beautiful black design with an aluminium bezel designed to maintain sensing quality over time. The camera also features new gyroscope and accelerometer for visual-inertial motion tracking and a USB Type-C connector. Read more.
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
Detailed documentation: https://docs.stereolabs.com/integrations/ros/zed_node/
- 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)
Note: if you are using a ZED Mini and you want to visualize the IMU information using Rviz you need to install the “Rviz IMU plugin”: sudo apt-get install ros-kinetic-rviz-imu-plugin
Get the package from Github and put it in your catkin src folder
- Build the package from your catkin root folder
- 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 : Color 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/depth/camera_info : Depth camera calibration data.
/zed/point_cloud/cloud_registered : Registered color point cloud.
/zed/confidence/confidence_image : Confidence image.
/zed/confidence/confidence_map : Confidence image (Floating point values).
/zed/disparity/disparity_image : Disparity image.
/zed/odom : Absolute 3D position and orientation relative to the Odometry frame (pure visual odometry for ZED, visual-intertial for ZED Mini).
/zed/map : Absolute 3D position and orientation relative to the Map frame (Sensor Fusion algorithm + SLAM).
/zed/pose_with_covariance : Camera pose referred to Map frame with covariance (if spatial_memory is false in launch parameters).
/zed/path_odom : Sequence of camera odometry poses in Map frame.
/zed/path_map : Sequence of camera poses in Map frame.
- Inertial Data
/zed/imu/data : Accelerometer, Gyroscope and Orientation data in Earth frame.
/zed/imu/data_raw : Accelerometer and Gyroscope data in Earth frame.
/diagnostics : See https://www.stereolabs.com/docs/ros/zed_node/#diagnostic
The ZED node provides the following services: *
set_initial_pose : restart the Tracking algorithm setting the initial pose of the camera to the value passed as vector parameter -> [X, Y, Z, R, P, Y]
reset_tracking : restart the Tracking algorithm setting the initial pose to the value available in the param server
reset_odometry : reset the odometry values eliminating the drift due to the Visual Odometry algorithn and setting the new odometry frame to the current map frame
start_svo_recording : start recording an SVO file (Default filename is zed.svo, default recording folder is ~/.ros/).
stop_svo_recording : stop an active SVO recording.
The ZED node let you reconfigure dinamically 5 parameter:
confidence : Confidence threshold, the lower the better
auto_exposure : Enable/Disable auto control of exposure and gain
exposure : Exposure value when manual controlled (auto_exposure=0)
gain : Gain value when manual controlled (auto_exposure=0)
mat_resize_factor : Image/Measures resize factor
max_depth : The maximum depth range
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 documetation on Stereolabs website: https://docs.stereolabs.com/integrations/ros/zed_node/
Using the URDF file
The zed-ros-wrapper provides 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.
3D mapping using RTAB-map
An example package is provided to interface with the RTAB-map package and to start to generate 3D maps:
roslaunch zed_rtabmap_example zed_rtabmap.launch
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