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

Removed closing "controller" and replaced it with crazyswarm magic #23

Merged
merged 7 commits into from
Jan 6, 2025

Conversation

j-kelm
Copy link
Contributor

@j-kelm j-kelm commented Dec 24, 2024

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.

@j-kelm j-kelm marked this pull request as draft December 24, 2024 20:16
@j-kelm j-kelm marked this pull request as ready for review December 24, 2024 20:23
Copy link
Collaborator

@amacati amacati left a 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:
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

lsy_drone_racing/envs/drone_racing_deploy_env.py Outdated Show resolved Hide resolved
@amacati amacati merged commit c1b7194 into utiasDSL:dev Jan 6, 2025
1 check passed
amacati added a commit that referenced this pull request Jan 8, 2025
* 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]>
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.

2 participants