From fcffdbb4bb05240d79de8f6fc105fb762fd252ff Mon Sep 17 00:00:00 2001 From: Paul Beuchat <beuchatp@control.ee.ethz.ch> Date: Mon, 4 Feb 2019 16:25:36 +0100 Subject: [PATCH] Fixed small error for loading yaml file for picker controller --- .../d_fall_pps/include/nodes/PickerControllerService.h | 2 +- pps_ws/src/d_fall_pps/param/PickerController.yaml | 2 +- .../src/d_fall_pps/src/nodes/PickerControllerService.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pps_ws/src/d_fall_pps/include/nodes/PickerControllerService.h b/pps_ws/src/d_fall_pps/include/nodes/PickerControllerService.h index c5107230..67173f96 100644 --- a/pps_ws/src/d_fall_pps/include/nodes/PickerControllerService.h +++ b/pps_ws/src/d_fall_pps/include/nodes/PickerControllerService.h @@ -232,7 +232,7 @@ std::string m_namespace_to_coordinator_parameter_service; // VARIABLES FOR THE CONTOLLER // > the mass of the crazyflie, in [grams] -float yaml_mass_cf_in_grams = 25.0; +float yaml_mass_cf_in_grams = 30.0; // > the coefficients of the 16-bit command to thrust conversion //std::vector<float> yaml_motorPoly(3); diff --git a/pps_ws/src/d_fall_pps/param/PickerController.yaml b/pps_ws/src/d_fall_pps/param/PickerController.yaml index 65e5fff4..e9ee0b09 100644 --- a/pps_ws/src/d_fall_pps/param/PickerController.yaml +++ b/pps_ws/src/d_fall_pps/param/PickerController.yaml @@ -58,7 +58,7 @@ shouldPerformConvertIntoBodyFrame : true #shouldPublishCurrent_xyz_yaw : true # Boolean indiciating whether the "Debug Message" of this agent should be published or not -shouldPublishDebugMessage : true +shouldPublishDebugMessage : false # Boolean indiciating whether the debugging ROS_INFO_STREAM should be displayed or not shouldDisplayDebugInfo : false diff --git a/pps_ws/src/d_fall_pps/src/nodes/PickerControllerService.cpp b/pps_ws/src/d_fall_pps/src/nodes/PickerControllerService.cpp index d762170a..63346c0f 100644 --- a/pps_ws/src/d_fall_pps/src/nodes/PickerControllerService.cpp +++ b/pps_ws/src/d_fall_pps/src/nodes/PickerControllerService.cpp @@ -638,6 +638,7 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response & // CALL THE FUNCTION FOR PER CYLCE OPERATIONS perControlCycleOperations(); + // THIS IS THE START OF THE "OUTER" CONTROL LOOP // > i.e., this is the control loop run on this laptop // > this function is called at the frequency specified @@ -654,7 +655,8 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response & // SMOOTH ANY CHANGES THAT MAY HAVE OCCURRED IN THE // SETPOINT smoothSetpointChanges(); - + + // CONVERT THE CURRENT INERTIAL FRAME STATE ESTIMATE, INTO // THE BODY FRAME ERROR REQUIRED BY THE CONTROLLER // > Define a local array to fill in with the body frame error @@ -662,14 +664,12 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response & // > Call the function to perform the conversion convert_stateInertial_to_bodyFrameError(m_current_stateInertialEstimate,m_setpoint_for_controller,current_bodyFrameError); - // CARRY OUT THE CONTROLLER COMPUTATIONS // Call the function that performs the control computations for this mode calculateControlOutput_viaLQRforRates(current_bodyFrameError,request,response); - // // PUBLISH THE CURRENT X,Y,Z, AND YAW (if required) // if (shouldPublishCurrent_xyz_yaw) // { @@ -1825,7 +1825,7 @@ int main(int argc, char* argv[]) { // Create the service call as a local variable LoadYamlFromFilename loadYamlFromFilenameCall; // Specify the Yaml filename as a string - loadYamlFromFilenameCall.request.stringWithHeader.data = "StudentController"; + loadYamlFromFilenameCall.request.stringWithHeader.data = "PickerController"; // Set for whom this applies to loadYamlFromFilenameCall.request.stringWithHeader.shouldCheckForID = false; // Wait until the serivce exists -- GitLab