lucasw / ros_from_src

Build ros from source without using a PPA in a github action. Probably just copy what archlinux is doing. See also https://github.com/ros-o/ros-o
BSD 3-Clause "New" or "Revised" License
102 stars 16 forks source link

How to install ROS built with this package #16

Open hiqsol opened 1 year ago

hiqsol commented 1 year ago

Ok. Thanks to you, I have the ROS built on Ubuntu 22.04 and my project build with the ROS. :tada: :tada: :tada:

Now I need to spread it over multiple RPis.

Can you please advise me how to install the build? I mean how can I create installable package?

Thank you!

lucasw commented 1 year ago

You want to build it on one rpi, then copy the built files to the others to avoid the lengthy build?

Do a catkin install build, tar/zip up the install/ directory and then copy and decompress on the target computers. If you installed anything through apt install or pip or similar you'll need to repeat those steps because they won't be inside install/, if you don't you'll get exceptions or crashes when the built files try to use dependencies.

If you have custom ros packages you'll very likely have to modify their CMakeLists.txt to instruct the install build what files to install (like the contents of scripts/ for example).

hiqsol commented 1 year ago

Thank you! I've tried to build-install ROS and then copy build/catkin_ws/install dir, but it turned to be not enough. To build my ROS-based project I had to copy also build/ros directory. Everything seems to work but now I'm not sure what is enough to copy to get the ROS built from source completely enough :) If you know any manual on building installable ROS package please let know :) Any public repository doing so is also will help me very much cause I couldn't find how the ROS maintainers create their debian packages.

lucasw commented 1 year ago

Run this to do a catkin install build in each catkin workspace:

catkin config --install --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated
catkin build

It will build everything into a catkin_ws/install (or base_catkin_ws/install or similar) directory, that's what you want to compress and copy to other computers.