使用Eclipse 2021-06构建软件包
你不能使用Eclipse创建ROS 2软件包,你需要使用命令行工具进行创建。请按照 创建软件包 教程操作。
在创建项目之后,你可以使用Eclipse编辑源代码并进行构建。
我们启动Eclipse并选择一个Eclipse工作空间。

我们创建一个C++项目。


我们看到我们获得了C++的包含文件。

我们现在导入我们的ROS 2项目。代码仍然位于旧位置。



我们在源代码中看到C++的包含已经解决了,但ROS 2的还没有。



现在我们看到ROS 2的包含也已经解决了。

添加 Builder colcon,以便我们可以在项目上右键单击并选择“构建项目”进行构建。


使用 PYTHONPATH,您还可以构建 Python 项目。


右键单击项目,然后选择"构建项目"。
