Support several "output" in the SWS application#47
Open
umeshsarkar wants to merge 7 commits into
Open
Conversation
| @AllArgsConstructor | ||
| public class SlidingDecision { | ||
| private String decisionResult; | ||
| private Map<String, String> decisionResult; |
Contributor
There was a problem hiding this comment.
instead of decisionResult, better use slidingDecisionOutputParameters to be consistent with our input parameter naming in the JSON
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.
Closes #46
The main change in this PR is that the application now supports several output variables in the FCL file, and the response structure has been updated to represent the result of each output variable. Everything else remains the same as before.
To better illustrate the support for several output variables, an example has been added in the ConstructionRobotAssistanceDecisionRules.fcl file. This file contains several output variables. To run this example, use the following command:
In the previous version (which supported only a single output variable), the second element in the response JSON
decisionResultwas fixed. It always shows a single set of results, including aslidingDecisionand adescription, as shown below:{ "decisionStatus": "Sliding Decision Response", "decisionResult": { "slidingDecision": "HUMAN_ON_THE_LOOP", "description": "Human has to be informed about AI's rescheduling" }, "decisionExplanation": { "...": "..." } }Since the current version supports several output parameters, having a single
decisionResultfield is now confusing, unstructured, and hard to read. To make the response more readable and structured, thedecisionResultfield now includes individual entries for each output variable, each with its own result set. The name of "individual entries" is coming from the defined output variable name in the FCL file. For example:{ "decisionStatus": "Sliding Decision Response", "decisionResult": { "suggestedWorkSharingApproach": { "slidingDecision": "ROBOT_AUTONOMOUSLY", "description": "Let the robot continue trying" }, "systemAutonomousOperatingStatus": { "slidingDecision": "AUTONOMOUS", "description": "System is currently operating autonomously" } }, "decisionExplanation": { "...": "..." } }Note: This implementation is an initial idea and should be discussed further.
to do: update the README