splintered-reality/py_trees_ros

[actions.py] get_result().message

Closed this issue · 4 comments

update() in ActionServer has an assumption that result will have message field on preemption py_trees_ros/actions.py#99. This will crash with any action, such as move_base not having result with mesage field.

This ofcourse can be solved by subclassing the update() but it would be better to not having to.

Good catch. I wonder what action I was biasing that from?

A useful solution might be to set a default handler (callback) for the setting of messages (e.g. "aborted", ...) and let the user specify a custom handler for it.

It must be inspired from py_trees_msgs/action: Dock.action and Rotate.action.

However the action_lib.set_succeeded/preempted/etc(result, msg) pipes the msg to actionlib_msgs/GoalStatus which is common and can be retreived by action_client.get_goal_status_text() in rospy. This simplifies things for us and the only custom message required by user (in most cases) would be feedback_message on running.

Following up this comment in PR #36

Closed by #36.