-
Notifications
You must be signed in to change notification settings - Fork 25
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
Removed closing "controller" and replaced it with crazyswarm magic #23
Conversation
…ested on hardware)
…ested on hardware)
…sy_drone_racing into feat/closing_controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can you address the minor comments I had? Then we can merge and save a few drone markers from a premature demise.
|
||
self.cf.land(self.config.env.track.drone.pos[2], LAND_DURATION) | ||
time.sleep(LAND_DURATION) | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need the general Exception catch here? If so, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general Exception catch is not necessary and admittedly bad code. At least notifysetpointstop and maybe also the other calls to cf may raise a rospy.service.ServiceException if the drone is not reachable (e.g. because of an emergency shutoff of the drone), resulting in hanging code in my case.
Catching the rospy.service.ServiceException should probably be enough, but I cannot validate this on the drone anymore.
* Changed in_range obervation space variable to visited * Removed closing "controller" and replaced it with crazyswarm magic (#23) * Removed closing "controller" and replaced it with crazyswarm magic (tested on hardware) --------- Co-authored-by: Martin Schuck <[email protected]> --------- Co-authored-by: Niklas Schlueter <[email protected]> Co-authored-by: Jonathan Kelm <[email protected]>
Merry Christmas, everyone! Rejoice, Santa has finally brought a working™ closing "controller" so that the amount of innocent drone casualties may be reduced in the upcoming year.
Since it uses crazyswarm directly, it is incompatible with the existing closing controller architecture. Thus, my changes include fully removing the last iteration of the closing controller.
Thoroughly tested on hardware for varying speeds and race tracks. A little hacky, but works. Also fixes #22.