From 896e1019a6fda0b9ab3f6c2ca463e8853d67484c Mon Sep 17 00:00:00 2001 From: Ryan A Rodriguez Date: Sun, 22 Feb 2026 20:03:39 -0800 Subject: [PATCH 1/2] add imports --- src/betaflight_quad.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/betaflight_quad.rs b/src/betaflight_quad.rs index e144e01d..cb304d17 100644 --- a/src/betaflight_quad.rs +++ b/src/betaflight_quad.rs @@ -7,6 +7,8 @@ use nalgebra::{UnitQuaternion, Vector3}; use std::time::Duration; #[cfg(feature = "vicon")] use vicon_sys::HasViconHardware; +use tokio::sync::watch; +use std::f32::consts::PI; /// Represents a physical quadrotor running a Betaflight controller. pub struct BetaflightQuad { From 3230c2bf1863a0b70aeaa2e039b8889fb6b6be16 Mon Sep 17 00:00:00 2001 From: Ryan A Rodriguez Date: Sun, 22 Feb 2026 20:10:00 -0800 Subject: [PATCH 2/2] HyRL trajectory --- config/betaflight.yaml | 50 +++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/config/betaflight.yaml b/config/betaflight.yaml index 8d5c9cba..511b9e1c 100644 --- a/config/betaflight.yaml +++ b/config/betaflight.yaml @@ -87,39 +87,29 @@ planner_schedule: end_position: [0.0, 0.0, 0.5] # Target end position [x, y, z] (m) target_yaw: 0.0 # Target end yaw angle (rad) - # # Minimum Jerk Line trajectory - # - time: 9.0 # Simulation step in ms to start this planner - # planner_type: MinimumJerkLine - # params: - # start_position: [0.0, 0.0, 0.5] # Target end position [x, y, z] (m) - # start_yaw: 0.0 - # end_position: [-1.5, 0.0, 0.5] # Target end position [x, y, z] (m) - # end_yaw: 0 # Target end yaw angle (rad) - # duration: 10.0 # Duration of the trajectory (s) - - # # HyRL Obstacle Avoidance Trajectory - # - time: 15.0 - # planner_type: HyRL - # params: - # start_yaw: 0.0 - # num_waypoints: 500 - # url: http://172.26.45.187:50052 - # start_position: [-1.5, 0.0, 0.5] - # target_position: [3.5, 0.0, 0.5] - # duration: 30.0 + # Minimum Jerk Line trajectory + - time: 5.0 # Simulation step in ms to start this planner + planner_type: MinimumJerkLine + params: + start_position: [0.0, 0.0, 0.5] # Target end position [x, y, z] (m) + start_yaw: 0.0 + end_position: [-1.5, 0.0, 0.5] # Target end position [x, y, z] (m) + end_yaw: 0 # Target end yaw angle (rad) + duration: 10.0 # Duration of the trajectory (s) - # # Circular trajectory - # - time: 30.0 - # planner_type: Circle - # params: - # center: [0.0, 0.0, 0.5] # Center of the circle [x, y, z] (m) - # radius: 1.0 # Radius of the circle (m) - # angular_velocity: 0.35 # Angular velocity (rad/s) - # duration: 60.0 # Duration of the trajectory (s) - # ramp_time: 5 # Time for smooth transition (s) + # HyRL Obstacle Avoidance Trajectory + - time: 15.0 + planner_type: HyRL + params: + start_yaw: 0.0 + num_waypoints: 500 + url: http://172.26.45.187:50052 + start_position: [-1.5, 0.0, 0.5] + target_position: [3.5, 0.0, 0.5] + duration: 30.0 # Landing trajectory - - time: 120.0 + - time: 45.0 planner_type: Landing params: duration: 5.0 # Duration of the landing maneuver (s)