-
Notifications
You must be signed in to change notification settings - Fork 1
Goal ID and History Support #25
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
Open
zeerekahmad
wants to merge
2
commits into
main
Choose a base branch
from
zeerekahmad/goal_ids
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+103
−1
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # CortexCommandRecord | ||
| # | ||
| # Cortex's bookkeeping wrapper around a single CortexCommand. It carries the | ||
| # Cortex-assigned identity, lifecycle state, and terminal outcome, and is the | ||
| # element type of both the live queue and the command history. | ||
|
|
||
| # Cortex-assigned identifier, unique per accepted command. Reused by the caller | ||
| # as the goal id. Returned from ModifyCortexQueue as command_ids. | ||
| unique_identifier_msgs/UUID id | ||
|
|
||
| # The wrapped command. | ||
| polymath_msgs/CortexCommand command | ||
|
|
||
| # Short human-readable description of the command (type plus salient content). | ||
| string summary | ||
|
|
||
| # Lifecycle State (Enum) | ||
| # | ||
| # QUEUED: accepted and waiting in the queue | ||
| # ACTIVE: currently dispatching (front of queue) | ||
| # TERMINAL: finished; see outcome | ||
| uint8 QUEUED=0 | ||
| uint8 ACTIVE=1 | ||
| uint8 TERMINAL=2 | ||
| uint8 state | ||
|
|
||
| # Terminal Outcome (Enum) | ||
| # | ||
| # OUTCOME_UNKNOWN: not yet terminal | ||
| # SUCCEEDED: dispatched to completion | ||
| # FAILED: dispatch failed or aborted mid-flight | ||
| # CANCELED: discarded by a stop | ||
| # PREEMPTED: discarded by a preempting command | ||
| # REJECTED: never accepted (failed validation) | ||
| uint8 OUTCOME_UNKNOWN=0 | ||
| uint8 SUCCEEDED=1 | ||
| uint8 FAILED=2 | ||
| uint8 CANCELED=3 | ||
| uint8 PREEMPTED=4 | ||
| uint8 REJECTED=5 | ||
| uint8 outcome | ||
|
|
||
| # Outcome context, e.g. the validation message for a rejection. | ||
| string detail | ||
|
|
||
| # Time the command was accepted and queued. | ||
| builtin_interfaces/Time queued_time | ||
|
|
||
| # Time the command became active. Zero until started. | ||
| builtin_interfaces/Time started_time | ||
|
|
||
| # Time the command reached a terminal state. Zero until terminal. | ||
| builtin_interfaces/Time completed_time | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # QueryCortexHistory | ||
| # | ||
| # Returns terminal-state command records from Cortex's bounded history ring, | ||
| # newest first, subject to the optional filters below. | ||
|
|
||
| # Maximum number of records to return. Zero means no limit. | ||
| uint32 max_count | ||
|
|
||
| # Only return records completed at or after this time. Zero disables the filter. | ||
| builtin_interfaces/Time since | ||
|
|
||
| # Only return the record with this id. Zero UUID disables the filter. | ||
| unique_identifier_msgs/UUID command_id | ||
|
|
||
| --- | ||
| bool success | ||
| string message | ||
| polymath_msgs/CortexCommandRecord[] records |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # QueryCortexQueue | ||
| # | ||
| # Returns a snapshot of the live command queue plus the currently active command. | ||
|
|
||
| --- | ||
| bool success | ||
| string message | ||
|
|
||
| # Queued commands in dispatch order. The active command, if any, is the front | ||
| # entry and is reported with state ACTIVE. | ||
| polymath_msgs/CortexCommandRecord[] queued | ||
|
|
||
| # Id of the currently active command. Zero UUID when nothing is active. | ||
| unique_identifier_msgs/UUID active_command_id | ||
|
|
||
| # Number of commands remaining in the queue. | ||
| uint32 number_commands_remaining |
Oops, something went wrong.
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.
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.
https://docs.ros2.org/foxy/api/action_msgs/msg/GoalStatus.html any reason not to mimic these?