I'm trying to build the old rosaria package in my ROS2 (Iron Irwini) workspace, but currently encountering an issue during compilation. I've successfully built ROS2 and ros1_bridge from source as per the documentation (in separate workspaces), but when trying to build rosaria (on a new workspace, sourcing the ROS2 setup.bash), I get:

ROS_DISTRO was set to 'iron' before. Please make sure that the environment does not mix paths from different distributions.

Per the official official docs, colcon build should be able to compile ROS1 packages, but apparently catkin (which is used as the build tool) fatally complains about incompatible ROS2 versions.

Is there a way to make the build process ignore the ROS_DISTRO environment variables?

  • $\begingroup$ Welcome to Robotics Stack Exchange! earlier, while migrating from ROS 1 to ROS 2, I used ros1_bridge for some packages. It worked as expected. However, I am unsure what you are trying to achieve in this question. Do you want to use colcon instead of catkin to build a ROS 1 package? OR do you want to use your ROS 1 package in ROS 2? $\endgroup$
    – ravi
    Commented Oct 10, 2023 at 8:07
  • $\begingroup$ @ravi this package isn't mine, I just want to use it, but naturally I need to build it first. SInce I'm using Ubuntu 22.04, I can't install a full ROS1 distribution, but as I've linked to in the question colcon should be able to build the package. $\endgroup$
    – joaocandre
    Commented Oct 10, 2023 at 11:18
  • $\begingroup$ I see. You want to use ros1_bridge but don't have complete ROS 1 distro. As a workaround, you can use ROS 1 inside docker though. $\endgroup$
    – ravi
    Commented Oct 10, 2023 at 12:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.