Skip to content

Conversation

@jacobperron
Copy link
Contributor

@jacobperron jacobperron commented Jul 29, 2020

This is a work in progress; still troubleshooting build issues.

Changes made so far:

  • Switch to colcon instead of ament build
  • Change ANDROID_STL value to c++_shared (as gnustl_shared is no longer supported)
  • Updated the repos file to reflect what is in Dashing, minus the Qt packages (c9498cd)

I've left commented out additional build options that I'm not sure how to port to the new colcon command.

Following the steps in in this PR, I get the following build error with ament_cmake_libraries:

--- stderr: ament_cmake_libraries
CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "Findament_cmake_core.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ament_cmake_core", but CMake did not find one.

  Could not find a package configuration file provided by "ament_cmake_core"
  with any of the following names:

    ament_cmake_coreConfig.cmake
    ament_cmake_core-config.cmake

  Add the installation prefix of "ament_cmake_core" to CMAKE_PREFIX_PATH or
  set "ament_cmake_core_DIR" to a directory containing one of the above
  files.  If "ament_cmake_core" provides a separate development package or
  SDK, be sure it has been installed.


---

I'm not sure what's going wrong.

@jacobperron jacobperron mentioned this pull request Jul 29, 2020
@esteve
Copy link
Member

esteve commented Jul 30, 2020

@jacobperron this is awesome, thanks! I'll add my progress here as well and hopefully we can update the CI shortly.

One comment, though. The android repos file should be kept as minimal as possible, some of the packages may not work (e.g. I haven't tested rosbag2, and last time I tried compiling rclcpp it didn't work). The current repos file in master only has what's needed up to rcljava, because what most Android developers would use is the Java layer, not C++.

Thanks again!

README.md Outdated
-DCOMPILE_EXAMPLES=OFF

# TODO: These options may still need to be adapted
# -DCMAKE_FIND_ROOT_PATH="$AMENT_WORKSPACE/install_isolated;$ROS2_ANDROID_WORKSPACE/install_isolated" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is what is causing CMake not to be able to find the ament packages, I'll compile this PR with this enabled and hopefully it should work.

@jacobperron
Copy link
Contributor Author

The android repos file should be kept as minimal as possible, some of the packages may not work (e.g. I haven't tested rosbag2, and last time I tried compiling rclcpp it didn't work).

+1 I wasn't sure what packages are desired. Feel free to reduce scope for packages that don't make sense.

@esteve
Copy link
Member

esteve commented Aug 24, 2020

@jacobperron one of the tests fails for desktop (rcljava_tests_org.ros2.rcljava.node.NodeTest) on the CI, does it pass for you locally? There's an issue building the examples for Android caused by Gradle, I'll look into that and once all this is fixed we can merge these changes into dashing and then into master (finally!)

@jacobperron
Copy link
Contributor Author

@esteve looks like NodeTest is flaky (it's passing on the latest CI run).
I'll try to reproduce the failure locally and report back.

@jacobperron
Copy link
Contributor Author

I wasn't able to reproduce the NodeTest failure. Not sure where it is going wrong.

@esteve
Copy link
Member

esteve commented Sep 18, 2020

@jacobperron I've updated the instructions with the steps for Android. The Gradle plugin is not working currently with colcon, so I'm only building up to rcljava.

@jacobperron
Copy link
Contributor Author

I've updated the instructions with the steps for Android. The Gradle plugin is not working currently with colcon, so I'm only building up to rcljava.

Awesome, thanks! Do you want to open a ticket for the issue with Gradle plugin or wait until we fix it as part of this PR?


I've pushed few more changes to make CI more portable.

@esteve
Copy link
Member

esteve commented Sep 30, 2020

@jacobperron I missed your last comment, sorry. I've created #137 I'll update the description later when I have a better idea of why it's failing, but I think it's best to move on and merge this when a big note that warns users that the Gradle plugin does not work.

@jacobperron jacobperron force-pushed the jacob/android_instructions branch from be6fe3e to 0a231ea Compare October 7, 2020 22:03
@jacobperron jacobperron merged commit a3fa46d into jacob/update_readme Oct 8, 2020
@jacobperron jacobperron deleted the jacob/android_instructions branch October 8, 2020 22:51
jacobperron added a commit that referenced this pull request Dec 4, 2020
* Use curl for consistency

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update build badges

Currently, we only have CI for Dashing on Linux.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update URLs

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Minor formatting changes

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update build instructions for desktop

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Use different header markdown syntax

For more granularity in header levels.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix whitespace formatting

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Formatting

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add ref to ticket for ROS time

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* 'merge install' for Windows

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix typo

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update Android instructions with CI (#125)

* Update Android instructions

This is a work in progress, still troubleshooting build issues.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update Android repos file

Now the repos file contains all packages in the upstream dashing repos file, without the Qt packages:

https://github.com/ros2/ros2/blob/dashing/ros2.repos
Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Added job for Android

* Only build the rcljava subset of dependencies

* Fix URL

* Replace ros-tooling scripts with plain commands

* Fix typo

* Install vcstool for vcs

* Install Android NDK

* Add ros2_java workspace to CMake find root path

* Disable building tests

* Do not build osrf_testing_tools_cpp as it uses execinfo.h, which is not available on Android

* Workaround for Android

* Reenable building tests

* Skip cyclonedds for now

* Install lark parser

* Install python3-dev

* Pass PYTHON_LIBRARY and PYTHON_INCLUDE_DIR to the CMake Python module

* Skip rcl_logging_log4cxx

* Use rmw fork for Android. Skip CycloneDDS packages

* Revert to 1.6

* Configure log4j dynamically to avoid errors when building for Android

* Configure log4j dynamically to avoid errors when building for Android

* Switch to jacob/instructions temporarily

* Fix compilation error

* Trim repos file for Android

* Readd googletest repo

* Fix missing import

* Build entire workspace

* Only build up to the Android examples

* Install colcon extensions for Gradle

* Revert changes for desktop

* Move ros2_android repo to ros2-java org

* Install Gradle

* Build rcljava_examples

* Install Gradle

* Do not build rcljava_examples temporarily

* Update README.md

* Do not use fork

* Use repos files from GitHub workspace

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add checkout action for cloning the branch to test

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Use version of ros2_java in the branch being tested

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Switch back to dashing branch

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

Co-authored-by: Esteve Fernandez <esteve@apache.org>

Co-authored-by: Esteve Fernandez <esteve@apache.org>
jacobperron added a commit that referenced this pull request May 17, 2021
* Use curl for consistency

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update build badges

Currently, we only have CI for Dashing on Linux.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update URLs

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Minor formatting changes

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update build instructions for desktop

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Use different header markdown syntax

For more granularity in header levels.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix whitespace formatting

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Formatting

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add ref to ticket for ROS time

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* 'merge install' for Windows

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix typo

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update Android instructions with CI (#125)

* Update Android instructions

This is a work in progress, still troubleshooting build issues.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Update Android repos file

Now the repos file contains all packages in the upstream dashing repos file, without the Qt packages:

https://github.com/ros2/ros2/blob/dashing/ros2.repos
Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Added job for Android

* Only build the rcljava subset of dependencies

* Fix URL

* Replace ros-tooling scripts with plain commands

* Fix typo

* Install vcstool for vcs

* Install Android NDK

* Add ros2_java workspace to CMake find root path

* Disable building tests

* Do not build osrf_testing_tools_cpp as it uses execinfo.h, which is not available on Android

* Workaround for Android

* Reenable building tests

* Skip cyclonedds for now

* Install lark parser

* Install python3-dev

* Pass PYTHON_LIBRARY and PYTHON_INCLUDE_DIR to the CMake Python module

* Skip rcl_logging_log4cxx

* Use rmw fork for Android. Skip CycloneDDS packages

* Revert to 1.6

* Configure log4j dynamically to avoid errors when building for Android

* Configure log4j dynamically to avoid errors when building for Android

* Switch to jacob/instructions temporarily

* Fix compilation error

* Trim repos file for Android

* Readd googletest repo

* Fix missing import

* Build entire workspace

* Only build up to the Android examples

* Install colcon extensions for Gradle

* Revert changes for desktop

* Move ros2_android repo to ros2-java org

* Install Gradle

* Build rcljava_examples

* Install Gradle

* Do not build rcljava_examples temporarily

* Update README.md

* Do not use fork

* Use repos files from GitHub workspace

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add checkout action for cloning the branch to test

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Use version of ros2_java in the branch being tested

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Switch back to dashing branch

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

Co-authored-by: Esteve Fernandez <esteve@apache.org>

Co-authored-by: Esteve Fernandez <esteve@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants