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

Feature download usd python layer #520

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

julienthevenoz
Copy link

Trying to add the "download SD over radio" feature directly to the python layer so that it can be called while crazyserver is running (instead of having to shut down crazyserver to free the radio for the download), allowing it to be integrated in the middle of a crazyflie_example script for example. This is still work in progress

  • created the "infinite_flight_download" example script in addition to infinite_flight as a wip. When it all works I plan to copy the code to infinite_flight and delete infinite_flight_download
  • added the relevant functions to create the downloadUSD service to crazyflie.py and crazyflie_server.cpp, as well as the crazyflie interface file downloadUSD.srv

Problems :

  1. Main problem : The typical way we use to call the service in crazyflie.py (a while loop of rcly.spin_once until future.done() == True) doesn't seem to work. Neither does the rclpy.spin_until_future_complete(). Both produce the same error "File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 711, in wait_for_ready_callbacks return next(self._cb_iter)
    ValueError: generator already executing"

  2. Secondary problem : sometimes the script stays blocked in main() at the "cf.uploadTrajectory(0, 0, traj1)" line. The is_crashed thread runs, but the trajectory is never uploaded (which means the cf doesn't fly).

@julienthevenoz julienthevenoz requested a review from whoenig June 10, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant