zhangyi1357
ac7715e424
feat: add json and ros2 serialization support for grpc plugin (#81)
* feat: enhance gRPC content-type handling and serialization support Improve content-type validation in gRPC request headers to support additional types, allowing for JSON serialization. Update the serialization logic to dynamically set the type based on incoming headers, ensuring better compatibility and error handling. * feat: support ros2 service function names Enhance service function registration to accept names starting with 'ros2:' in addition to 'pb:'. Update URL path handling and content type mappings accordingly to ensure compatibility with ROS 2 services, improving integration capabilities. * feat: add gRPC plugin configuration and startup scripts Introduce configuration files for the gRPC client and server plugins, allowing for easier setup and management of RPC communication. Add shell scripts to launch the client and server with the specified configurations, streamlining the development process. * refactor: improve service function name validation and error handling Enhance the clarity of service function name registration by separating the function name variable for improved readability. Update error messages for better guidance on valid prefixes and standardize maps for content types and serialization types. This increases maintainability and reduces the risk of errors during registration. * refactor: streamline client option lookup and improve code clarity Simplify the client option lookup by replacing `std::find_if` with `std::ranges::find_if`. Also, enhance readability by cleaning up comment formatting and unnecessary whitespace. * chore: update copyright information in configuration files Revise copyright year and licensing details to reflect the current ownership and license for the AimRT project. * refactor: improve validation logic in options Enhance option verification by using standard algorithms for consistency and readability. This ensures minimum thresholds for connection numbers and timer durations are respected, improving robustness in client and server configurations. * docs: update release notes and plugin documentation Add support for grpc plugin serialization with ros2 messages and json format, enhancing flexibility in data handling. Remove outdated protobuf-only restriction to improve compatibility and user experience. * docs: add ros2 rpc example details and usage instructions Expand the README to include a new section on using the grpc plugin with a ros2-based RPC interface. Provide explicit instructions on configuration, core code references, and running the server and client. Enhance the documentation to clarify the differences from the protobuf RPC example. --------- Co-authored-by: zhangyi <zhangyi@agibot.com>
English | 中文
AimRT
Full project details on aimrt.org。
Brief
- AimRT is a basic runtime framework for the field of modern robotics. It is developed based on modern C++, is lightweight and easy to deploy, and has more modern designs in resource management and control, asynchronous programming, deployment configuration, etc.
- AimRT is committed to integrating the research and development of various deployment scenarios such as robot end-side, edge end, and cloud. It serves modern AI- and cloud-based robot applications and provides modern and complete debugging and performance analysis tools, as well as good observability support.
- AimRT also provides a comprehensive plug-in development interface, which is highly scalable and compatible with ROS2, HTTP, Grpc and other traditional robot ecosystems or cloud service ecosystems, and supports progressive upgrades of your existing systems.
Document
Description
Languages
C++
76.9%
HTML
13.6%
C
1.6%
C#
1.3%
JavaScript
1.3%
Other
4.7%