squirrel-project / squirrel_common

Repository for message, service and action related SQUIRREL packages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

standard action interface

mzillich opened this issue · comments

Hi Michael,

I think we should have a template for all action interfaces, e.g. taking what you already did with UIBK:

# goal definition
string goal

---
# result definition
string result_status

---
# feedback definition
string current_phase
 string current_status
int32 percent_completed

Does this allways have to look the same? Or can people add fields? How would the planner deal with those extra fields, like stability for grasping?

Hello,

This is a good idea.

The actions do not have to look the same. The three sections; goal, result, and feedback, are written just as normal ROS messages. You can add whatever you like, but I think a template is good:

Additional result and feedback info will be handled by the PDDL/actionlib modules we're working on, either as intermediate control or simply included in the planning model. (It is possible that some of the fields we added to the UIBK actions will be ignored.)

I would remove "string goal" from the requirements, as it is not always required (blindGrasp), and when there is a string in the goal, it may correspond to different things, e.g. in one action an object_id in another action a waypoint_id.

Also, perhaps it is better to have result_status as an integer, for a standardised way of returning success/failure/error etc. and avoid "success/Success/action succeeded/"...

Shall we have as a template:

# goal definition
---
# result definition
int32 result_status
---
# feedback definition
string current_phase
 string current_status
int32 percent_completed

Ok, remove goal, use int for result_status.
Also int for current_status?
The current_phase is probably mostly for debugging reasons. So when a command fails, the current_phase could be "calculating trajectory", so this should be a free form string

@mzillich @m312z Did you come to a decision. If so, please post it and close the issue

@m312z @ipa-jsf : I'd say we put the above template somewhere, with explanations what people are expected to add. What would be a good place for that, in the directory hierarchy? We don't want the template to be actually compiled.

@mzillich : rather than change to int, I'd say remove it completely and rely on the status returned by the actionlib itself. While there is no need for all actions to follow this template, a standardised feedback section will help greatly in visualisation. I can post the following template to the squirrel_common readme and (finally) close this issue?

# goal definition
---
# result definition
---
# feedback definition
string current_phase
string current_status
int32 percent_completed

Yes, seems like a good idea. Simpler is better. Please do so, thanks.

PR merged --> close