Update master with local changes
This commit is contained in:
@@ -37,7 +37,8 @@ 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.
|
||||||
"""
|
"""
|
||||||
rclpy.init(args=None)
|
if not rclpy.ok():
|
||||||
|
rclpy.init(args=None)
|
||||||
node: Optional[Node] = None
|
node: Optional[Node] = None
|
||||||
try:
|
try:
|
||||||
node = Node("fc_arm_disarm_client_once")
|
node = Node("fc_arm_disarm_client_once")
|
||||||
@@ -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__":
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ def change_mode(
|
|||||||
) -> ChangeModeResult:
|
) -> ChangeModeResult:
|
||||||
|
|
||||||
"""One-shot helper for collaborators who want minimal code."""
|
"""One-shot helper for collaborators who want minimal code."""
|
||||||
rclpy.init(args=None)
|
if not rclpy.ok():
|
||||||
|
rclpy.init(args=None)
|
||||||
node: Optional[Node] = None
|
node: Optional[Node] = None
|
||||||
try:
|
try:
|
||||||
node = Node("fc_change_mode_client_once")
|
node = Node("fc_change_mode_client_once")
|
||||||
@@ -87,7 +88,6 @@ def change_mode(
|
|||||||
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__":
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ def takeoff(
|
|||||||
service_name: str = DEFAULT_SERVICE_NAME,
|
service_name: str = DEFAULT_SERVICE_NAME,
|
||||||
) -> TakeoffResult:
|
) -> TakeoffResult:
|
||||||
"""One-shot MAV_CMD_NAV_TAKEOFF wrapper."""
|
"""One-shot MAV_CMD_NAV_TAKEOFF wrapper."""
|
||||||
rclpy.init(args=None)
|
if not rclpy.ok():
|
||||||
|
rclpy.init(args=None)
|
||||||
node: Optional[Node] = None
|
node: Optional[Node] = None
|
||||||
try:
|
try:
|
||||||
node = Node("fc_takeoff_client_once")
|
node = Node("fc_takeoff_client_once")
|
||||||
@@ -80,7 +81,6 @@ def takeoff(
|
|||||||
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__":
|
||||||
|
|||||||
Reference in New Issue
Block a user