Skip to content
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

Complete action server implementation #65

Merged
merged 21 commits into from
May 7, 2021

Conversation

ivanpauno
Copy link
Collaborator

@ivanpauno ivanpauno commented Apr 28, 2021

I have made some progress in the action server implementation.
There are still some things missing, but it would be good to get early feedback on some details:

  • Modified GoalHandle interface so that terminal state transitions take a result message as a parameter (e.g. goalHandle.execute(result)).
  • Added a publishFeedback() method to GoalHandle (not implemented yet).
  • (partially) Handle result requests (not tested yet).
  • Added some interfaces to improve type safety: ResultRequestDefinition, ResultResponseDefinition, FeedbackDefinition, ResultDefinition, GoalDefinition
  • Modified message generation for implement those interfaces when needed.
  • Refactored GoalStatus to be able to get the byte equivalent easily.
  • Created some helper methods to avoid repeating code (createGoalInfo, goalExists, sendResultResponse)

TODO:

* Add interfaces for feedback/goal/result, in order to make the API more type safe.
* Modify rcljava rosidl generator to implement the previous interfaces.
* Refactor GoalStatus enumeration.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
…e terminal transitions. Added some helper methods

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno added the enhancement New feature or request label Apr 28, 2021
@ivanpauno ivanpauno self-assigned this Apr 28, 2021
@ivanpauno
Copy link
Collaborator Author

@jacobperron this is not urgent, but some early feedback would be appreciated.

Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

Looking good!

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Collaborator Author

I have added a bunch of new commits as well

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Collaborator Author

This is almost complete now, see example code here (which works!).
Remaining TODOs are tracked in the OP.

@ivanpauno ivanpauno requested a review from jacobperron May 4, 2021 18:54
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno marked this pull request as ready for review May 5, 2021 21:33
@ivanpauno
Copy link
Collaborator Author

I think this is ready for review now.
I will address the remaining TODOs in new PRs.

Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

Nice work!

ivanpauno and others added 3 commits May 6, 2021 16:49
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from jacobperron May 6, 2021 20:32
Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM!

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno merged commit 4914242 into galactic-devel May 7, 2021
ivanpauno added a commit that referenced this pull request May 17, 2021
* GoalHandle transitions should be able to set a result.
* Refactor GoalStatus enumeration.
* Add interface for ResultRequestDefinition, ResultResponseDefinition, FeedbackDefinition, GoalDefinition, ResultDefinition.
* Modify rcljava rosidl generator to implement those interfaces.
* Handle result requests.
* Handle goal handle terminal transitions.
* Cleanup goal handle status transition bindings.
* Take advantage of nested class.
* Publish status after terminal state transition.
* Handle expire goals.
* Add support for publishing feedback.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Co-authored-by: Jacob Perron <jacob@openrobotics.org>
jacobperron added a commit to ros2-java/ros2_java that referenced this pull request May 17, 2022
* GoalHandle transitions should be able to set a result.
* Refactor GoalStatus enumeration.
* Add interface for ResultRequestDefinition, ResultResponseDefinition, FeedbackDefinition, GoalDefinition, ResultDefinition.
* Modify rcljava rosidl generator to implement those interfaces.
* Handle result requests.
* Handle goal handle terminal transitions.
* Cleanup goal handle status transition bindings.
* Take advantage of nested class.
* Publish status after terminal state transition.
* Handle expire goals.
* Add support for publishing feedback.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Co-authored-by: Jacob Perron <jacob@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants