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

SimpleActionState uses inappropriate default outcomes value #115

Open
MarkWannaFly opened this issue Sep 24, 2023 · 0 comments
Open

SimpleActionState uses inappropriate default outcomes value #115

MarkWannaFly opened this issue Sep 24, 2023 · 0 comments

Comments

@MarkWannaFly
Copy link

In simple_action_state.py, the construction of class SimpleActionState is as follows:

class SimpleActionState(RosState):
    """Simple action client state.

    Use this class to represent an actionlib as a state in a state machine.
    """

    # Meta-states for this action
    WAITING_FOR_SERVER = 0
    INACTIVE = 1
    ACTIVE = 2
    PREEMPTING = 3
    COMPLETED = 4

    def __init__(self,
            node,
            # Action info
            action_name,
            action_spec,
            # Default goal
            goal = None,
            goal_key = None,
            goal_slots = [],
            goal_cb = None,
            goal_cb_args = [],
            goal_cb_kwargs = {},
            # Result modes
            result_key = None,
            result_slots = [],
            result_cb = None,
            result_cb_args = [],
            result_cb_kwargs = {},
            # Keys
            input_keys = [],
            output_keys = [],
            outcomes = [],
            # Timeouts
            exec_timeout = None,
            preempt_timeout = Duration(seconds=60.0),
            server_wait_timeout = Duration(seconds=60.0)
            ):

    RosState.__init__(self, node, outcomes=['succeeded','aborted','preempted'])

This will cause problem when I define outcomes different from ['succeeded','aborted','preempted']. It should look like:

RosState.__init__(self, node, outcomes=outcomes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant