|
|
|
@ -37,6 +37,7 @@ def arm_disarm(
|
|
|
|
param1: 1.0 to arm, 0.0 to disarm.
|
|
|
|
param1: 1.0 to arm, 0.0 to disarm.
|
|
|
|
param2: usually 0. Some stacks use 21196 for force-arm (ArduPilot); pass via param2 if needed.
|
|
|
|
param2: usually 0. Some stacks use 21196 for force-arm (ArduPilot); pass via param2 if needed.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
if not rclpy.ok():
|
|
|
|
rclpy.init(args=None)
|
|
|
|
rclpy.init(args=None)
|
|
|
|
node: Optional[Node] = None
|
|
|
|
node: Optional[Node] = None
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
@ -82,7 +83,6 @@ def arm_disarm(
|
|
|
|
finally:
|
|
|
|
finally:
|
|
|
|
if node is not None:
|
|
|
|
if node is not None:
|
|
|
|
node.destroy_node()
|
|
|
|
node.destroy_node()
|
|
|
|
rclpy.shutdown()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|