Merged
Conversation
- Improved error handling for database manager import. - Added timeout parameter for detecting robot stops. - Enhanced message import function to support additional formats. - Updated YAML configuration with a new control mode topic. - Changed default MongoDB port in launch file from 27017 to 27018.
…field configuration
…date metrics configuration
…ed MongoDB integration, and optimized command handling
…, intervention triggers, and collision detection
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.
What type of PR is this? (check all applicable)
Description
This feature introduces a dynamic ROS 2 node that logs critical autonomy metrics (e.g., total distance, incidents, speed, and Mean Distance Between Incidents (MDBI)) to a MongoDB database. Unlike hard-coded loggers, this node is entirely driven by a YAML configuration file, allowing for flexible and dynamic subscription to any ROS 2 topic and field without requiring code changes.
Key Features
Dynamic Subscription: Subscribes to topics and extracts specific fields defined in the YAML file.
Role-Based Processing: Recognizes special roles (
odometry,control_mode,estop) to automatically calculate and manage core metrics like distance, speed, and autonomy time.Dynamic Publishing: Can mirror specific message fields to new topics, acting as a lightweight data filter/converter.
MongoDB Integration: Initializes a session upon startup and continuously updates metrics and logs events (incidents, mode changes, etc.) to a MongoDB collection.
Robustness: Includes a stop-detection logic to accurately report robot speed as zero when odometry updates cease.
⚙️ How to Use and Configure the Logger
The logger is controlled entirely by the
config_yamlparameter, which points to the YAML configuration file (e.g.,metrics_full.yaml).1. Launch Arguments
When launching the node, ensure you pass the correct parameters, especially if running in a containerized environment (like Docker):
C. Control Mode Example
The
control_moderole requires mapping the raw value from the topic message into the logger's required state (AutonomousorManual).Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes.
[optional] Are there any post deployment tasks we need to perform?