Skip to content

Feat whell class#15

Merged
NestorDP merged 33 commits intomainfrom
feat-whell-class
Jan 16, 2026
Merged

Feat whell class#15
NestorDP merged 33 commits intomainfrom
feat-whell-class

Conversation

@NestorDP
Copy link
Copy Markdown
Owner

Pull Request

Description

Refactoring driver architecture

Related Issue(s)

Checklist

  • I have tested this code thoroughly.
  • My code follows the project's coding standards.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Wheel class to encapsulate wheel-related data and operations
  • Added RT buffer abstraction (IRTBuffer) for thread-safe communication between RT and non-RT contexts
  • Refactored SerialPort to use streaming reads and frame extraction instead of packet-based approach
  • Updated LittlebotDriver constructor 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.

@NestorDP NestorDP merged commit 3a133c4 into main Jan 16, 2026
0 of 2 checks passed
@NestorDP NestorDP deleted the feat-whell-class branch January 16, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants