ros2-java / ros2_java

Java and Android bindings for ROS2
Apache License 2.0
162 stars 91 forks source link

Android build fail on foxy and galactic #205

Open Hdron opened 2 years ago

Hdron commented 2 years ago

I have tried to build and install ROS2 java for Android with foxy on my standard OS and also docker with galactic distro, both have ubuntu 20.04.

I start to face problems at step 5. colcon build \ --packages-ignore cyclonedds rcl_logging_log4cxx rosidl_generator_py \ --packages-up-to rcljava \ --cmake-args \ -DPYTHON_EXECUTABLE=${PYTHON3_EXEC} \ -DPYTHON_LIBRARY=${PYTHON3_LIBRARY} \ -DPYTHON_INCLUDE_DIR=${PYTHON3_INCLUDE_DIR} \ -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \ -DANDROID_FUNCTION_LEVEL_LINKING=OFF \ -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \ -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} \ -DANDROID_STL=c++_shared \ -DANDROID_ABI=${ANDROID_ABI} \ -DANDROID_NDK=${ANDROID_NDK} \ -DTHIRDPARTY=ON \ -DCOMPILE_EXAMPLES=OFF \ -DCMAKE_FIND_ROOT_PATH="${PWD}/install"

I get the following error code: FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/ros2_android_ws/install_isolated/local_setup.bash' There is no folder named "install_isolated" in ros2_android_ws, should it exist and if so why is it missing. I followed the instruction step by step multiple times from scratch but always failing in the end. My ultimate goal is to be able to setup a ROS2 distribution that can be run on top of Android on a stand alone android device. Would really appreciate if I could get some guidance, love the idea with this repo otherwise. Good job!

YasuChiba commented 2 years ago

You can try this. https://github.com/YasuChiba/ros2-android-build