I've followed the tutorial which you presented in the ReadME. Now I'm trying to get to know the defaults.yaml file, as I would have to modify this when I start to include my own ROS2 packages. As a soft start, I'm trying to change the name of the build directory (build-base), however, this is not reflected when running the cross-compilation (see my defaults.yaml below). What am I doing wrong? I'm only able to change the build directory name when doing it directly in the .local/lib/python3.8/site-packages/ros_cross_compile/docker/build_workspace.sh file.
Eventually, I would need to adjust "--paths --build-base --install-base --symlink-install" in the defaults.yaml file to match my current shell script seen in "Additional context". Hints about the syntax required for this would be appreciated.
Additional question: The ReadME here shows one syntax for the defaults.yaml file, while the official colcon configuration documentation shows another configuration. Which syntax should I use?
Expected Behavior
The build directory should be named my_build instead of the default build_aarch64.
Actual Behavior
The build directory is still named its default name, namely build_aarch64 in my case.
To Reproduce
I'm simply following the guide you have on your ReadME.
Create a defaults.yaml file. It's a copy of the one from the guide, plus the build-base line.
build:
# only build the demo_nodes_cpp package, to save time building all of the demos
build-base: "my_build"
packages-up-to:
- demo_nodes_cpp
# make a merged install space, which is easier to distribute
merge-install: true
# add some output for readability
event-handlers:
- console_cohesion+
- console_package_list+
Run the cross-compilation
ros_cross_compile . --rosdistro galactic --arch aarch64 --os ubuntu --colcon-defaults ./defaults.yaml
Host System
OS: Ubuntu 20.04
ROS 2 Distro: Galactic
Device: Laptop
Target System
OS: Ubuntu 20.04
ROS 2 Distro: Galactic
Device: RPI CM4
Additional context
My reason for looking into cross-compilation in the first place is that I am currently building my ROS2 Galactic software stack directly on the CM4, which takes ~45 min. On my computer, it takes ~5 min. I hope that through cross-compilation, I can build the software stack on my computer and then transfer the install files to the CM4 to be executed. This process, I hope, takes less than the current ~45 min. Do you guys believe this should be the case?
Eventually, I'll have to replicate these parts of my current shell script, but for the cross-compilation to a CM4.
Description
I've followed the tutorial which you presented in the ReadME. Now I'm trying to get to know the defaults.yaml file, as I would have to modify this when I start to include my own ROS2 packages. As a soft start, I'm trying to change the name of the build directory (build-base), however, this is not reflected when running the cross-compilation (see my defaults.yaml below). What am I doing wrong? I'm only able to change the build directory name when doing it directly in the .local/lib/python3.8/site-packages/ros_cross_compile/docker/build_workspace.sh file.
Eventually, I would need to adjust "--paths --build-base --install-base --symlink-install" in the defaults.yaml file to match my current shell script seen in "Additional context". Hints about the syntax required for this would be appreciated.
Additional question: The ReadME here shows one syntax for the defaults.yaml file, while the official colcon configuration documentation shows another configuration. Which syntax should I use?
Expected Behavior
The build directory should be named my_build instead of the default build_aarch64.
Actual Behavior
The build directory is still named its default name, namely build_aarch64 in my case.
To Reproduce
I'm simply following the guide you have on your ReadME.
Create a directory and checkout sources
Create a defaults.yaml file. It's a copy of the one from the guide, plus the build-base line.
Run the cross-compilation
ros_cross_compile . --rosdistro galactic --arch aarch64 --os ubuntu --colcon-defaults ./defaults.yaml
Host System
Target System
Additional context
My reason for looking into cross-compilation in the first place is that I am currently building my ROS2 Galactic software stack directly on the CM4, which takes ~45 min. On my computer, it takes ~5 min. I hope that through cross-compilation, I can build the software stack on my computer and then transfer the install files to the CM4 to be executed. This process, I hope, takes less than the current ~45 min. Do you guys believe this should be the case?
Eventually, I'll have to replicate these parts of my current shell script, but for the cross-compilation to a CM4.