Cannot build micro-ros for Android device

Open
#683 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, cmake, shell

Research direction

Start with the micro_ros_demos_rclc CMakeLists.txt at line 6 and the microcdr configuration reported under firmware/mcu_ws/install; trace why the Android build rejects the installed microcdr version. Re-run build_firmware.sh with the listed Android environment and confirm the package, including micro_ros_demos_rclc, builds successfully.

Written by the indexing model from the issue text.

Description

Issue template

  • Hardware description: arm64-v8a
  • RTOS: Ubuntu 22.04 through WSL2
  • Installation type: micro_ros_setup
  • Version or commit hash: humble
Steps to reproduce the issue

On the host machine, run:

mkdir microros_ws && cd microros_ws
git clone -b humble https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup
rosdep update && rosdep install --from-paths src --ignore-src -y
colcon build
source install/local_setup.bash
ros2 run micro_ros_setup create_firmware_ws.sh android generic
ros2 run micro_ros_setup configure_firmware.sh
ros2 run micro_ros_setup build_firmware.sh ~/android_sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake
Expected behavior

Micro-ros is built correctly.

Actual behavior

An error is raised when building the package micro_ros_demos_rclc.
The error is the following:

Starting >>> micro_ros_demos_rclc
--- stderr: micro_ros_demos_rclc
CMake Error at /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rosidl_typesupport_microxrcedds_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
  Could not find a configuration file for package "microcdr" that is
  compatible with requested version "".

  The following configuration files were considered but not accepted:

    /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/microcdr/cmake/microcdrConfig.cmake, version: 2.0.1 (64bit)

Call Stack (most recent call first):
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rosidl_typesupport_microxrcedds_c/cmake/rosidl_typesupport_microxrcedds_cConfig.cmake:41 (include)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rosidl_typesupport_c/cmake/rosidl_typesupport_c-extras.cmake:13 (find_package)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cConfig.cmake:41 (include)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/builtin_interfaces/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/builtin_interfaces/cmake/builtin_interfacesConfig.cmake:41 (include)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rcl_interfaces/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rcl_interfaces/cmake/rcl_interfacesConfig.cmake:41 (include)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rcl/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /home/user_ai_001/microros_ws/firmware/mcu_ws/install/share/rcl/cmake/rclConfig.cmake:41 (include)
  CMakeLists.txt:6 (find_package)


gmake[2]: *** [CMakeFiles/graph_visualizer.dir/build.make:95: graph_introspection/graph_visualizer/src/graph_visualizer-stamp/graph_visualizer-configure] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:192: CMakeFiles/graph_visualizer.dir/all] Error 2
Additional information

The following environment variables are set:

export ANDROID_HOME='~/android_sdk/'
export ANDROID_NDK='~/android_sdk/ndk/25.2.9519653'
export ANDROID_NATIVE_API_LEVEL=android-31
export ANDROID_ABI=arm64-v8a
Dominant language
Shell
Stars
509
Forks
183
Avg merge
22h 26m
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micro-ROS/micro_ros_setup

All issues in micro-ROS/micro_ros_setup

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.