Skip to content

Commit

Permalink
add demo gif
Browse files Browse the repository at this point in the history
  • Loading branch information
makeecat committed Aug 3, 2024
1 parent 6ad0150 commit 205e6a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![CI](https://github.com/makeecat/Peng/actions/workflows/CI.yml/badge.svg)](https://github.com/makeecat/Peng/actions/workflows/CI)
## What is Peng
Peng is a minimal Rust-based quadrotor simulation pipeline. It includes a simulator, controller, and planner, providing a basic framework for simulating quadrotor dynamics and control.
![demo](assets/Peng_demo.gif)
## Getting Started
terminal 1
```
Expand Down
Binary file added assets/Peng_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,16 +983,16 @@ fn update_planner(
planner_manager.set_planner(PlannerType::ObstacleAvoidance(ObstacleAvoidancePlanner {
target_position: Vector3::new(1.5, 1.0, 1.0),
start_time: time,
duration: 20.0,
duration: 15.0,
start_yaw: quad.orientation.euler_angles().2,
end_yaw: 0.0,
obstacles: obstacles.clone(),
k_att: 0.05,
k_rep: 0.05,
d0: 0.1,
k_att: 0.03,
k_rep: 0.02,
d0: 0.5,
}))
}
9000 => planner_manager.set_planner(PlannerType::Landing(LandingPlanner {
8500 => planner_manager.set_planner(PlannerType::Landing(LandingPlanner {
start_position: quad.position,
start_time: time,
duration: 5.0,
Expand Down Expand Up @@ -1101,7 +1101,8 @@ fn log_data(
rec.log(
"desired_position",
&rerun::Points3D::new([(desired_position.x, desired_position.y, desired_position.z)])
.with_radii([0.1]),
.with_radii([0.1])
.with_colors([rerun::Color::from_rgb(255, 255, 255)]),
)
.unwrap();
rec.log(
Expand Down Expand Up @@ -1273,8 +1274,6 @@ fn main() {
if i >= 7000 && i < 9000 {
log_obstacles(&rec, &obstacles);
}
}
if i % 10 == 0 {
log_trajectory(&rec, &trajectory);
log_data(
&rec,
Expand All @@ -1285,7 +1284,7 @@ fn main() {
);
}
i += 1;
if i >= 10000 {
if i >= 9000 {
break;
}
}
Expand Down

0 comments on commit 205e6a4

Please sign in to comment.