[Ros2] Package Binaries
OS: Windows 10 ROS 2 Dashing I created a package for ROS 2 Dashing and I was wondering how to generate binaries on Windows 10. I'd like to give my peers only a simple file or a few files, rather than a bunch of folders of Source code.
For ROS 1 and Ubuntu I remember we usesd bloom generate to generate .deb files, but I know that Windows 10 is obviously different. Any insight would be much appreciated!
Asked by zipp39 on 2019-08-29 12:43:32 UTC
Answers
I have no experience with using ROS2 on windows but the installation guide tells you how to build ROS2 from source: https://index.ros.org/doc/ros2/Installation/Dashing/Windows-Development-Setup/#building-the-ros-2-code I assume the same setup/commands will work for building your packages.
Asked by MCornelis on 2019-08-30 09:31:49 UTC
Comments
You will need to be compiling for the correct architecture. The easiest way to do that is to just compile on Windows. If you are, I believe you should be able to direct cmake to install your binaries when you run colcon build
. Add the following to your CMakeLists.txt to install the build binary.
target_include_directories(node_name PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>
)
install(TARGETS
node_name
DESTINATION lib/${PROJECT_NAME}
)
After running colcon build
, you should now have an install directory in your workspace that contains the binary executable. You can zip that up and share it across machines.
Asked by Jacob Hartzer on 2023-03-16 21:18:24 UTC
Comments