Commit 55f12735 authored by mastefan's avatar mastefan
Browse files

added framework for new flight sequence

parent 9335b065
......@@ -217,6 +217,8 @@ float startCoordinateZ;
// tolerances (x,y,z)
float tol_eps[3] = {0.03, 0.03, 0.03};
float tol_approach[3] = {0.2, 0.2, 0.05}; // added to differ between approach and land *
float tol_land[3] = {0.03, 0.03, 0.03}; // *
float eps_height = 0.05;
......
......@@ -523,7 +523,7 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response &
// flightSeqeunce 1: simple approaching and landing on static mothership
if (flightSequence == SEQUENCE_LAND_ON_MOTHERSHIP){
flying_state = DRONEX_STATE_TAKING_OFF;
//ROS_INFO_STREAM("Flight sequence: Landing on mothership");
......@@ -538,6 +538,27 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response &
}
// flightSequence 2: approach and land with velocity optimized controller
// TODO: define SEQUENCE names in .h (maybe rename sequences)
if (flightSequence == SEQUENCE_2){
flying_state = DRONEX_STATE_TAKING_OFF;
if (tookOffFlag){
// TODO:
// approach landing zone: maybe a point "behind" the mothership in some angle
// maybe turn to yaw so that CF points to mothership
// -> in DRONEX_STATE_APPROACH or own function
if (approachedFlag){
// TODO:
// turn on velocity optimized controller
// land and turn off motors, when velocity and position requirements met
// -> define i.e. tol_velocity, tol_land[3]
}
}
}
calculateDroneXVelocity(request);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment