File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,8 @@ def close(self):
194
194
)
195
195
return_pos [2 ] = RETURN_HEIGHT
196
196
self .cf .goTo (goal = return_pos , yaw = 0 , duration = BREAKING_DURATION )
197
- time .sleep (
198
- BREAKING_DURATION - 1
199
- ) # Smoothly transition to next position by setting the next goal earlier
197
+ # Smoothly transition to next position by setting the next goal earlier
198
+ time .sleep (BREAKING_DURATION - 1 )
200
199
201
200
return_pos [:2 ] = self .config .env .track .drone .pos [:2 ]
202
201
self .cf .goTo (goal = return_pos , yaw = 0 , duration = RETURN_DURATION )
@@ -244,8 +243,8 @@ def obs(self) -> dict:
244
243
real_gates_rpy = np .array ([self .vicon .rpy [g ] for g in gate_names ])
245
244
real_obstacles_pos = np .array ([self .vicon .pos [o ] for o in obstacle_names ])
246
245
247
- # Use x-y distance to calucate sensor range, otherwise it would depend on the height of the drone
248
- # and obstacle how early the obstacle is in range.
246
+ # Use x-y distance to calucate sensor range, otherwise it would depend on the height of the
247
+ # drone and obstacle how early the obstacle is in range.
249
248
in_range = np .linalg .norm (real_gates_pos [:, :2 ] - drone_pos [:2 ], axis = 1 ) < sensor_range
250
249
self .gates_visited = np .logical_or (self .gates_visited , in_range )
251
250
gates_pos [self .gates_visited ] = real_gates_pos [self .gates_visited ]
You can’t perform that action at this time.
0 commit comments