15 Commits

Author SHA1 Message Date
ATT_POWER
0b932d1ed8
fix: proxy doc (#121) 2024-12-08 14:45:54 +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
ATT_POWER
1f3401341a
feat: add the rpc and channel metric in opentelemetry plugin (#92)
* feat(opentelemetry_plugin): Add RPC tracing and performance metrics

- Added multiple counters and histograms in OpenTelemetryPlugin for tracking RPC calls
- Updated ChannelTraceFilter and RpcTraceFilter with enhanced context attribute handling
- Added new RpcMetricsFilter for collecting RPC performance metrics
- Adjusted log level configuration from INFO to Warn
- Added link to echo_plugin example in documentation

* fix: format the code

* fix : format

* perf(opentelemetry_plugin): Optimize RPC performance metrics calculation logic

* fix: Simplify opentelemetry plugin code

* refactor(opentelemetry_plugin):  remove rpc status

* fix: delete unnessary label

* format

* feat(opentelemetry_plugin): Add custom histogram boundaries option for RPC metrics

* fix(opentelemetry): Fix histogram boundary value type

* fix: change new to make_unique

* docs: add opentelemetry_plugin doc

* fix: opt the expression of doc

* choro: format the code

* docs: opt opentelemetry doc

* fix: update OpenTelemetry plugin documentation

- Change trace_otlp_http_exporter_url and metrics_otlp_http_exporter_url fields from required to optional
- Optimize capture list in OpenTelemetryPlugin::RpcMetricsFilter function
2024-11-15 18:55:37 +08:00
han J
062ffad431
feat: zenoh plugin with shm (#96)
* add zenoh-shm API

* use zenoh shm-api for channel and rpc

* set z_alloc_result as a local variable.

* add zenoh_buffer_array_allocator

* avoid copy opreation when pub data with shm

* if shm pool size is not enough, use net buffer instead

* add z_pub_shm_size_map_ to store topic-loan_size

* little fix

* remove client send data 's copying

* remove server send data 's copy

* add doc

* change benchamrk  item

* minor modification

---------

Co-authored-by: hanjun <hanjun@agibot.com>
2024-11-15 18:42:59 +08:00
han J
b9d861c327
fix: optimize reconnection steps. (#93)
* Optimize reconnection steps.

* Using condition variables to establish a connection with the broker.

* use aimrt's light_signal

* add condition variable  for channel and rpc

* Change the notify timing to the start phase

* Remove redundancy

* Modify the timing of the sleep call

---------

Co-authored-by: hanjun <hanjun@agibot.com>
2024-11-13 19:33:12 +08:00
han J
5b01f4e9e1
feat: Asynchronous connection to mqtt broker (#85)
* feat: Asynchronous connection to mqtt  broker

* add new option: client_key_password

* add example for mqtt plugin with ssl/tls

* add new info at release notes

* Make minor formatting adjustments.

* Improve  mqtt_plugin's README documentation

---------

Co-authored-by: hanjun <hanjun@agibot.com>
2024-11-08 16:13:10 +08:00
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>
2024-11-05 11:44:25 +08:00
ATT_POWER
076f76394e
refactor(echo_plugin): Remove executor configuration and simplify echo logic (#78)
* refactor(echo_plugin): Remove executor configuration and simplify echo logic

- Removed executor field from echo_plugin configuration
- Simplified echo message handling process by processing directly in main thread
- Updated example configurations and descriptions in documentation

* refactor(echo_plugin): Refactor EchoPlugin class

- Remove get_type_support_func_ member variable, replace with direct GetTypeSupport method call in RegisterEchoChannel
- Merge EchoFunc creation and subscription callback logic to reduce intermediate variables

* refactor(echo_plugin): Remove GetTypeSupport function, directly access type_support_map where needed

* refactor(echo_plugin): Remove unused headers and member functions

* refactor(echo_plugin): Remove unnecessary 'this' capture in lambda expression

* refactor(echo_plugin): optimize buffer handling logic in EchoPlugin

* format

* fix(echo_plugin):  add release_callback func before return in sub_wrapper.callback

---------

Co-authored-by: yuguanlin <yuguanlin@agibot.com>
2024-11-04 17:18:00 +08:00
ATT_POWER
fe409b822b
example: add recordplayback example and remove unnecessary codes in echo plugin (#72)
* example: add recordplayback example about ros msg

- Optimize configuration files and script naming
- Modify EchoPlugin, remove unnecessary checks

* fix: remove unused code and unnecessary dependencies

---------

Co-authored-by: yuguanlin <yuguanlin@agibot.com>
2024-11-01 17:35:07 +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
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
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
han J
5b85a23678
Zenoh update to 1.0.0.11 (#31)
* 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>
2024-10-16 19:39:38 +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