cross_compile
cross_compile copied to clipboard
/share directory and tutorial.repos file are not created after ros_cross_compile
Hi, I am using the tool in a VM running Ubuntu 18.04.04, after the installation (I install the latest Docker engine), I follow the tutorial but after the ros_cross_compile command I realize that:
1.- tutorial.repos is not created in my workspace 2.- the path install_aarch64/share is unreachable because the share directory is not created, I realize this when I copy the directory install_aarch64 to my target device and run
rosdep install --from-paths install_aarch64/share --ignore-src --rosdistro foxy -y
I got an error that says the path install_aarch64/share is not found
What could be the problem?
-
tutorial.repos
is left over from an old version of the tutorial, this is not something that the build should create. I have removed it from the list of files in the README. - Thanks for reporting this! The
install/share
directory will only be there if the build was created with--merge-install
. Otherwise, each individual built package will have its owninstall/PACKAGE/share
directory. For this portion of the tutorial, I would recommend adding merge install to the defaults.yaml. It's easier to use merge-installed colcon outputs across machines, so this is probably best practice for a deployable artifact anyways.
I am also noticing that a bug was introduced in the 0.9 version so that a defaults.yaml
in the workspace directory will not be respected unless explicitly specified.
I have updatd the README in https://github.com/ros-tooling/cross_compile/commit/921884ef5eca9017df390d9e664ce4e1d83e5316 to have the correct commands necessary for the tutorial to work as expected at the moment, and will try to put in a fix for the defaults.yaml
thing shortly.
@emersonknapp Hi, did you test this with a target platform?, now the share directory is created but when I run in my target:
from
sudo apt update && sudo apt install -y python3-rosdep
from
sudo rosdep init
rosdep update
from your tutorial:
rosdep install --from-paths install_aarch64/share --ignore-src --rosdistro foxy -y
I got an error:
E: Unable to locate package ros-foxy-example-interfaces ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install -y ros-foxy-example-interfaces] failed
My target is a custom Linux distribution from Xilinx built from Yocto, its name is Petalinux, and I installed Ubuntu 20.04 LTS arm64 over that distro
Assuming you have APT on this platform and have ROS dependencies you need to install that way, you still need to set up the ROS 2 APT sources as you would for any system, as described at https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html#setup-sources. I have added some language in https://github.com/ros-tooling/cross_compile/commit/ccc64975355d70c8e24dbd3815d7dabb3fd29b28 calling this out.
I am assuming that's the problem you're experiencing here.
Thanks for reporting and following up on these issues - it will improve the experience for others
I already try that, I followed this steps: add the repo, even I installed the development tools, and I get the error I mentioned before
You shouldn't need the development tools - that's for building, which you have already done.
I wonder if maybe the sources setup didn't work correctly for your custom distro.
- Are you able to
sudo apt-cache search ros-foxy
- does this show any packages at all? - What are the contents of
/etc/apt/sources.list.d/ros2.list
? - Are there any errors when you
apt-get update
?
hi @emersonknapp I could solve the error:
E: Unable to locate package ros-foxy-example-interfaces ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install -y ros-foxy-example-interfaces] failed
it was my fault, I was using a 32 bits ubuntu distro in my embedded linux instead a 64 bits, once I run rosdep install --from-paths install_aarch64/share --ignore-src --rosdistro foxy -y
a message says that all rosdep dependencies were installed, then I write this commands:
source install_aarch64/setup.bash
ros2 run demo_nodes_cpp talker
but now I get: -bash: ros2: command not found
I will answer your questions:
1.- Are you able to sudo apt-cache search ros-foxy - does this show any packages at all?
2.- What are the contents of /etc/apt/sources.list.d/ros2.list?
3.- Are there any errors when you apt-get update? no, I can make updates, upgrades and install packages without issues
"Assuming you have APT on this platform and have ROS dependencies you need to install that way, you still need to set up the ROS 2 APT sources as you would for any system"
What dependencies are you talking about?
I used the sudo apt install ros-foxy-ros-base
and then works!, but that step is not in your tutorial
@emersonknapp when testing the demo in the target board you must add the sources for the listener too:
source install_aarch64/setup.bash ros2 run demo_nodes_cpp talker
#and in a different shell, add sources too source install_aarch64/setup.bash ros2 run demo_nodes_cpp listener