Gripper¶
- class mavsdk.gripper.Gripper(async_plugin_manager)¶
Bases:
AsyncBase
Allows users to send gripper actions.
Generated by dcsdkgen - MAVSDK Gripper API
- async grab(instance)¶
Gripper grab cargo.
- Parameters:
instance (uint32_t)
- Raises:
GripperError – If the request fails. The error contains the reason for the failure.
- name = 'Gripper'¶
- async release(instance)¶
Gripper release cargo.
- Parameters:
instance (uint32_t)
- Raises:
GripperError – If the request fails. The error contains the reason for the failure.
- class mavsdk.gripper.GripperAction(value)¶
Bases:
Enum
Gripper Actions.
Available gripper actions are defined in mavlink under https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS
Values¶
- RELEASE
Open the gripper to release the cargo
- GRAB
Close the gripper and grab onto cargo
- GRAB = 1¶
- RELEASE = 0¶
- exception mavsdk.gripper.GripperError(result, origin, *params)¶
Bases:
Exception
Raised when a GripperResult is a fail code
- class mavsdk.gripper.GripperResult(result, result_str)¶
Bases:
object
Result type.
- Parameters:
result (Result) – Result enum value
result_str (std::string) – Human-readable English string describing the result
- class Result(value)¶
Bases:
Enum
Possible results returned for gripper action requests.
Values¶
- UNKNOWN
Unknown result
- SUCCESS
Request was successful
- NO_SYSTEM
No system is connected
- BUSY
Temporarily rejected
- TIMEOUT
Request timed out
- UNSUPPORTED
Action not supported
- FAILED
Action failed
- BUSY = 3¶
- FAILED = 6¶
- NO_SYSTEM = 2¶
- SUCCESS = 1¶
- TIMEOUT = 4¶
- UNKNOWN = 0¶
- UNSUPPORTED = 5¶