ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Is there any compiling conflict between latest ROS2 and ROS1?

Hi,

I just tried to build up latest ROS2 on a Ubuntu system on which ROS1 was previously built.
I met several issues and the building always failed.
However, after I cleared up the ROS1 dependencies with apt-get autoremove, the ROS2 compiling finally succeeded.

Thus I build latest ROS2 on another Ubuntu machine without ROS1 built. It completes very smoothly. All the settings in those two Ubuntu machines are the same.

I’d like to know if there is any conflict between latest ROS2 and ROS1 in building?
Thank you in advance.

Hi @davidhuziji,

As a general rule we encourage users to build ROS2 in a terminal where ROS1 workspace is not sourced. In that case there is no conflict and you should be able to build the ros2 stack without issue.

In some particular cases (like building the ros1_bridge or the kobuki_drivers) there is a need to have both ROS 1 and ROS 2 workspaces sourced as this needs to be able to find both version of the packages to build. Such packages have specific build instructions in their READMEs (ros1_bridge, turtlebot2_demo).

You shouldn’t have to remove any ROS1 package to build all the existing ROS 2 packages.

Can you give more information about the builds that failed and what ROS 1 packages you had to remove?
Thanks!

Hi @marguedas,

Thanks a lot for your detailed reply.

Actually I’m not sure which library exactly cause the conflict. I just remove all the unnecessary ROS1 libraries with apt-get autoremove. One of the related libraries is poco.

I did remove the ROS1 environment setting but it seemed that it didn’t work.

Thanks.