giskardpy.middleware.ros2.feedback_publisher#
Classes#
The keys of the motion statechart feedback sent to the action client on top of the |
|
Reports the state of the running motion statechart to the action client. |
Module Contents#
- class giskardpy.middleware.ros2.feedback_publisher.MotionStatechartPayloadKey#
Bases:
enum.StrEnumThe keys of the motion statechart feedback sent to the action client on top of the
StatechartPayloadKey.- WAITING_FOR_CHILD = 'waiting_for_child'#
The nodes waiting for the client to choose their child, by index, each with the number of children it already holds.
- PUBLISHED_POSITION = 'published_position'#
The position Giskard’s world published its changes up to while the goal ran, which the client’s world has to contain before the client reads it; left out if the goal published nothing.
- class giskardpy.middleware.ros2.feedback_publisher.ActionFeedbackPublisher#
Reports the state of the running motion statechart to the action client.
- executor: cramph.executor.StatechartExecutor#
The executor holding the motion statechart that is reported on.
- action_server: giskardpy.middleware.ros2.action_server.ActionServerHandler#
The action server the feedback is sent through.
- outgoing_world_updates: giskardpy.middleware.ros2.world_updates.OutgoingWorldUpdates#
Tells which changes of Giskard’s world the running goal published.
- child_request_repeat_period: float = 0.1#
Seconds after which the feedback is sent again while a node waits for a child, so that a client that could not choose yet is asked again.
- last_history_length: int = -1#
Length of the statechart history at the most recent feedback, used to detect state changes.
- sent_node_count: int = 0#
How many nodes of the statechart the feedback sent the structure of so far.
- publish_structure() None#
Send the state of the motion statechart together with its structure.
Serializing the structure is expensive, so it is sent once while the goal is compiled instead of from inside a control cycle.
- publish_if_changed() None#
Send feedback when the state of the motion statechart changed, and every
child_request_repeat_periodwhile a node waits for a child.
- publish() None#
Send feedback regardless of whether anything changed, with the structure of the nodes that joined the statechart since the structure was sent last.
- create_states() dict[str, Any]#
Collect the life cycle, observation and last observation state of the motion statechart, the tick they were taken at, the nodes waiting for a child, and how far the changes of the goal were published.
- has_state_changed() bool#
Whether the statechart history grew since the last feedback.
- send(data: dict[str, Any]) None#
Publish the given data as action feedback.