catkin如何与ROS2一起使用?

How catkin is used with ROS2?

我目前正在使用一个名为 smach with melodic 的 ros 包。但是,现在我需要将我的旋律版本升级到 crystal 以支持 ROS2,因为该项目使用 DDS。 SMACH 包依赖于 catkin。是否可以使用 crystal (ROS2) 创建一个 catkin 工作区? 我尝试了以下方法:

source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make

此命令给出了以下结果

Command 'catkin_make' not found, but can be installed with:

sudo apt install catkin

developer@bionic-base:~/catkin_ws$ sudo apt install catkin
[sudo] password for developer: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
catkin : Depends: python-catkin-pkg but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

即使在使用命令

安装python-catkin-pkg 后,此错误仍然存​​在
sudo apt-get install python-catkin-pkg

我也尝试去除柔荑花序对Ubuntu

的依赖

sudo apt-get install cmake python-catkin-pkg python-empy python-nose libgtest-dev

似乎开发人员使用 ament 在 ROS2 中构建他们的包

Example

Tutorial

来源/opt/ros/melodic/setup.bash