Skip to content
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

refactor: sparate ros2 dependency in aimrt_py #117

Merged

Conversation

zhangyi1357
Copy link
Contributor

@zhangyi1357 zhangyi1357 commented Dec 3, 2024

  • Compile ros2-related functionalities into separate .so files, loading them only when needed by the user. This removes the requirement for users of aimrt_py to install ros2 when only using the protobuf.
  • Update the examples check related to the aimrt_py ros2 interface to ensure that it correctly detects whether the related examples run correctly. Incidentally, the original startup script py_tests.py, dedicated solely to Python examples, has been removed. All examples now use the new script, unifying the C++ and Python example test procedures.

- 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.
…arity 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.
- 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.
…ation

- 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.
- 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.
@AimRT AimRT added the ci CI/CD workflow trigger label Dec 3, 2024
@AimRT AimRT merged commit dca7399 into AimRT:main Dec 3, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CI/CD workflow trigger
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants