Skip to content

Create a module for mapping from BT to Action #1979

@ymd-stella

Description

@ymd-stella

Feature request

Related to #1928 (comment)

Feature description

  • A generic application server that people can use to build their specific autonomy applications.
    • It loads and executes BT and provides an interface as an action server.
    • This makes it easy to provide an action with a user-defined BT.
  • A module for mapping from BT to Action (like BtActionNode mapping from Action to BT::ActionNodeBase)
  • It is similar to BtNavigator, but it applies to general actions.

Implementation considerations

plan A: template
  • class name: BtApplicationServer
  • Inherit: nav2_util::LifecycleNode
  • Template arg: Action type (ActionT)
  • Key functions:
    • Create action server (nav2_util::SimpleActionServer<ActionT>)
    • Load BT from file specified by goal
    • Provide the interfaces below
      • on_initialize_blackboard: Initialize blackboard (ex. Set goals)
      • on_bt_loop; Publish feedback by action server
      • on_bt_shutdown: Return result by action server
  • Constraints:
    • ActionT::Goal must have string bt_xml_filename
plan B: generic action
  • Inherit: nav2_util::LifecycleNode
  • Key functions:
    • Create action server (nav2_util::SimpleActionServer<PerformTask>)
    • Load BT from file specified by goal
    • Provide generic feedback and result.
  • Constraints:
    • PerformTask::Goal must have string bt_xml_filename
    • PerformTask::Goal must have something like Something[] ports
plan A vs. plan B
  • plan A
    • The user implements a BT, and extend BtApplicationServer<ActionT> to create their own application classes and implement some methods.
    • Custom feedbacks and results can be handled.
  • plan B
    • The user implements a BT only.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions