[Discourse.ros.org] [Next Generation ROS] How to use Kinect or other Sensors in ROS2?
As it currently stands, it is necessary to do some porting of drivers and packages to bring them from ROS1 to ROS2. Some of those changes are mechanical, so will be easy to do (and possibly automate); some of those changes could be eased by a shim layer. @dirk-thomas created a PR detailing some of the problems, thinking, and solutions here: https://github.com/ros2/design/pull/139 . Feedback on that is welcome.
We haven't done any of the work to create a generic shim yet; the PR link I posted was thoughts on designs and how to ease transition from ROS1 to ROS2. We have a few of the parts in place, but not the bulk of it. We will be doing more work on this in the future to make it easier to port.
If you want to port the kinect2 driver to ROS2 right now, I think you'd have to make a new branch/fork, and do the changes in the separate branch. If you want some ideas on the kinds of things you would have to do, you can look at the https://github.com/ros2/ros_astra_camera driver that we did.
Note that the shim layer mentioned in the design document linked above is mostly at the CMake level. As most sensor drivers rely heavily on nodelets for performance, I don't think foresee shiming as being a suitable approach to port sensors to ROS2. It will likely be better to convert the driver to use ROS2 directly instead, as nodelets don't exist in ROS2 (every node can be a nodelet, see https://github.com/ros2/ros2/wiki/Composition for more details on node composition in a single process).