Merged
Conversation
… case with the nem class
…d standarize the atributes names
There was a problem hiding this comment.
Pull request overview
This PR refactors the driver architecture to introduce a Wheel class and improve the separation between real-time safe and non-real-time code through RT buffers. The changes involve significant API changes to the serial port interface, driver implementation, and test infrastructure.
Changes:
- Introduced
Wheelclass to encapsulate wheel-related data and operations - Added RT buffer abstraction (
IRTBuffer) for thread-safe communication between RT and non-RT contexts - Refactored
SerialPortto use streaming reads and frame extraction instead of packet-based approach - Updated
LittlebotDriverconstructor signature to accept RT buffers and use new codec architecture - Modernized test infrastructure with proper mock classes
Reviewed changes
Copilot reviewed 19 out of 25 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| littlebot_base/include/littlebot_base/wheel.hpp | New class for wheel data encapsulation |
| littlebot_base/include/littlebot_base/types.hpp | New types for RT data structures and error handling |
| littlebot_base/include/littlebot_base/codec.hpp | New codec interface for protobuf serialization |
| littlebot_base/src/codec.cpp | Implementation of encode/decode functions |
| littlebot_base/include/littlebot_base/i_rt_buffer.hpp | New RT buffer interface |
| littlebot_base/include/littlebot_base/ros_rt_buffer.hpp | ROS2 implementation of RT buffer using realtime_tools |
| littlebot_base/include/littlebot_base/serial_port.hpp | Updated serial port interface with streaming approach |
| littlebot_base/src/serial_port.cpp | Refactored serial port implementation |
| littlebot_base/include/littlebot_base/littlebot_driver.hpp | Updated driver with RT buffer support |
| littlebot_base/src/littlebot_driver.cpp | Refactored driver implementation |
| littlebot_base/src/littlebot_hardware_component.cpp | Commented out old driver integration (WIP) |
| littlebot_base/test/mock_serial_port.hpp | Updated mock using gmock |
| littlebot_base/test/mock_rt_buffer.hpp | New mock for RT buffer |
| littlebot_base/test/test_serial_port.cpp | New comprehensive serial port tests |
| littlebot_base/test/test_littlebot_driver.cpp | Updated driver tests |
| littlebot_base/test/test_littlebot_hardware_component.cpp | Commented out hardware component tests (WIP) |
| littlebot_base/CMakeLists.txt | Added realtime_tools dependency and codec source |
| littlebot_base/package.xml | Added realtime_tools dependency |
| docs/figures/wheel_controller.png | New architecture diagram |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Refactoring driver architecture
Related Issue(s)
Checklist