giskardpy.motion_statechart.ros2_nodes.ros_tasks#
Attributes#
Classes#
Abstract base class for tasks that call a ROS2 action server. |
|
Node for calling a Navigation2 ROS2 action server to navigate to a given pose. |
Module Contents#
- giskardpy.motion_statechart.ros2_nodes.ros_tasks.logger#
- giskardpy.motion_statechart.ros2_nodes.ros_tasks.Action#
- giskardpy.motion_statechart.ros2_nodes.ros_tasks.ActionGoal#
- giskardpy.motion_statechart.ros2_nodes.ros_tasks.ActionResult#
- giskardpy.motion_statechart.ros2_nodes.ros_tasks.ActionFeedback#
- class giskardpy.motion_statechart.ros2_nodes.ros_tasks.ActionServerTask#
Bases:
cramph.node.EndedByOwner,giskardpy.motion_statechart.graph_node.MotionStatechartNode,abc.ABC,Generic[Action,ActionGoal,ActionResult,ActionFeedback]Abstract base class for tasks that call a ROS2 action server.
- action_topic: str#
Topic name for the action server.
- message_type: type[Action]#
Fully specified goal message that can be send out.
- required_context_extensions() tuple[type[cramph.context.ContextExtension], ...]#
- Returns:
The types of the context extensions a node of this class reads once it is in a statechart; a statechart compiles such a node only in a context that holds them all.
- abstract build_action_goal() None#
Build the goal message this node sends to the action server.
- set_up() None#
Creates the action client and the message to send.
- on_start() None#
Creates a goal and sends it to the action server asynchronously.
- goal_response_callback(future)#
Handles the server’s response to the goal submission.
On rejection a failure sentinel is stored so that
on_tick()can returnFALSEimmediately.
- result_callback(future)#
Bases:
ActionServerTask[nav2_msgs.action.NavigateToPose,nav2_msgs.action.NavigateToPose.Goal,nav2_msgs.action.NavigateToPose.Result,nav2_msgs.action.NavigateToPose.Feedback]Node for calling a Navigation2 ROS2 action server to navigate to a given pose.
Target pose to which the robot should navigate.
Base link of the robot, used for estimating the distance to the goal.
Build the goal message this node sends to the action server.
Observes whether the robot is within 1cm of the target pose.
Stores the navigation result returned by the action server.
Triggered when the node is ticked. .. warning:: This method is called inside a control loop, make sure it is fast. .. warning:: Only happens while the node is in state RUNNING. .. warning:: The result of this method takes precedence over the observation expression created in build(). :return: An optional observation state overwrite