[Documentation] [TitleIndex] [WordIndex

!

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Viewing Your First Point Cloud in RViz

Description: This tutorial introduces the basic Ensenso camera node. We will open an Ensenso camera, request a point cloud and view it in RViz.

Tutorial Level: BEGINNER

Next Tutorial: Setting Parameters

Installation

To build the package, you will need to download and install the Ensenso SDK. Note that the ROS package need at least version 2.0 of the SDK. Older versions are not supported.

Opening a Camera

The most important node of this package is the ensenso_camera_node. It opens a single stereo camera and provides actions for setting up this camera and requesting data from it. To open you camera, simply run

$ rosrun ensenso_camera ensenso_camera_node

If your computer is connected to more than one Ensenso stereo camera, the node will open the first one it encounters. In that case, you might want to specify the camera you want to open with the serial parameter.

Requesting Data

To receive data from the camera, you have to request it with the request_data action (ensenso_camera_msgs/RequestData). The action allows to specify, which data you need (e.g. images or a point cloud) and how you want to receive it. All data can either be included in the response of the request_data action or published on the corresponding topics.

The simplest way to request data is to use the request_data script. By default, it periodically requests all possible data from the camera node. You can then inspect this data by listening to the corresponding topics.

$ rosrun ensenso_camera request_data

While this node runs, you can now visualize the point cloud by adding the topic /point_cloud to RViz. You can also get the raw camera images on /raw/left/image and /raw/right/image as well as the disparity map on /disparity_map.

By default, all data produced by the camera node is in the <serial>_optical_frame, where <serial> denotes the camera serial of the ensenso camera. To show this data in RViz you have to change the fixed frame or provide a transformation between this frame and the map frame.

If you want to integrate the camera with other data, you can change the camera frame or perform a camera calibration. See the tutorial on camera frames for more information.

Screenshot of RViz showing data from an Ensenso camera node

By default, all published topics are in the global namespace. If you want to use multiple camera nodes as once, you will have to push them into different namespaces with the ROS namespace system.


2020-01-25 12:37