-
Notifications
You must be signed in to change notification settings - Fork 133
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
feat: aimrt_py support ros2 protocol interface #95
Merged
AimRT
merged 55 commits into
AimRT:main
from
zhangyi1357:feat/aimrt_py-support-ros2-proto
Nov 21, 2024
Merged
feat: aimrt_py support ros2 protocol interface #95
AimRT
merged 55 commits into
AimRT:main
from
zhangyi1357:feat/aimrt_py-support-ros2-proto
Nov 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
zhangyi1357
commented
Nov 11, 2024
•
edited
Loading
edited
- Add support for publishing and subscribing to ROS2 protocol type messages via the aimrt_py channel
- Add example for publishing and subscribing to ROS2 protocol type messages via the aimrt_py channel. Able to communicate with example code written in cpp.
- Add support for ROS2 protocol type messages via the aimrt_py rpc.
- Add example using ROS2 protocol type messages via the aimrt_py rpc. Able to communicate with example code written in cpp.
- Only supports ros2 serialization type, while C++ supports JSON and YAML serialization
Implement validation functions to ensure message or service types are compliant with ROS 2 standards, enhancing compatibility and error handling when integrating ROS 1 and ROS 2 environments.
Ensure source files are automatically detected during configuration by adding CONFIGURE_DEPENDS to the file globbing commands for C++ and Python files. This improves build reliability as it accounts for changes in the file structure.
Implement functions to register, publish, and subscribe to ROS2 messages, improving interoperability with ROS2 systems. Adjust type support to handle both protobuf and ROS2 message types, streamlining the process of message serialization and ensuring robustness in message handling.
Introduce example configurations and applications for both HTTP and ROS2 channels, enabling greater flexibility and showcasing the capabilities of the system for publishing and subscribing to messages.
Throw runtime errors for the unimplemented copy and move methods to ensure clarity on their current status and prevent accidental usage.
Implement continuous publishing of messages with incremental identifiers in the publisher application. Update the subscriber to log message count, improving visibility into received messages.
Streamline the handling of ROS2 messages by encapsulating related functionality into a new utility header file. This enhances code clarity and maintainability while adhering to best practices in modular design.
Enhance context handling and unify publish type registration for better clarity and usability. Simplify serialization type management and improve the architecture for future extensions, particularly for messaging features.
Enhance message publishing by consolidating function calls and improving clarity. Update context handling to better support message serialization types, allowing for a more flexible interaction with both protobuf and ROS2 messages.
…requency Adjust the message subscription method to handle both Protobuf and ROS2 message types more efficiently and eliminate redundant subscription functions. Decrease the publishing frequency in the example app for improved performance and readability.
Eliminate confusion by removing the printed warning about ROS 1 message types, as it was not providing significant value in handling unsupported types.
Clarify publisher behavior in examples and provide comprehensive documentation for ros2 channel implementations.
Add support for ros2 message types in the aimrt_py channel to enhance interoperability with ROS2-based applications.
…erialization Enhance robustness by adding exception handling to ensure the process correctly handles serialization and deserialization failures, improving overall stability in handling ROS2 messages.
Remove unnecessary whitespace and enhance error handling for argument types in the publishing function, ensuring clear type checking and preventing potential runtime errors.
zhangyi1357
force-pushed
the
feat/aimrt_py-support-ros2-proto
branch
from
November 11, 2024 09:27
91e107f
to
f53d338
Compare
Simplify the conversion of ROS2 messages to Python objects by moving the conversion logic inline. This eliminates unnecessary function calls and improves performance while maintaining clarity in the subscription method.
Enable linking and compilation of ROS2 interfaces based on the build configuration. This improves flexibility by allowing the Python runtime to interface with ROS2 when needed, enhancing interoperability and feature set.
zhangyi1357
force-pushed
the
feat/aimrt_py-support-ros2-proto
branch
from
November 12, 2024 04:55
bdf100d
to
39aa0ab
Compare
Add utility functions to generate names for ROS2 and protobuf message types, centralizing logic for type name creation. Update the publisher and subscriber to utilize these functions, improving code readability and maintainability while ensuring accurate message type management.
Register new message type RosTestMsg in both publisher and subscriber applications. Update data format for publishing events to improve clarity and consistency in message handling. Ensure proper setup in the shell scripts for localization configuration.
zhangyi1357
force-pushed
the
feat/aimrt_py-support-ros2-proto
branch
from
November 12, 2024 09:00
6d75862
to
ae64f1c
Compare
Simplify header files by removing redundant pybind11 includes, reducing clutter and improving maintainability.
Remove inline implementations and enhance readability of message type support functions, while maintaining functionality and improving code organization.
zhangyi1357
force-pushed
the
feat/aimrt_py-support-ros2-proto
branch
from
November 19, 2024 03:49
586ac56
to
068716e
Compare
…upport Enhance readability and maintainability by cleaning up function definitions related to ROS message type support. Implement a more robust method for obtaining message members information, addressing potential failure scenarios. Adjust example service implementation for consistency in dynamic data handling.
Throw runtime exceptions if the function pointers for creating or destroying ROS messages are null, enhancing error handling and stability during object initialization.
Improve the RosTestRpc method by adding overloads for different argument configurations, ensuring clearer type expectations and reducing potential runtime errors. This change aids in maintaining robust interactions with the ROS2 service framework.
Rename the `ctx_ref` parameter to `ctx` in the RPC function signature for cleaner and more concise code. This enhances readability and maintains consistency across the codebase.
Limit the size of static array fields to three elements each for better resource management and to prevent potential overflow issues.
Add support for generating code from ROS2 service definitions, improving interoperability with the aimrt framework. Update build scripts to include new generation scripts and ensure file dependencies are configured correctly.
…aming convention Modify scripts to utilize the new aimrt_py-gen-ros2-rpc tool and update service and client references accordingly for consistency and clarity. Remove deprecated code to streamline functionality and improve maintainability.
Add pattern to ignore *_aimrt_rpc_ros2.py files to keep the repository clean from auto-generated files.
Remove unused fields from RosTestRpc response to simplify the data structure and enhance clarity. Adjust logging level for better control over output verbosity.
Adjust the core log level to INFO to ensure a more standard logging output and reduce unnecessary verbosity in the logs.
Provide detailed instructions and explanations for setting up and running Python RPC examples using ros2 protocols with HTTP, gRPC, and native ros2 backends.
Add support for ros2 message types in both aimrt_py channel and rpc to improve compatibility and functionality.
Include a new example link to enhance the documentation and provide more resources for users exploring the Python interfaces.
Improve code readability by adding blank lines in the service proxy class definition.
zhangyi1357
changed the title
feat: aimrt_py channel support ros2 proto
feat: aimrt_py support ros2 protocol interface
Nov 19, 2024
Update argument names in the RPC generation script and implementation for consistency, enhancing readability and usability.
Add examples and instructions for using ROS2 Srv in RPC, enhancing integration options for developers. Adjust existing protobuf references for clarity and consistency.
Improve readability by ensuring consistent spacing in the service definition.
Remove ROS2-related source files from the compilation when the project is configured without ROS2 support, helping to streamline the build process and avoid unnecessary dependencies.
zhangyi1357
force-pushed
the
feat/aimrt_py-support-ros2-proto
branch
from
November 19, 2024 12:53
775db53
to
1fd6b4c
Compare
Refactor the function used for copying messages within dynamic arrays to better convey its functionality. This change enhances code readability and maintainability.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.