-
Notifications
You must be signed in to change notification settings - Fork 11
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
FIx timestamp calculation and implement some minor changes #371
Conversation
WalkthroughThe recent changes enhance the time handling capabilities of the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PantherImuSensor
participant rclcpp::Time
User->>PantherImuSensor: InitializeMadgwickAlgorithm(mag_compensated, lin_acc, timestamp)
PantherImuSensor->>rclcpp::Time: Create timestamp from input
PantherImuSensor->>PantherImuSensor: Process sensor data
PantherImuSensor->>User: Return updated sensor state
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- panther_hardware_interfaces/include/panther_hardware_interfaces/panther_imu.hpp (3 hunks)
- panther_hardware_interfaces/src/panther_imu.cpp (9 hunks)
- panther_hardware_interfaces/test/test_panther_imu.cpp (1 hunks)
Additional comments not posted (8)
panther_hardware_interfaces/include/panther_hardware_interfaces/panther_imu.hpp (3)
116-116
: LGTM!The change to use
rclcpp::Time & timestamp
improves the precision and robustness of time handling.
180-180
: LGTM!Renaming the member variable and changing its type to
rclcpp::Time
improves consistency in time handling.
147-147
: LGTM!Adding
steady_clock_
initialized withRCL_STEADY_TIME
enhances the accuracy of time-dependent operations.panther_hardware_interfaces/src/panther_imu.cpp (4)
377-377
: LGTM!The change to use
rclcpp::Time & timestamp
improves the precision and robustness of time handling.
388-388
: LGTM!Renaming the member variable and changing its type to
rclcpp::Time
improves consistency in time handling.
Line range hint
147-147
:
LGTM!Adding
steady_clock_
initialized withRCL_STEADY_TIME
enhances the accuracy of time-dependent operations.
Line range hint
439-467
:
LGTM!The updates to use
rclcpp::Time
for timestamps and the addition of a warning for zero time difference improve the accuracy and robustness of data handling.panther_hardware_interfaces/test/test_panther_imu.cpp (1)
56-58
: LGTM!The change to use
rclcpp::Time & timestamp
improves the precision and robustness of time handling.
Description
This PR fixes an issue with publishing
NaN
on orientationModifications
std::vector
elements for not performance-demanding methods -> (.at()
is safer because of bounds checking)Summary by CodeRabbit
New Features
Bug Fixes
at()
method, preventing out-of-bounds errors.Documentation