Skip to content

unable to build ros2_android_examples #11

@AviKenz

Description

@AviKenz

Hallo,

First i want to thank you for what you have done and apologize for my english. im not a native speaker...

im trying to develop an android app which communicate with ros2 for my master thesis. and im facing some issues... a lot ! im struggling with them since 3 days now :(

i followed your instructions more than 12 times. but i am always blocked anyhow.

the ament part works fine by me. so i can build it without problems. but when building the android part (ament build .....) i get many warnings like this:

[ 4%] Building CXX object src/cpp/CMakeFiles/fastrtps.dir/utils/IPFinder.cpp.o
-- Looking for pthread_setaffinity_np in pthread
-- Looking for pthread_setaffinity_np in pthread - not found
-- Platform has not PTHREAD_SETAFFINITY_NP
In file included from /home/avikenz/Masterarbeit/Workspace/ros2_android/src/eProsima/Fast-RTPS/src/cpp/utils/IPFinder.cpp:20:
In file included from /home/avikenz/Masterarbeit/Workspace/ros2_android/src/eProsima/Fast-RTPS/include/fastrtps/utils/IPFinder.h:28:
/home/avikenz/Masterarbeit/Workspace/ros2_android/src/eProsima/Fast-RTPS/include/fastrtps/utils/../rtps/common/Locator.h:346:13: warning:
ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
std::remove(m_locators.begin(), m_locators.end(), loc);
^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)

but the build process continue continues despite the warning BUT at the end i have following message: Failed packages: rcljava_common

I had to downgrade to java 8 and i took exactly the same NDK version like you (16b).

i tried to continue despite the "unsuccesfull" build by opening an android_example (in android studio) but....

  • i get some gradle related issues which i resolve by changing distributionUrl located in local.properties (i enter an url with a lower version 3.3). after that the gradle proceed fine

  • i also have a "cannot resolve symbol" error on every org.ros2.xx.xxx.xx classes. I resolved them by adding the classes manually to the project (its normal like this ? i thought the ros2 classes would be recognised automatically... maybe im wrong)

  • i also have an "cannot resolve std_msgs" error in TalkerNode.java. i dont know how i can resolve that

when i try to build the project despite the unresolved error about std_msgs, i get the following:Missing Ament Gradle property: ament.build_space. im not getting any gradle.properties file as you mentioned HERE and i have no idea how to fix or workaround this error.

I need your help PLEASE !!!!!

ubuntu: 18.04 Bionic
NDK: 16b
SDK: 29
gradle: 4.4.1
jdk: 8
Android Sutio: lastest

my email: kennefoue@gmail.com

THANK IN ADVANCE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions