Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cflib bug with upload multiple trajectories #544

Closed
ywang760 opened this issue Jul 12, 2024 · 4 comments · Fixed by #549
Closed

cflib bug with upload multiple trajectories #544

ywang760 opened this issue Jul 12, 2024 · 4 comments · Fixed by #549
Assignees
Labels
bug Something isn't working

Comments

@ywang760
Copy link

Hi, I have a question on using cf.uploadTrajectory to upload multiple trajectories. For example, I'm changing this to

for cf in allcfs.crazyflies:
            cf.uploadTrajectory(0, 0, traj)
            cf.uploadTrajectory(1, 0, traj1)

I'm getting

[crazyflie_server.py-4]   File "/home/yutongw/ros2_ws/install/crazyflie/lib/crazyflie/crazyflie_server.py", line 990, in _upload_trajectory_callback
[crazyflie_server.py-4]     trajectory_mem = self.swarm._cfs[uri].cf.mem.get_mems(
[crazyflie_server.py-4] IndexError: tuple index out of range

on the server.

@knmcguire
Copy link
Collaborator

hmmm that is interesting, perhaps that is a bug on the cflib backend side.

Does this work for the cpp backend? If you start the server with backend:=cpp ?

@knmcguire knmcguire changed the title Proper usage to upload multiple trajectories cflib bug with upload multiple trajectories Jul 23, 2024
@knmcguire knmcguire added the bug Something isn't working label Jul 23, 2024
@knmcguire
Copy link
Collaborator

There was a bug indeed, but luckily easy to spot the issue. There is a PR here #549, if you can try it out?

@knmcguire knmcguire self-assigned this Jul 23, 2024
@ywang760
Copy link
Author

Thank you. It works with backend:=cpp. Adding in #549 also makes backend:=cflib works.

@knmcguire
Copy link
Collaborator

Great! The fix has been merged so you can pull the latest changes on your machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants