To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit a614b393 authored by Tobias's avatar Tobias
Browse files

CF05 replaced by CF08

parent 995907c5
......@@ -569,7 +569,7 @@ void MainWindow::updateNewViconData(const ptrToMessage& p_msg) //connected to ne
if(global.crazyflieName == "PPS_CF05")
if(global.crazyflieName == "PPS_CF08")
{
// Check if the object is occluded
if (global.occluded)
......
......@@ -220,7 +220,7 @@ void viconCallback(const ViconData& viconData)
for(std::vector<CrazyflieData>::const_iterator it = viconData.crazyflies.begin(); it != viconData.crazyflies.end(); ++it) {
CrazyflieData global = *it;
if(global.crazyflieName == "PPS_CF05")
if(global.crazyflieName == "PPS_CF08")
{
coordinatesToLocal(global);
//allCFs.push_back(global);
......
......@@ -402,7 +402,7 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response &
// compute centralized controller commands
centralized_control_command( request, response );
float delta_z_load_current = request.otherCrazyflies[3].z - load_setpoint[2];
gravity_force_copterloadsystem -= 0.0001*delta_z_load_current;
gravity_force_copterloadsystem -= 0.001*delta_z_load_current;
// compute agent's lqr command for the setpoint
//agent_lqr_command( request , response );
......@@ -466,10 +466,10 @@ void distributed_control_command( Controller::Request &request, Controller::Resp
response.controlOutput.roll = outRoll;
response.controlOutput.pitch = outPitch;
response.controlOutput.yaw = outYaw;
response.controlOutput.motorCmd1 = computeMotorPolyBackward(thrustSum/4 + gravity_force_copterloadsystem);
response.controlOutput.motorCmd2 = computeMotorPolyBackward(thrustSum/4 + gravity_force_copterloadsystem);
response.controlOutput.motorCmd3 = computeMotorPolyBackward(thrustSum/4 + gravity_force_copterloadsystem);
response.controlOutput.motorCmd4 = computeMotorPolyBackward(thrustSum/4 + gravity_force_copterloadsystem);
response.controlOutput.motorCmd1 = computeMotorPolyBackward(thrustSum + gravity_force_copterloadsystem);
response.controlOutput.motorCmd2 = computeMotorPolyBackward(thrustSum + gravity_force_copterloadsystem);
response.controlOutput.motorCmd3 = computeMotorPolyBackward(thrustSum + gravity_force_copterloadsystem);
response.controlOutput.motorCmd4 = computeMotorPolyBackward(thrustSum + gravity_force_copterloadsystem);
// choosing the Crazyflie onBoard controller type.
// it can either be Motor, Rate or Angle based
......@@ -1049,8 +1049,7 @@ void ControllerStateReceivedCallback(const CustomButton& commandReceived)
// Let the user know that this part of the code was triggered
ROS_INFO("[STUDENT CONTROLLER] Button 2 received in controller. ");
ROS_INFO("[STUDENT CONTROLLER] Controller State: enable distributed Controller. ");
gravity_force_copterloadsystem = gravity_force + load_mass * 9.81/(1000*4*3);
controller_state = custom_button_index;
outer_loop_counter = 0;
break;
......@@ -1061,7 +1060,6 @@ void ControllerStateReceivedCallback(const CustomButton& commandReceived)
// Let the user know that this part of the code was triggered
ROS_INFO("[STUDENT CONTROLLER] Button 3 received in controller. ");
ROS_INFO("[STUDENT CONTROLLER] Controller State: prepare Landing, lower the load. ");
gravity_force_copterloadsystem = gravity_force + load_mass * 9.81/(1000*4*3);
controller_state = custom_button_index;
outer_loop_counter = 0;
break;
......@@ -1083,7 +1081,6 @@ void ControllerStateReceivedCallback(const CustomButton& commandReceived)
// Let the user know that this part of the code was triggered
ROS_INFO("[STUDENT CONTROLLER] Button 5 received in controller. ");
ROS_INFO("[STUDENT CONTROLLER] Controller State: centralized controller for copter-load system ");
gravity_force_copterloadsystem = gravity_force + load_mass * 9.81/(1000*4*3);
controller_state = custom_button_index;
outer_loop_counter = 0;
break;
......@@ -1226,6 +1223,7 @@ void processFetchedParameters()
// > in units of [Newtons]
gravity_force = cf_mass * 9.81/(1000*4);
takeOffDistance_increment = (takeOffDistance - takeOffinitial) / ( control_frequency * durationTakeOff );
gravity_force_copterloadsystem = gravity_force + load_mass * 9.81/(1000*4*3);
// DEBUGGING: Print out one of the computed quantities
ROS_INFO_STREAM("[STUDENT CONTROLLER] DEBUGGING: thus the gravity force = " << gravity_force);
......
Markdown is supported
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