dusty-nv / jetson-containers

Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
MIT License
1.94k stars 423 forks source link

Use ROS1 noetic on top of ROS2 galactic from source #243

Open kenloumixx opened 1 year ago

kenloumixx commented 1 year ago

Hello, thanks for the great work you did.

If I want to overlay the ROS1 workspace on top of ROS2 workspace, Can I add the commands used in Noetic dockerfile in Dockerfile which is based on galactic docker image?

kenloumixx commented 1 year ago

And another question is, in the docker file that you've made, May I ask what is the argument of '--merge-install' for? I read --merge installation document in colcon but I'd like to ask if it is necessary of if you used it to shortened the environment variables.

dusty-nv commented 1 year ago

If I want to overlay the ROS1 workspace on top of ROS2 workspace,

@kenloumixx I haven't installed ROS1/ROS2 at the same time before, but the ROS forums seem to hint that it's possible:

https://www.google.com/search?q=install+ros1+and+ros2+together+site:answers.ros.org&rlz=1C1GCEB_enUS859US859&sa=X&ved=2ahUKEwiv5bCH_OX-AhVjFFkFHfxeAucQrQIoBHoECBoQBQ&biw=1920&bih=1057&dpr=1

So yes, you can try adding the commands from the Noetic dockerfile to the Galactic dockerfile. You may need to adjust some environment variables such as ROS_ROOT that get set by the build scripts that assume there is only one ROS version installed. Also I think that installing two versions of ROS side-by-side is different than overlaying their workspaces such that the share packages/ect.

I read --merge installation document in colcon but I'd like to ask if it is necessary of if you used it to shortened the environment variables.

I don't recall it being necessary, but yes I use --merge-install to flatten the directory tree and shorten the environment variables as it seems to be a best-practice for deploying ROS installations.