These are packages for using Intel RealSense cameras (D400 series) with ROS2.
The following instructions were verified with ROS2 Ardent on Ubutnu 16.04.
Install tag v2.9.1 Intel® RealSense™ SDK 2.0 and follow the instructions under Linux Installation.
-
Install ROS2 Ardent Apalone from binary or source.
# from binary install
$ source /opt/ros/ardent/setup.bash
# from source install
$ cd ~/ros2_ws
$ source install/local_setup.bash
- Goto an existing ros2 workspace, or create one
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
- Clone the latest Intel® RealSense™ ROS2 from here into 'ros2_ws/src/'
$ cd ..
$ ament build --build-tests --symlink-install --only cv_bridge realsense_camera_msgs realsense_ros2_camera
$ source ./install/local_setup.bash
To start the camera node in ROS2, plug in the camera, then type the following command:
# To launch with "ros2 run"
$ ros2 run realsense_ros2_camera realsenes_ros2_camera
# OR, to invoke the executable directly
$ realsense_ros2_camera
This will stream all camera sensors and publish on the appropriate ROS2 topics. PointCloud2 is enabled by default, till we provide ROS2 python launch options.
To start the camera node in ROS2 and view the depth pointcloud in rviz via ros1_bridge:
# firstly self-build ros1_bridge, than refer to section "Example 1b: ROS 2 talker and ROS 1 listener"
# in console #1 launch roscore
$ source /opt/ros/kinetic/setup.bash
$ roscore
# in console #2 launch ros1_bridge
$ source /opt/ros/kinetic/setup.bash
$ cd ~/ros2_ws
$ source ./install/local_setup.bash
$ export ROS_MASTER_URI=http://localhost:11311
$ ros2 run ros1_bridge dynamic_bridge
# in console #3 launch rviz
$ source /opt/ros/kinetic/setup.bash
$ rosrun rviz rviz -d ~/ros2_ws/src/realsense_ros2/realsense_ros2_camera/rviz/ros2.rviz
# in console #4 launch realsense_ros2_camera
$ source ~/ros2_ws/install/local_setup.bash
$ realsense_ros2_camera
This will launch RViz and display the five streams: color, depth, infra1, infra2, pointcloud.
NOTE: in case PointCloud2 stream is not observed, try stop the "realsense_ros2_camera" and re-launch this node from console #4. This's a known issue and workaround is made (right fixing in ros1_bridge, details discussed in ROS discourse).
NOTE: visulization in ROS2 pending on rviz2.
$ ament test --only-packages realsense_ros2_camera
- This ROS2 node does not currently provide any dynamic reconfigure support for camera properties/presets.
- ROS2 compatible unit-tests will be added soon.
A few features to be ported from the latest realsense_ros_camera v2.0.2
- RGB-D point cloud (depth_registered)
- Preset/Controls
Copyright 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*Other names and brands may be claimed as the property of others
Any security issue should be reported using process at https://01.org/security