* CI: change build worlflow image tag from v20240927 to latest
* ci: Optimize GitHub Actions workflow triggers and test execution
- Ignore changes in the .github and document directories to avoid unnecessary workflow triggers
- Add 'quick-ci' label to control test execution and improve CI efficiency
* choro: add quick ci mode
---------
Co-authored-by: yuguanlin <yuguanlin@agibot.com>
Enhance the generation of message type names by ensuring proper handling of package and message components, eliminating excess separators for cleaner output.
* Refactor coroutine request handling and ensure unique client keys
* Refactor client_key to use ClientKey struct with custom hash to ensure uniqueness and support IPv6
* docs: clarify context type enumeration description
Enhance the explanation of the `aimrt_channel_context_type_t` enumeration to clearly indicate its role in defining publisher and subscriber contexts. This improves understanding for users implementing the interface.
* feat: enhance RpcContext with additional features
Add new methods for managing context metadata, timeout settings, and target addresses. Improve logging to provide better visibility into RPC calls and responses, aiding in debugging and performance monitoring.
* feat: enhance RPC context logging with metadata
Add the ability to log metadata in RPC calls, improving traceability and debugging. Update the client to set a metadata value and enhance server logging to print out all metadata associated with requests.
* feat: add RPC context types to Python bindings
Introduce enum values for client and server RPC context types in Python bindings to enhance type support and improve clarity in interactions with RPC features.
* feat: set default serialization type for context reference
Ensure that the serialization type defaults to "pb" when it is not explicitly set in the context reference. This improves compatibility and prevents potential errors related to serialization handling.
* docs: enhance message publishing and context usage documentation
Clarify the usage of the `Publish` function by adding context and serialization options. Introduce `Context` and `ContextRef` details for improved understanding. Adjust subscriber callback signatures and remove deprecated notes for a cleaner documentation experience.
* feat: enhance event publishing with context and serialization options
Add support for publishing events with various configurations, including without context, with JSON serialization, and with context references. Improve logging for better debugging and clarity in event handling.
* feat: add enumeration for channel context types
Introduce enumeration for `aimrt_channel_context_type_t` to better categorize channel contexts, improving readability and usability in Python bindings.
* docs: clarify context type description
Enhance documentation by simplifying the explanation of the context type and explicitly defining the associated enumeration values for better understanding.
* refactor: standardize timestamp handling with time.time_ns()
Update timestamp handling in both publishing and subscribing modules to use time.time_ns() instead of time.perf_counter_ns(). This change improves consistency in timestamp precision and ensures uniformity across the system's message timing functionalities.
* perf: improve timing measurements with nanosecond precision
Enhance performance tracking by switching from `time.time()` to `time.perf_counter_ns()`, providing more accurate duration calculations.
* fix: ensure subscriber receives all messages before ending
Add a short sleep to guarantee the subscriber has enough time to process all published messages before signaling completion. This prevents potential missed messages during the benchmarking process.
* perf: optimize timestamp retrieval for benchmarking
Use high-resolution `perf_counter_ns` instead of `time.time` for better accuracy in message timestamps across publisher, subscriber, and RPC client modules.
* refactor: remove shutdown peer logic from publisher and subscriber
Streamline benchmarking process by eliminating shutdown peer signal handling, simplifying the code and improving clarity.
* docs: clarify benchmark termination process
Update the README to specify that benchmark results will be output in the subscriber terminal and that the process can be terminated in both terminals using `Ctrl+C`. This improves user guidance for smoother execution.
* CI: change build worlflow image tag from v20240927 to latest
* fix: fix bagtrans tool support
- Add AIMRT_BUILD_BAGTRANS option in CMakeLists.txt
- Update build.bat, build.sh, test.bat and test.sh scripts to include bagtrans build option
- Modify CMakeLists.txt in bagtrans directory to simplify build logic
- Remove autopep8 dependency from bagtrans/requirements.txt
* format : format the code
* fix: Turn off the bagtrans compilation option on Windows
* feat(tools): Update bagtrans tool build method
- Change the build method of bagtrans tool from PyInstaller to using the build module to generate wheel files
- Update CMakeLists.txt and setup.py files to adapt to the new build method
- Update release notes, adding new information about the bagtrans tool
* fix: format
---------
Co-authored-by: yuguanlin <yuguanlin@agibot.com>
* add remapping function for ros2 plugin
* Optimize the logical structure of remapping.
* Optimize the remapping's logic
* Simplify details
* - update the ROS2 plugin documentation to correct the description of the remapping rules and optimize examples;
- enhance the Ros2RpcBackend class by adding exception handling logic to the GetRemappedFuncName method;
- add a function initialization report feature;
- write unit test cases for GetRemappedFuncName covering various scenarios.
* Update the table format in the documentation, correcting the regular expression capturing groups for function names
* Decrease Redundancy
* simplify the function : GetRealRosFuncName
* Optimized the way of obtaining the message type, reducing unnecessary string constructions.
---------
Co-authored-by: hanjun <hanjun@agibot.com>
* feat: add new methods to RpcContext and RpcContextRef
Enhance functionality by introducing CheckUsed, SetUsed, Reset, GetFunctionName, and SetFunctionName methods for better state management and function identification.
* feat: add RPC service details to ServiceBase class
Enhance the ServiceBase class by adding methods to retrieve RPC type and service name, along with the ability to set the service name. This improves accessibility and flexibility for RPC configurations.
* feat: simplify service function type definition
Introduce type aliases for service function return and parameter types to enhance code readability and maintainability. This change reduces redundancy and clarifies the expected function signatures, streamlining future development.
* feat: enhance RPC framework with proxy support
Add support for `ProxyBase` in the RPC framework, enabling more flexible service management and context handling in Python. Update the `RpcContext` definition to use shared pointers for better memory management.
* feat: enhance rpc context handling and method overloads
Improve the handling of RPC context by adding overloads for method arguments, ensuring type safety and clarity in usage. This change simplifies the implementation of service proxies and makes it easier to work with different context types.
* feat: enhance context handling in RPC proxy
Add default context reference to the `NewContextSharedPtr` method, simplifying context management in RPC calls for improved usability.
* chore: reorganize imports for consistency
Refactor the import statements across multiple modules to improve readability and maintain consistency. Ensure all relevant libraries are imported in a coherent manner.
* feat: add GetTopic method to PublisherRef and SubscriberRef
Expose the GetTopic method for both PublisherRef and SubscriberRef to improve topic management and enhance usability within the Python interface.
* feat: add context handling in publishing
Introduce new context management methods for publishing messages with context support. Enhance the Python bindings to allow for better integration with context references, improving the flexibility and usability of the publisher functionality.
* feat: enhance subscription with context support
Add a new subscription method that includes context handling for better message processing. This improves the flexibility of message serialization formats and error handling during callback execution.
* refactor: clean up publish and subscribe methods
Improve code readability by removing unnecessary blank lines and ensuring consistent formatting in the publish and subscribe functions.
* style: update ASCII art formatting in example runner
Improve visual consistency of the ASCII banner in the output, enhancing readability.
* chore: improve type annotations for publisher and subscriber functions
Enhance the type hints in the RegisterPublishType, Publish, and Subscribe functions to improve code clarity and maintainability. This facilitates better integration with type-checking tools and helps prevent potential runtime errors.
* feat: support multiple serialization types in publisher
Enhance the publishing functionality to handle both protobuf and JSON serialization types. This improves flexibility and allows for broader compatibility with different data formats. Add error handling for invalid serialization types to ensure robustness.
* fix: correct serialization type prefix
Update the serialization type from "pb" to "json" when publishing JSON messages, ensuring accurate format differentiation for better clarity and preventing potential processing errors.
* refactor: streamline serialization handling in PublishWithCtx
Improve message serialization by consolidating logic and enhancing readability. Ensure error handling for unsupported types remains clear.
* feat: add Context support for aimrt_py channel functionality
Enhance channel functionality in aimrt_py by providing Context support, improving usability and enabling better resource management during operations.
* refactor: streamline serialization type handling
Improve clarity by formatting the serialization type in the publish method. This enhances readability and ensures consistent output in message formatting.
* refactor: rename publish function and improve argument handling
Enhance the Publish function to accept different argument configurations and simplify the serialization process, ensuring clearer logic and improved usability.
* feat: enhance publishing with customizable serialization
Allow publishers to specify serialization type (protobuf or JSON) when publishing messages. Update method signatures to improve clarity and error handling for serialization type validation.
* feat: enhance Publish function documentation
Clarify usage and expectations for the Publish function, including argument types and potential exceptions. This improves maintainability and usability for future developers.
* refactor: simplify protobuf serialization handling
Streamline the protobuf message serialization and deserialization processes by separating concerns into dedicated functions. Improve callback handling for subscriber methods to enhance code readability and maintainability.
* refactor: streamline serialization and deserialization methods
Simplify the process of message serialization and deserialization by consolidating functions and improving code clarity. This enhances maintainability and reduces redundancy in handling protobuf messages.
* refactor: remove unused subscription method
Eliminate the `PySubscribeWithSerializationType` function to streamline the code and improve maintainability, as it is not being used in the current implementation.
* refactor: streamline callback parameter handling
Simplify the validation and handling of callback parameters in the subscription process. Ensure the callback adheres to a clear signature expectation, enhancing code maintainability and reducing potential errors.
* chore: streamline imports for clarity
Optimize import statements by specifying only required components, improving readability and maintainability.
* feat: enhance protobuf registration and subscription documentation
Improve docstrings for registering and subscribing to protobuf message types, clarifying parameter details and callback expectations to aid developer understanding and usage.
Set CMAKE_POSITION_INDEPENDENT_CODE to ON to ensure compatibility with shared libraries and enhance portability across different architectures. Removed explicit compiler flags for PIC that were previously set.
* run all examples of aimrt and generate the report
* Handle the runtime environment and dependencies.
* Format Check
---------
Co-authored-by: hanjun <hanjun@agibot.com>
* feat: support translate aimrtbag to rosbag
* feat: 添加数据包转换工具
* CI: change build worlflow image tag from v20240927 to latest
* feat: now support transfer aimrtbag to rosbag
* feat: Adjust the build and installation process of aimrt_cli , copy ROS2 plugin proto files when building aimrt_cli
* chore: format the code style
* chore: format code
* feat: Differentiate between aimrt-cli and transbag, make transbag an independent tool; add documentation for transbag
* chore: Update CI trigger from label "ci ready" to "ci"
* chore: format code
* choro: feat: compile bagtrans module only when bagrecord and ros2 plugin are enabled; improve documentation
* choro: Modify activation method for bagtrans
---------
Co-authored-by: yuguanlin <yuguanlin@agibot.com>
* run all examples of aimrt and generate the report
* add example items of cpp and python
* add release_notes
* Modify copyright statement
---------
Co-authored-by: hanjun <hanjun@agibot.com>
* feat: add python benchmark example and update dependencies
Introduce an aimrt_py benchmark example for Python testing. Replace boost dependency with the standalone asio library to reduce overall dependencies and enhance configuration options for zenoh and mqtt.
* feat: add RPC benchmark client and configuration
Introduce a new benchmark client module and accompanying scripts to facilitate testing and performance measurement of RPC services. Include configuration for parallel execution and adjustable benchmarking parameters.
* docs: add benchmark process for protobuf RPC
Include detailed instructions for reproducing the crash issue and running benchmarks effectively to streamline troubleshooting and performance evaluation.
* chore: include string header
Add the string header to enable potential future string manipulations within the RPC handling code. This sets the stage for improved functionality and cleaner code integration down the line.
* feat: enhance benchmark reporting and logging
Improve performance benchmarking by logging detailed results, including latency metrics and error rates. Ensure more precise measurements by using microseconds for task duration and substituting print statements with structured logging.
* chore: update benchmark configurations for clarity and accuracy
Refine the benchmark plans to provide clearer settings. Adjust parameters for the fixed-frequency mode to ensure more relevant testing scenarios.
* chore: add script and config files for HTTP server examples
Include new symbolic links for server configuration and application scripts to streamline example setup and ensure consistency across projects.
* docs: update README for better clarity on python RPC benchmark setup
Enhance the README to provide a clearer guide on using the protobuf RPC benchmark example, including setup instructions, core files, and configuration details. This improves user experience and facilitates easier implementation for developers.
* style: correct casing in module name
Standardize the module name casing for improved consistency and readability in the RPC server application.
* docs: add pb_rpc_bench example link
Include the link to the pb_rpc_bench example for better accessibility and completeness in the tutorial.
* style: clean up code formatting
Remove unnecessary blank lines to improve readability in the benchmark RPC client module.
* docs: modify aimrt_py rpc release note
* fix: add GIL for pybind11::bytes object accessing
Protect the access to the pybind11::bytes object with a GIL lock to avoid potential memory errors, and unify the handling of empty and non-empty strings. Eliminate unused functions for empty byte objects in the export channel and export RPC modules to enhance code clarity.
* docs: resolve occasional server crash during multi-threaded RPC calls
Address a rare issue causing server crashes in aimrt_py under multi-threaded RPC operations, enhancing stability and reliability.
* Upgrade zenoh to version 1.0.0.11
* Update the download link for the zenoh-c library to version 1.0.0.11 and adjust some related URL configurations.
---------
Co-authored-by: hanjun <hanjun@agibot.com>
* feat: add aimrt_py benchmark publisher and subscriber applications
Introduce new benchmark publisher and subscriber modules, enabling performance testing with custom configuration. Includes necessary YAML configuration files and scripts for simulation of message publishing and receiving.
* style: correct message size formatting
Update the log message to use "bytes" for clarity and consistency in reporting metrics.
* feat: add python benchmark example and update dependencies
Introduce an aimrt_py benchmark example for Python testing. Replace boost dependency with the standalone asio library to reduce overall dependencies and enhance configuration options for zenoh and mqtt.
* feat: add aimrt_py channel benchmark example
Introduce a new benchmark example for aimrt_py to enhance Python benchmarking capabilities and provide clearer insights into performance metrics.
* format code
* style: format loss rate output
Remove the percentage symbol from the loss rate display for a cleaner presentation.
* docs: update release notes for v0.9.0
Clarify new features, config options, and dependency changes, including the addition of the aimrt_py channel benchmark example and removal of boost dependencies in favor of asio.
* docs: add benchmark example to Python interfaces section
Include a new link for the pb_chn_bench example to enhance the documentation and provide users with more comprehensive usage scenarios.
* docs: add README for protobuf channel benchmark example
Provide instructions on setting up and running a Python channel benchmark using protobuf with HTTP backend. Include details on core modules, configuration, and execution steps to enhance usability and understanding.
* docs: update installation instructions to link to quick start guide
Enhance user experience by providing direct access to the installation guide for the `aimrt_py` package, improving clarity and reducing search time for new users.
* docs: correct grpc reference in README
Update the section title to accurately reflect the protocol being used, enhancing clarity for users.
Streamline the process of finding and downloading Boost by removing unnecessary checks and consolidating the logic, making it easier to manage and maintain dependencies.
Streamline CMake configuration by consolidating compiler options and ensuring consistent export of compile commands, enhancing the build process especially for MSVC and Windows environments.
* build: add Windows specific compile option for ssize_t
Ensure compatibility on Windows by defining ssize_t as int for the gRPC plugin. This adjustment prevents potential type-related issues during compilation.
* chore: include string header for message handling
Ensure that the string functionality is available for improved message processing.
feat: 添加 AIMRT github action
Key features of this workflow:
Runs automated tests on the mentioned platforms using matrix strategy in GitHub Actions.
Ensures that the code compiles and runs correctly on each platform.
The workflow is automatically triggered whenever the "ci ready" label is applied to a pull request or a new release is published, ensuring thorough testing and validation at critical stages of the development process.
---------
Co-authored-by: yuguanlin <yuguanlin@agibot.com>
Establish a community code of conduct to foster a respectful and inclusive environment, and provide comprehensive contribution guidelines to streamline project participation for all contributors.