feat: Add ROS 2 availability check and remove DroneController import.
This commit is contained in:
@@ -31,8 +31,15 @@ except ImportError:
|
||||
print("Run: pip install pymavlink")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
import rclpy
|
||||
from rclpy.node import Node
|
||||
ROS2_AVAILABLE = True
|
||||
except ImportError:
|
||||
ROS2_AVAILABLE = False
|
||||
print("[WARN] ROS 2 (rclpy) not available - using standalone controller")
|
||||
|
||||
from config import ARDUPILOT, CONTROLLER, MAVLINK
|
||||
from src.drone_controller import DroneController
|
||||
|
||||
|
||||
class ArduPilotInterface:
|
||||
|
||||
Reference in New Issue
Block a user