out_trajectories = {}for drone in drones1: trajs = trajectories_builder.compute_trajectories(drone, depots[0]) out_trajectories[drone] = trajs,修改程序,输出全部drone的轨迹信息
时间: 2024-02-20 10:57:28 浏览: 101
TrajectoryPlanning.zip_TrajectoryPlanning_航迹_航迹规划_航迹规划C++_飞行器航迹
修改后的程序如下所示:
```python
out_trajectories = {}
for drone in drones:
trajs = trajectories_builder.compute_trajectories(drone, depots[0])
out_trajectories[drone] = trajs
# 输出所有drone的轨迹信息
for drone, trajs in out_trajectories.items():
print("Drone:", drone)
for idx, traj in enumerate(trajs):
print("Trajectory ", idx+1, ":", traj)
```
这样修改后,程序将会输出所有drone的轨迹信息,其中每个drone对应的轨迹信息会依次输出。
阅读全文