-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Refueling + Tick restructuring #250
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
Implement Refueling + Tick restructuring #250
Conversation
c9d0ce7
to
ab4565f
Compare
…n of payload_size config
…n of payload_size config
include/utilities/constants.hpp
Outdated
const std::chrono::milliseconds MISSION_DONE_TICK_WAIT = std::chrono::milliseconds(100); | ||
const std::chrono::milliseconds ACTIVE_TAKEOFF_TICK_WAIT = std::chrono::milliseconds(100); | ||
const std::chrono::milliseconds WAIT_FOR_TAKEOFF_TICK_WAIT = std::chrono::milliseconds(100); | ||
const std::chrono::milliseconds REFUELING_TICK_WAIT = std::chrono::milliseconds(10000); |
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.
Why does this need to be 10 seconds?
edit: This seems to be a workaround for preventing the tick system to short circuit refuel
. I still don't think this is necessarily a good option:
- Doesn't guarantee that we are safe, which defeats the point of the
refuel
tick. - Minor, after refueling, we could be waiting 10 seconds until it takes off.
- More Major - in the GCS, we would need to know when the tick is in
waitfortakeoff
in order to tell it to takeoff; the alternative is to keep spamming takeoff until it works.
- More Major - in the GCS, we would need to know when the tick is in
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.
Yep I think this should be reverted to 100.
src/cv/pipeline.cpp
Outdated
if (imageData.TELEMETRY.has_value()) { | ||
targetPosition = this->gsdLocalizer.localize(imageData.TELEMETRY.value(), box); | ||
std::cout << "pipeline: " << targetPosition.latitude() << " " << targetPosition.longitude(); | ||
std::cout << "pipeline: " << |
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.
this seems to be a debugging statement
|
||
MissionPath generateSearchPath(std::shared_ptr<MissionState> state) { | ||
std::vector<GPSCoord> gps_coords; | ||
if (state->config.pathing.coverage.method == AirdropCoverageMethod::Enum::FORWARD) { |
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.
has this been tested?
src/ticks/manual_landing.cpp
Outdated
|
||
Tick* ManualLandingTick::tick() { | ||
return nullptr; | ||
return next_tick; |
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.
This is an issue? Take the following:
- We intend to refuel --> We set next tick to be the
refuel
tick. - In manual landing, it immediately transitions to
refuel
tick.- The safety pilot is still landing the aircraft.
- The plane is armed.
- The
refuel
tick will immediately exit, as the plane is still armed
Therefore, the arm check that refuel is meant to do is contingent on whether or not the safety pilot lands the plane in time for the first execution of the refuel
tick.
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.
This is an oversight on my part...
Should have a event trigger that is David dis-arming the plane, which signals the 'end' of manual_landing
.
I'll add that back in for clarity
lint por favor |
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.
Everything looks ok. Forward Coverage pathing is still buggy, but we don't use it at the moment and the alternate works.
This PR introduces the Refueling tick, as well as overall changes to the FSM based on the new mission plan.
While it is a large PR, the changes are simple (when compared to the beast that is
feat/cv-everything
).airdrop_approach
, and the decision to either terminate the mission/land or refuel is based on the amount of airdrops that have been dropped so far.active_takeoff
tick has also been modified to skip the CV procedure if we have done them already.static.cpp
and the searchBoundPath generation.Closes: #242 #241 #235 #240