Skip to content

Commit

Permalink
fixed error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
knmcguire committed Nov 20, 2023
1 parent 487f7e7 commit 0a37e57
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions crazyflie/scripts/crazyflie_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,22 +802,22 @@ def _upload_trajectory_callback(self, request, response, uri="all"):

id = request.trajectory_id
offset = request.piece_offset
size = request.pieces.size()
lenght = len(request.pieces)
total_duration = 0
self.get_logger().info("upload_trajectory(id=%d,offset=%d, size=%d)"% (
self.get_logger().info("upload_trajectory(id=%d,offset=%d, lenght=%d)"% (
id,
offset,
size,
lenght,
))

trajectory = []
for i in range(size):
for i in range(lenght):
piece = request.pieces[i]
px = piece.poly_x
py = piece.poly_y
pz = piece.poly_z
pyaw = piece.poly_yaw
duration = request.duration.sec
px = Poly4D.Poly(piece.poly_x)
py = Poly4D.Poly(piece.poly_y)
pz = Poly4D.Poly(piece.poly_z)
pyaw = Poly4D.Poly(piece.poly_yaw)
duration = piece.duration.sec
trajectory.append(Poly4D(duration, px, py, pz, pyaw ))
total_duration = total_duration + duration

Expand Down Expand Up @@ -864,9 +864,9 @@ def _start_trajectory_callback(self, request, response, uri="all"):
))
if uri == "all":
for link_uri in self.uris:
self.swarm._cfs[link_uri].cf.commander.start_trajectory(id, ts, rel, rev, gm)
self.swarm._cfs[link_uri].cf.high_level_commander.start_trajectory(id, ts, rel, rev, gm)
else:
self.swarm._cfs[uri].cf.commander.start_trajectory(id, ts, rel, rev, gm)
self.swarm._cfs[uri].cf.high_level_commander.start_trajectory(id, ts, rel, rev, gm)

return response

Expand Down

0 comments on commit 0a37e57

Please sign in to comment.