-
Notifications
You must be signed in to change notification settings - Fork 108
Fast-forward merge dashing to main #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
README.md
Outdated
| mkdir -p ${ROS2_ANDROID_WORKSPACE}/src | ||
| cd ${ROS2_ANDROID_WORKSPACE} | ||
| wget https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_android.repos | ||
| wget https://raw.githubusercontent.com/ros2-java/ros2_java/dashing/ros2_java_android.repos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was not introduced in this branch, but given that it touches it, could you replace the wget call with curl to make it consistent with https://github.com/ros2-java/ros2_java/pull/117/files#diff-04c6e90faac2675aa89e2176d2eec7d8R102 ? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been meaning to update the README anyways. #119 updates the README for dashing. I'll add it to this fast-forward to master after it is merged.
| type: git | ||
| url: https://github.com/ros2/ament_cmake_ros.git | ||
| version: 0.5.0 | ||
| version: dashing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be master now that we intend to merge dashing into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. Though, I'm planning to make this change after the fast-forward. This way the commits on dashing and master will be even up to the point where we start making changes for Eloquent and beyond.
rosidl_generator_java/src/test/java/org/ros2/generator/InterfacesTest.java
Show resolved
Hide resolved
| logger.info("Using RMW implementation: {}", RCLJava.getRMWIdentifier()); | ||
| initialized = true; | ||
| } | ||
| public static synchronized void rclJavaInit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locking at the method level would only prevent multiple calls to rclJavaInit, but globalExecutor needs to be protected as well, hence the use of synchronized at the class level and not at the method level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true. My understanding is that synchronizing the static method acquires the same class-level lock as the one used in getGlobalExecutor. I.e. I believe the following two are equivalent:
public static synchronized void rclJavaInit() {
...
}and
public static void rclJavaInit() {
synchronized (RCLJava.class) {
...
}
}cf2ef07 to
d270e67
Compare
|
I've rebased this PR and targeted @ivanpauno Let me know if this batch of changes will make porting things from our fork easier and we can merge it first. |
|
@esteve it would be great if you could take another look at the changes proposed in this PR. It will effectively make |
|
@jacobperron is this a fast-forward from https://github.com/osrf/ros2_java/commits/dashing? I see some changes in https://github.com/ros2_java/ros2_java/commits/dashing that aren't here. More info # i.e. ros2_java:dashing has all commits that osrf:dashing has d4163f8 # i.e. There are 13 commits in ros2_java:dashing not in osrf:dashing There are also 8 commits on osrf:dashing that aren't in osrf:galactic_devel, and there were some conflicts when rebasing 😕. |
05c98dd to
d4163f8
Compare
* Update rosidl_generator_java for new IDL pipeline Supporting ROS Dashing or later. Signed-off-by: Jacob Perron <[email protected]> * Fix name JNI name mangling Accidentally broken during update. Signed-off-by: Jacob Perron <[email protected]> * Remove java compile flags This remove some compile warnings. Signed-off-by: Jacob Perron <[email protected]> * Refactor to support services Signed-off-by: Jacob Perron <[email protected]> * Wide string support Signed-off-by: Jacob Perron <[email protected]> * Avoid duplicate includes Signed-off-by: Jacob Perron <[email protected]> * Use test_interface_files Signed-off-by: Jacob Perron <[email protected]> * Support for actions Signed-off-by: Jacob Perron <[email protected]> * Add suffix for long literals Signed-off-by: Jacob Perron <[email protected]> * Handle unsigned literals Though Java supports unsigned values, it doesn't support unsigned literals (ie. literals that are larger than the max signed value). As a workaround, we can convert the literal to it's negative equivalent. Signed-off-by: Jacob Perron <[email protected]> * Fix escape string function Signed-off-by: Jacob Perron <[email protected]> * Use cast to workaround integer literals Otherwise the compiler complains about potential loss of data. Signed-off-by: Jacob Perron <[email protected]> * Minor refactor Signed-off-by: Jacob Perron <[email protected]> * Remove TODO Signed-off-by: Jacob Perron <[email protected]>
* Update API for getting rcl error string Signed-off-by: Jacob Perron <[email protected]> * Add implementation for ROS Context A context represents an init/shutdown cycle and is used in the creation of top level entities like nodes and guard conditions. For convenience, a default context is created when rcljava is initialized. Signed-off-by: Jacob Perron <[email protected]> * Add implementation for Clock Signed-off-by: Jacob Perron <[email protected]> * Update for Dashing support * Update wait set API calls * Update entity creation API calls * Use Context objects to check 'ok()' status * Add Clock and Context members to NodeImpl * Fix static member reference: 'this.defaultContext' -> 'RCLJava.defaultContext' Signed-off-by: Jacob Perron <[email protected]> * Avoid hiding errors when cleaning up init options Signed-off-by: Jacob Perron <[email protected]> * Disable tests Signed-off-by: Jacob Perron <[email protected]> * Fix typos in JNI library files Signed-off-by: Jacob Perron <[email protected]> * Fix native node method signature Signed-off-by: Jacob Perron <[email protected]> * Populate missing QoS settings with defaults Otherwise we run into a runtime error about Fast-RTPS not supporting liveliness. Signed-off-by: Jacob Perron <[email protected]> * Fix issues with Clock class * Load with JNIUtils * Rename native create method for consistency * Fix bug in native implementation Signed-off-by: Jacob Perron <[email protected]> * Enable linter tests Signed-off-by: Jacob Perron <[email protected]> * Fix lint errors Signed-off-by: Jacob Perron <[email protected]> * Enable RCLJava test and fix bugs * Use Context.ok() and deprecate RCLJava.isInitialized(). * Move implementation loading to static initialization code. Otherwise, calls to getDefaultContext() fail if called before rclJavaInit(). It wasn't clear to me why the implementation should be loaded in a separate function call. We can probably refactor the code to avoid the error if we want to move the loading back into rclJavaInit(). * Refactor test into one init/shutdown test. Previously, not calling RCLJava.shutdown() was leaving a context around between tests. Signed-off-by: Jacob Perron <[email protected]> * Fix NodeTest Signed-off-by: Jacob Perron <[email protected]> * Enable most tests Tests that involve services are broken due to issues related to interface generation. There's a separate PR for a fix: #76. Signed-off-by: Jacob Perron <[email protected]>
* Update rosidl_generator_java tests Now using messages from test_interface_files. Signed-off-by: Jacob Perron <[email protected]> * Remove old interface files Signed-off-by: Jacob Perron <[email protected]>
The package does not exist. Signed-off-by: Jacob Perron <[email protected]>
This fixes some fatal runtime errors during testing. Signed-off-by: Jacob Perron <[email protected]>
* Fix service and action interface generation Before, we were not generating code for the messages and services that make up service and action interfaces. Due to issues with duplicate definitions caused by instantiating the msg.cpp.em template multiple times, I've opted to generate separate files for each service, action, and the interfaces that they are made of. This is similar to what we are doing with the generated Java code. I've added a test confirming that generated service code can be used. Adding a test for actions is difficult at the moment due to a circular dependency with action_msgs. Signed-off-by: Jacob Perron <[email protected]> * Add missing header include Signed-off-by: Jacob Perron <[email protected]> * Rename top level generated cpp file This avoids name clashing with other generated files. Similar to what we do with generated Java files. Signed-off-by: Jacob Perron <[email protected]> * Fix JNI name mangling function so it works for service and action subtypes For example, 'example_interfaces/srv/AddTwoInts_Request' should be mangled to 'example_1interfaces_srv_AddTwoInts_1Request'. Signed-off-by: Jacob Perron <[email protected]> * Remove vestigal references to jni_package_name Signed-off-by: Jacob Perron <[email protected]> * Add comment about action and service headers Signed-off-by: Jacob Perron <[email protected]> * Simplify include logic Signed-off-by: Jacob Perron <[email protected]>
* Fix service and action interface generation Before, we were not generating code for the messages and services that make up service and action interfaces. Due to issues with duplicate definitions caused by instantiating the msg.cpp.em template multiple times, I've opted to generate separate files for each service, action, and the interfaces that they are made of. This is similar to what we are doing with the generated Java code. I've added a test confirming that generated service code can be used. Adding a test for actions is difficult at the moment due to a circular dependency with action_msgs. Signed-off-by: Jacob Perron <[email protected]> * Add missing header include Signed-off-by: Jacob Perron <[email protected]> * Rename top level generated cpp file This avoids name clashing with other generated files. Similar to what we do with generated Java files. Signed-off-by: Jacob Perron <[email protected]> * Fix JNI name mangling function so it works for service and action subtypes For example, 'example_interfaces/srv/AddTwoInts_Request' should be mangled to 'example_1interfaces_srv_AddTwoInts_1Request'. Signed-off-by: Jacob Perron <[email protected]> * Remove vestigal references to jni_package_name Signed-off-by: Jacob Perron <[email protected]> * Add comment about action and service headers Signed-off-by: Jacob Perron <[email protected]> * Simplify include logic Signed-off-by: Jacob Perron <[email protected]> * Rename cpp headers to have .hpp suffix Signed-off-by: Jacob Perron <[email protected]> * Update files to reflect new header suffix This resolves a cppcheck linter error complaining about "is invalid C code". Changing the suffix causes cppcheck to treat the files as C++ code. Signed-off-by: Jacob Perron <[email protected]> Co-authored-by: Esteve Fernandez <[email protected]>
We don't need to build everything from source, only some of the ROS interface packages. Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
* Add dashing workflow Using the ros-tooling custom GitHub actions Signed-off-by: Jacob Perron <[email protected]> * Update repos file URL Signed-off-by: Jacob Perron <[email protected]>
* Add example_interfaces to desktop repos file This package is required by rcljava_examples. Signed-off-by: Jacob Perron <[email protected]> * Append .git to repository URLs for consistency Signed-off-by: Jacob Perron <[email protected]>
* Fix README with correct branch in the instructions. * Update README instructions repository links. Changed the repository links from a private github account to ROS2 Organisation repositories links. Co-authored-by: Niels Tiben <[email protected]>
…85) * Re-enable tests related to services Signed-off-by: Jacob Perron <[email protected]> * Add Client methods for checking and waiting for service availability These methods are very useful for allowing a client to wait for a service to be available before making requests. Signed-off-by: Jacob Perron <[email protected]> * Refactor ClientTest to avoid repeatedly sending requests Signed-off-by: Jacob Perron <[email protected]>
* Android part pul command use the wrong reops Signed-off-by: Jay Hou <[email protected]>
Generate action code for: * `<goal_name>_SendGoal_Request` * `<goal_name>_SendGoal_Response` * `<goal_name>_GetResult_Request` * `<goal_name>_GetResult_Response`
This fixes CI while we wait for an upstream issue to be resolved. See ament/ament_lint#252 Signed-off-by: Jacob Perron <[email protected]>
* Add methods to remove entities from Node When an entity is disposed, make sure to also remove it from the Node. This resolves an issue where invalid entities may be used by other classes or users. For example, a disposed Subscription being accessed by the executor. Fixes #105 Signed-off-by: Jacob Perron <[email protected]> * Add tests for disposing publishers, services, and clients Signed-off-by: Jacob Perron <[email protected]> * Rename test Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
* clear node/context handle on RclJava.cleanup() * clear publishers, subscriptions, clients, services and timers on Node.dispose()
* Remove redundant code generation The request and response messages are already generated as part of the srv template. Signed-off-by: Jacob Perron <[email protected]> * Strip action service suffixes from C include prefix The generated C headers for actions are included in a single header named after the action. Signed-off-by: Jacob Perron <[email protected]> * Generate Java code for SendGoal and GetResult service definitions Though not strictly necessary, it is nice to have definitions for these action-specific services for the purpose of writing unit tests. Signed-off-by: Jacob Perron <[email protected]> * Compile generated service definitions for actions Previously, though we were generated service definitions for actions we were not compiling them. Signed-off-by: Jacob Perron <[email protected]>
* Use curl for consistency Signed-off-by: Jacob Perron <[email protected]> * Update build badges Currently, we only have CI for Dashing on Linux. Signed-off-by: Jacob Perron <[email protected]> * Update URLs Signed-off-by: Jacob Perron <[email protected]> * Minor formatting changes Signed-off-by: Jacob Perron <[email protected]> * Update build instructions for desktop Signed-off-by: Jacob Perron <[email protected]> * Use different header markdown syntax For more granularity in header levels. Signed-off-by: Jacob Perron <[email protected]> * Fix whitespace formatting Signed-off-by: Jacob Perron <[email protected]> * Formatting Signed-off-by: Jacob Perron <[email protected]> * Add ref to ticket for ROS time Signed-off-by: Jacob Perron <[email protected]> * 'merge install' for Windows Signed-off-by: Jacob Perron <[email protected]> * Fix typo Signed-off-by: Jacob Perron <[email protected]> * Update Android instructions with CI (#125) * Update Android instructions This is a work in progress, still troubleshooting build issues. Signed-off-by: Jacob Perron <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Add checkout action for cloning the branch to test Signed-off-by: Jacob Perron <[email protected]> * Use version of ros2_java in the branch being tested Signed-off-by: Jacob Perron <[email protected]> * Switch back to dashing branch Signed-off-by: Jacob Perron <[email protected]> Co-authored-by: Esteve Fernandez <[email protected]> Co-authored-by: Esteve Fernandez <[email protected]>
* Bump version of ros-tooling/setup-ros to 0.1.0 Signed-off-by: Jacob Perron <[email protected]> * Bump version of ros-tooling/action-ros-ci to 0.1.0 Signed-off-by: Jacob Perron <[email protected]>
* Remove test dependency on rosidl_typesupport_connext_c Signed-off-by: Jacob Perron <[email protected]> * Remove Connext packages from Android repos file Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
This also works around the problem of assigning to an 'incompatible type', but looks much cleaner. Signed-off-by: Jacob Perron <[email protected]>
d4163f8 to
3ebac76
Compare
Oops, you're right. I forgot to include changes since this PR was opened. I've reapplied changes from |
I have checked locally, I can rebase This isn't actually a fast-forward though, and rebasing again on this branch adds more conflicts. There isn't anything interesting in The changes on the readme were already done in the |
|
Good point. I'm fine just making this the new |
To be more clear, the new |
Right, that's what I meant 👍 |
|
Alright, with all the comments addressed, I've created a new branch |
@esteve If this looks good to you, I can fast-forward merge
dashingintomasterfrom the command line so that the head of each branch is the same.I'll follow-up with any necessary updates to CI and documentation, as well as PRs for compatibility with Eloquent.