25 Commits

Author SHA1 Message Date
zhangyi1357
dca739930e
refactor: sparate ros2 dependency in aimrt_py (#117)
* feat: enhance aimrt_py with ROS2 support and modularize functionality

- Added support for ROS2 message types in aimrt_py, improving interoperability with ROS2 systems.
- Introduced new module aimrt_python_runtime_ros2 for ROS2-specific functionalities, including publishing, subscribing, and RPC handling.
- Updated existing files to integrate ROS2 capabilities, ensuring seamless interaction between ROS1 and ROS2 message types.
- Enhanced CMake configuration to conditionally include ROS2 components based on build settings.
- Improved code organization by separating ROS2-related functionalities into dedicated headers and source files for better maintainability.

* chore: update .gitignore and refactor example scripts for improved clarity and organization

- Added 'test_log/' to .gitignore to exclude test log files from version control.
- Removed obsolete 'py_tests.py' file to streamline the test structure.
- Enhanced logging messages in ROS2 subscriber and RPC server applications for better context clarity.
- Updated expected output definitions in utility files to reflect new message structures and improve consistency.
- Refactored example runner script to correct directory path handling and improve readability.
- Added new example configurations for ROS2 channels and RPC interactions, enhancing the testing framework.

* refactor: remove unused import from python_runtime initialization

- Eliminated the import of aimrt_python_runtime_ros2 from the __init__.py file in the python_runtime module to streamline the code and improve clarity.

* refactor: streamline ROS2 import structure and enhance CMake configuration

- Removed direct import of aimrt_python_runtime_ros2 in favor of aliasing for clarity in aimrt_py_chn.py.
- Updated CMakeLists.txt to conditionally add dependencies for ROS2 components, improving build flexibility.
- Adjusted ROS2 service generation script to utilize the aliased import for better readability and maintainability.

* feat: add support for additional ROS2 example script

- Introduced a new subprocess call in `run_all_example.py` to execute the `build_examples_py_ros2_rpc.sh` script, enhancing the example runner's capabilities for ROS2 RPC interactions.
- This addition allows for better demonstration and testing of ROS2 functionalities within the example framework.

* format code
2024-12-03 19:58:48 +08:00
zhangyi1357
94e0446de1
fix: enhance error handling in RPC benchmark client for aimrt_py (#113)
* fix: enhance error handling in RPC benchmark client

* chore: remove unused pybind11 includes

Clean up unused dependencies from the Python runtime type support headers to streamline the codebase and improve maintainability.

* fix: improve error logging for GetFooData failures

Enhance logging by using ToString() for status to provide clearer failure messages, aiding in troubleshooting and debugging.
2024-11-26 09:48:31 +08:00
ATT_POWER
18d45dbb0f
feat: add proxy plugin to transfer messages from one backend to multiple backends (#108)
* feat(plugins): add proxy plugin

* feat: add proxy action

* feat: del the state in proxy action

* feat: format

* fix : add check not to pub same topic and msg_type

* fix: remove TimerSchedule  executor check

* docs: add docs

* doc: change docs

* fix: remove some unnessary code

* refactor(proxy_plugin): migrate TopicMetaKey to core/util directory

* fix: simplify the code

* format

* fix: struct bind

* perf(proxy): use action_raw_ptr capture rather than reference capture local variable

* docs: update proxy_plugin documentation and add example configuration

* fix: remove necessary check in echo plugin

* doc: add proxy plugin example docs

* fix: migrate recordplayback plugin and echo plugin's topic_meta_key into util

* fix: format

* fix: remove necessary code

* perf: remove unnecessary code
2024-11-23 10:25:48 +08:00
zhangyi1357
df5d21e49c
feat: aimrt_py support ros2 protocol interface (#95)
* feat: add checks for ROS 2 message type support

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.

* build: update file globbing to include configure dependencies

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.

* feat: add ROS2 message support and enhance publishing functionality

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.

* feat: add HTTP and ROS2 example configurations and applications

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.

* chore: disable unimplemented copy and move functions

Throw runtime errors for the unimplemented copy and move methods to ensure clarity on their current status and prevent accidental usage.

* feat: enhance message publishing with iteration and logging

Implement continuous publishing of messages with incremental identifiers in the publisher application. Update the subscriber to log message count, improving visibility into received messages.

* refactor: reorganize and encapsulate ROS2 message handling functionality

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.

* refactor: streamline protobuf and ROS2 message publishing

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.

* refactor: streamline messaging functions

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.

* refactor: simplify message subscription handling and reduce publish frequency

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.

* fix: remove unnecessary error message for ROS 1 type detection

Eliminate confusion by removing the printed warning about ROS 1 message types, as it was not providing significant value in handling unsupported types.

* docs: update README and add ros2 channel examples

Clarify publisher behavior in examples and provide comprehensive documentation for ros2 channel implementations.

* feat: support ros2 message types in aimrt_py channel

Add support for ros2 message types in the aimrt_py channel to enhance interoperability with ROS2-based applications.

* fix: improve error handling during ROS2 message serialization and deserialization

Enhance robustness by adding exception handling to ensure the process correctly handles serialization and deserialization failures, improving overall stability in handling ROS2 messages.

* fix: correct argument validation and formatting

Remove unnecessary whitespace and enhance error handling for argument types in the publishing function, ensuring clear type checking and preventing potential runtime errors.

* refactor: streamline message conversion logic

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.

* feat: add ROS2 support to Python runtime

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.

* feat: enhance message type handling for publishers and subscribers

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.

* feat: update message types to use RosTestMsg for better compatibility

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.

* chore: consolidate pybind11 includes

Simplify header files by removing redundant pybind11 includes, reducing clutter and improving maintainability.

* docs: add ROS2 message support details and example links

Enhance the documentation by including information on ROS2 message formats and how to generate corresponding Python code. This provides users with clearer guidance on integrating ROS2 functionality within the project.

* chore: update copyright information to reflect new authorship

Update copyright year and licensing information across multiple configuration files and application scripts to maintain proper attribution for the AimRT project.

* feat: add ROS2 RPC client and server examples with configurations

Introduce example applications for ROS2 RPC communication, including client and server scripts, along with necessary configuration files. Implement a build script to set up the protocol buffers correctly, enhancing usability by supporting both HTTP and gRPC backends.

* feat: update RPC request and response handling

Refactor the RPC client and server implementations to utilize the updated request and response types from the example ROS2 service, improving code clarity and ensuring compatibility with the new service structure.

* refactor: simplify RPC response handling

Remove unnecessary response object instantiation and streamline the response creation process for improved clarity and efficiency in the RPC invocation logic.

* refactor: streamline publisher and subscriber method names

Simplify method names related to publishing and subscribing to enhance readability and maintainability. Transition from a prefix-based naming convention to a more concise approach, ensuring consistency across the codebase.

* chore: update configuration file paths for gRPC client and server examples

Align the configuration file paths in the example scripts to use the gRPC-specific settings, ensuring the correct configuration is utilized for both the client and server.

* refactor: rename internal methods for clarity

Improve naming conventions for protobuf message type functions, enhancing code readability and maintainability. Update related usages to keep consistent across the runtime and RPC generator.

* feat: add service type validation and improve bash scripts

Introduce a new bash script for debugging the ROS2 client and enhance existing scripts with proper sourcing. Implement service type validation to ensure the reliability of service registration. This improves the robustness of RPC interactions and simplifies the setup process for developers.

* feat: extend RPC response data structure and improve logging

Add additional data types to the RosTestRpc response for enhanced functionality. Set logging level to trace for more detailed output during execution.

* feat: add support for static and dynamic arrays in RPC service

Enhance the RPC service by introducing static and dynamic array types for various data types, enabling more complex data handling in requests and responses. This improves flexibility and usability for clients interacting with the service.

* feat: add support for new ROS message types

Enhance the RPC server to handle additional ROS message types, including dynamic and static arrays of custom data structures. This improves the server's data handling capabilities and aligns with the updated service specifications.

* refactor: improve type mapping and message copy functions

Update type mappings for better consistency and clarity. Enhance the readability of message copying functions by formatting multi-line expressions.

* refactor: improve message copying and moving functions

Enhance the handling of ROS message copying and moving by updating the parameter order and adding tailored move functions for better memory management. This optimizes the performance of message manipulations and ensures cleaner, more maintainable code.

* refactor: simplify message type support functions

Remove inline implementations and enhance readability of message type support functions, while maintaining functionality and improving code organization.

* refactor: streamline ROS message handling and improve introspection support

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.

* fix: ensure pointers for ROS message creation and destruction are valid

Throw runtime exceptions if the function pointers for creating or destroying ROS messages are null, enhancing error handling and stability during object initialization.

* feat: enhance RosTestRpc method signature for better type safety

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.

* refactor: simplify parameter naming in RPC proxy function

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.

* fix: restrict static array sizes in RosTestRpc service

Limit the size of static array fields to three elements each for better resource management and to prevent potential overflow issues.

* feat: enhance python runtime generation for ROS2 services

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.

* refactor: update RPC service and client implementations to use ROS2 naming 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.

* chore: update .gitignore to exclude generated files

Add pattern to ignore *_aimrt_rpc_ros2.py files to keep the repository clean from auto-generated files.

* refactor: streamline response structure for RosTestRpc

Remove unused fields from RosTestRpc response to simplify the data structure and enhance clarity. Adjust logging level for better control over output verbosity.

* chore: update log level to INFO for consistency

Adjust the core log level to INFO to ensure a more standard logging output and reduce unnecessary verbosity in the logs.

* docs: add README for ros2 rpc examples

Provide detailed instructions and explanations for setting up and running Python RPC examples using ros2 protocols with HTTP, gRPC, and native ros2 backends.

* feat: enhance aimrt_py channel with rpc support for ros2 message types

Add support for ros2 message types in both aimrt_py channel and rpc to improve compatibility and functionality.

* docs: add ros2_rpc example to Python interface section

Include a new example link to enhance the documentation and provide more resources for users exploring the Python interfaces.

* chore: add spacing for improved readability in service proxy class

Improve code readability by adding blank lines in the service proxy class definition.

* chore: standardize argument names for RPC generator

Update argument names in the RPC generation script and implementation for consistency, enhancing readability and usability.

* docs: update RPC documentation to include ROS2 Srv support

Add examples and instructions for using ROS2 Srv in RPC, enhancing integration options for developers. Adjust existing protobuf references for clarity and consistency.

* style: standardize whitespace in RosTestRpc.srv

Improve readability by ensuring consistent spacing in the service definition.

* build: exclude ROS2 specific files from the build if not using ROS2

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.

* style: add missing newline at end of file for consistency

* refactor: rename copy function to improve clarity

Refactor the function used for copying messages within dynamic arrays to better convey its functionality. This change enhances code readability and maintainability.

---------

Co-authored-by: zhangyi <zhangyi@agibot.com>
2024-11-21 11:48:44 +08:00
wtudio
1b88aa7bf2
fix: yaml misc (#109) 2024-11-21 10:57:28 +08:00
zhangyi1357
1f173fdd46
feat: add startup info printing during initialization (#107)
Include a method to print detailed startup information about the framework, enhancing user awareness of the version and providing relevant links for support.
2024-11-18 21:53:25 +08:00
han J
5c0e63c4ca
feat: rotate_file_logger supports periodic syncing (#103)
* add timer for roatet_file_logger

* add fsync and timer

* put sync task into log executor

* add doc

* rotate_file_logger support sync

- add timer to post sync_task

- add doc and example

* add readme.txt

* change head.h

* optimize code

* add release_notes

---------

Co-authored-by: hanjun <hanjun@agibot.com>
2024-11-15 17:40:21 +08:00
wtudio
eaa7c97557
feat: executor sys clock (#101)
* feat: executor sys clock
2024-11-14 15:32:50 +08:00
wtudio
dac046b3fe
fix: runtime/core/util (#91) 2024-11-08 17:01:04 +08:00
wtudio
7ba8f93fdf
fix: update logger (#80) 2024-11-04 18:54:47 +08:00
wtudio
acf57080c2
feat: update log examples & doc (#69) 2024-10-31 21:26:55 +08:00
ATT_POWER
7e4b5460c2
feat: add a new plugin: echo (#51)
* CI: change build worlflow image tag from v20240927 to latest

* feat/plugins: Add echo plugin

- Add echo plugin for message pass-through and logging
- Implement loading and management of different types of support packages
- Add support for multi-threaded executors
- Optimize log initialization and management logic
- Add support for YAML configuration files

* build: Update build scripts and enable Echo plugin

- Add build options for Echo plugin in build.bat, build.sh, test.bat, and test.sh scripts
- Optimize JSON serialization error handling and log output in echo_plugin.cc

* chore: Add Echo plugin related documentation

- Update release notes with Echo plugin feature description
- Add Echo plugin usage documentation
- Add Echo plugin example configuration and running instructions

* chore: format the code
- Add thread safety checks for Echo executor
- Optimize code structure to improve readability and maintainability

* choro: restructure JSON parsing logic

- Replace json-c with jsoncpp library
- Rewrite json_to_yaml function to improve code readability and robustness

* choro: adapt CMakeLists for Windows compatibility

* choro : turn off the echo plugin in windows

* feat(echo_plugin): Support YAML format message echo

- Modify GetYamlCpp.cmake to enable yaml-cpp installation
- Add yaml_convert.h and yaml_convert_test.cc in ros2_util
- Update echo_plugin to support YAML format message serialization and deserialization
- Add YAML serialization type support in aimrt_module_ros2_interface

* choro: Fix documentation

* choro : fix format and delete the extra support for echo about pb message type

* choro : format

* choro: add ros2 example for echo plugin and delete useless code

* choro: rename the echo example shell

* choro: fix some mistake

* chore: refactor type support package loader and migrate to core module

- Migrate TypeSupportPkgLoader from echo_plugin and record_playback_plugin to core/util directory
- Optimize log output, replace printf with AIMRT_INFO

* choro: replace the aimrt::common::util::AimRTException() to AIMRT_ASSERT

---------

Co-authored-by: yuguanlin <yuguanlin@agibot.com>
2024-10-31 20:03:42 +08:00
han J
929a105bd0
log format (#57)
* log format

* Modify the logic of log formatting output

* Remove redundant parts.

* log format:

-Improve the log configuration documentation

-More flexible log formatting output structure

* log fotmat

- Use std::string instead of fmt to achieve formatted output,;

- add unit test

- add exception checking.

* Add estimated_size  & optimize unit tests

---------

Co-authored-by: hanjun <hanjun@agibot.com>
2024-10-31 19:39:35 +08:00
wtudio
a1fda52c37
fix: misc adjustments (#66)
* fix: misc

* doc: update misc
2024-10-31 17:57:47 +08:00
zhangyi1357
328a99512b
docs: add aimrt_py rpc context (#58)
* 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.
2024-10-28 21:10:22 +08:00
zhangyi1357
0b2427dc75
docs: add aimrt_py channel context (#56)
* 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.
2024-10-28 20:27:00 +08:00
han J
25c8b2e5bb
Ros2 plugin custom naming (#46)
* 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>
2024-10-24 19:31:41 +08:00
zhangyi1357
cb01a34047
feat: enhance aimrt_py rpc context handling and method overloads (#48)
* 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.
2024-10-24 15:49:40 +08:00
zhangyi1357
e2e77060af
feat: enhance aimrt_py channel with ctx functionality (#44)
* 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.
2024-10-22 20:09:15 +08:00
zhangyi1357
1186d81a07
feat: add aimrt_py rpc benchmark example (#37)
* 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
2024-10-18 16:33:58 +08:00
zhangyi1357
5ca412c339
fix: add GIL for pybind11::bytes object accessing (#35)
* 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.
2024-10-17 18:52:28 +08:00
wtudio
fabac84bb0
feat: Allow custom RPC names for some plugins (#33)
* Allow custom RPC names for some plugins
2024-10-17 16:39:35 +08:00
zhangyi1357
793418f0a2 update 2024-10-14 09:45:07 +08:00
zhangyi1357
7d5fe68319 update 2024-09-30 17:22:32 +08:00
wtudio
d2d7b0495d update v0.8.0 2024-09-23 16:01:31 +08:00