Skip to content

Commit

Permalink
simplify demo
Browse files Browse the repository at this point in the history
  • Loading branch information
makeecat committed Aug 28, 2024
1 parent bb0ddad commit 4d22669
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,17 +973,9 @@ fn update_planner(
end_yaw: current_yaw,
ramp_time: 2.0,
})),
3700 => planner_manager.set_planner(PlannerType::MinimumJerkLine(MinimumJerkLinePlanner {
start_position: quad.position,
end_position: Vector3::new(quad.position.x, quad.position.y, 0.5),
start_yaw: current_yaw,
end_yaw: 0.0,
start_time: time,
duration: 5.0,
})),
4500 => {
3700 => {
planner_manager.set_planner(PlannerType::ObstacleAvoidance(ObstacleAvoidancePlanner {
target_position: Vector3::new(1.5, 1.0, 1.0),
target_position: Vector3::new(1.5, 1.0, 0.5),
start_time: time,
duration: 10.0,
start_yaw: current_yaw,
Expand All @@ -994,7 +986,7 @@ fn update_planner(
d0: 0.5,
}))
}
5500 => {
4500 => {
let waypoints = vec![
quad.position,
Vector3::new(1.0, 1.0, 1.5),
Expand All @@ -1011,7 +1003,7 @@ fn update_planner(
Err(e) => println!("Error creating MinimumSnapWaypointPlanner: {}", e),
}
}
7500 => planner_manager.set_planner(PlannerType::Landing(LandingPlanner {
6500 => planner_manager.set_planner(PlannerType::Landing(LandingPlanner {
start_position: quad.position,
start_time: time,
duration: 5.0,
Expand Down Expand Up @@ -1573,7 +1565,7 @@ fn main() -> Result<(), SimulationError> {
log_maze_obstacles(&rec, &maze)?;
}
i += 1;
if (i as f32 * 100.0 * quad.time_step) as i32 >= 8000 {
if (i as f32 * 100.0 * quad.time_step) as i32 >= 7000 {
break;
}
}
Expand Down

0 comments on commit 4d22669

Please sign in to comment.