as2_python_api.behavior_actions package
Submodules
as2_python_api.behavior_actions.behavior_handler module
behavior_handler.py
- class as2_python_api.behavior_actions.behavior_handler.BehaviorHandler(node: Node, action_msg, behavior_name)[source]
Bases:
ABC
Behavior handler
- TIMEOUT = 1
- property feedback
Behavior feedback
- Returns:
rclpy.Feedback
- property result
Behavior result
- Raises:
self.ResultUnknown – on result not ready
- Returns:
rclpy.Result
- property result_status
Behavior result status
- Returns:
rclpy.GoalStatus
- resume(wait_result: bool = True) bool [source]
Continue with current behavior
- Parameters:
wait_result (bool, optional) – wait to behavior end, defaults to True
- Returns:
resume succeed or not
- Return type:
bool
- start(goal_msg, wait_result: bool = True) bool [source]
Start behavior
- Parameters:
goal_msg (Goal) – behavior goal
wait_result (bool, optional) – wait to behavior end, defaults to True
- Raises:
self.GoalRejected – on goal rejection
- Returns:
succeeded or not
- Return type:
bool
- property status: int
Behavior status
- Returns:
IDLE, PAUSED, RUNNING
- Return type:
int
as2_python_api.behavior_actions.follow_reference_behavior module
follow_reference_behavior.py
- class as2_python_api.behavior_actions.follow_reference_behavior.FollowReferenceBehavior(drone: DroneInterfaceBase)[source]
Bases:
BehaviorHandler
FollowReference Behavior
- modify(pose: Tuple[Pose, PoseStamped], frame_id: str, speed_x: float, speed_y: float, speed_z: float, yaw_mode: int, yaw_angle: float)[source]
- start(pose: Tuple[Pose, PoseStamped], frame_id: str, speed_x: float, speed_y: float, speed_z: float, yaw_mode: int, yaw_angle: float, wait_result: bool = False) bool [source]
Start behavior
- Parameters:
goal_msg (Goal) – behavior goal
wait_result (bool, optional) – wait to behavior end, defaults to True
- Raises:
self.GoalRejected – on goal rejection
- Returns:
succeeded or not
- Return type:
bool
as2_python_api.behavior_actions.followpath_behavior module
followpath_behavior.py
- class as2_python_api.behavior_actions.followpath_behavior.FollowPathBehavior(drone: DroneInterfaceBase)[source]
Bases:
BehaviorHandler
FollowPath Behavior
- modify(path: list | tuple | Path | geographic_msgs.msg.GeoPath | as2_msgs.msg.PoseWithID, speed: float, yaw_mode: int, yaw_angle: float, frame_id: str = 'earth')[source]
- start(path: list | tuple | Path | geographic_msgs.msg.GeoPath | as2_msgs.msg.PoseWithID, speed: float, yaw_mode: int, yaw_angle: float, frame_id: str = 'earth', wait_result: bool = True) bool [source]
Start behavior
- Parameters:
goal_msg (Goal) – behavior goal
wait_result (bool, optional) – wait to behavior end, defaults to True
- Raises:
self.GoalRejected – on goal rejection
- Returns:
succeeded or not
- Return type:
bool
as2_python_api.behavior_actions.go_to_behavior module
go_to_behavior.py
- class as2_python_api.behavior_actions.go_to_behavior.GoToBehavior(drone: DroneInterfaceBase)[source]
Bases:
BehaviorHandler
GoTo Behavior
- modify(pose: Tuple[Pose, PoseStamped, geographic_msgs.msg.GeoPose, geographic_msgs.msg.GeoPoseStamped], speed: float, yaw_mode: int, yaw_angle: float, frame_id: str = 'earth')[source]
- start(pose: Tuple[Pose, PoseStamped, geographic_msgs.msg.GeoPose, geographic_msgs.msg.GeoPoseStamped], speed: float, yaw_mode: int, yaw_angle: float, frame_id: str = 'earth', wait_result: bool = True) bool [source]
Start behavior
- Parameters:
goal_msg (Goal) – behavior goal
wait_result (bool, optional) – wait to behavior end, defaults to True
- Raises:
self.GoalRejected – on goal rejection
- Returns:
succeeded or not
- Return type:
bool
as2_python_api.behavior_actions.land_behavior module
land_behavior.py
- class as2_python_api.behavior_actions.land_behavior.LandBehavior(drone: DroneInterfaceBase)[source]
Bases:
BehaviorHandler
Land Behavior
as2_python_api.behavior_actions.point_gimbal_behavior module
point_gimbal_behavior.py
- class as2_python_api.behavior_actions.point_gimbal_behavior.PointGimbalBehavior(drone: DroneInterfaceBase)[source]
Bases:
BehaviorHandler
PointGimbal Behavior
- start(pose: Tuple[Pose, PoseStamped], frame_id: str, wait_result: bool = False) bool [source]
Start behavior
- Parameters:
goal_msg (Goal) – behavior goal
wait_result (bool, optional) – wait to behavior end, defaults to True
- Raises:
self.GoalRejected – on goal rejection
- Returns:
succeeded or not
- Return type:
bool
as2_python_api.behavior_actions.takeoff_behavior module
takeoff_behavior.py
- class as2_python_api.behavior_actions.takeoff_behavior.TakeoffBehavior(drone: DroneInterfaceBase)[source]
Bases:
BehaviorHandler
Takeoff Behavior