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 1c828e31 authored by Tobias's avatar Tobias
Browse files

.csv debugging files are created, sign swith for x-y body rate cmds

parent 1351003a
This diff is collapsed.
0,0,0,0,0,0,0,0,0,0,0,0
0.0692721,0.0236281,0.000477442,-0.0117378,0.109424,-0.0437433,0.0391568,-0.00456707,-0.142809,-0.0461281,-0.0484908,-0.0173986
0.103312,0.0451493,0.000203587,-0.0222144,0.159222,-0.083805,0.072769,-0.00912272,-0.201144,-0.0886002,-0.0913071,-0.0332338
0.112729,0.0660465,-0.00050921,-0.0315199,0.168204,-0.119591,0.103619,-0.0133358,-0.203132,-0.126532,-0.129761,-0.0474255
0.106012,0.0869236,-0.00186511,-0.0397901,0.15363,-0.15122,0.130964,-0.0174995,-0.172712,-0.158525,-0.165736,-0.0601414
0.0910845,0.112328,-0.00341034,-0.0471613,0.12844,-0.184039,0.160693,-0.0217367,-0.129135,-0.192492,-0.202382,-0.0721311
0.0735388,0.127663,-0.00436589,-0.0538956,0.101739,-0.20792,0.181229,-0.0254681,-0.0858949,-0.215049,-0.226126,-0.0829714
0.0571936,0.134543,-0.00432591,-0.0602046,0.0796872,-0.228833,0.195428,-0.0292443,-0.0518948,-0.233391,-0.238661,-0.0931919
0.0433403,0.138633,-0.00337893,-0.0658549,0.0635033,-0.247117,0.206442,-0.0329371,-0.0285299,-0.243987,-0.240163,-0.102511
0.0312172,0.125456,-0.00172748,-0.0710976,0.0531778,-0.255548,0.202574,-0.0363575,-0.0141672,-0.239297,-0.218508,-0.111304
0.0205998,0.0946524,0.000707743,-0.0758592,0.0477496,-0.250521,0.179895,-0.0395415,-0.00665799,-0.212499,-0.171625,-0.119243
0.0105033,0.0416855,0.00503323,-0.0803135,0.0463135,-0.230656,0.13785,-0.0422337,-0.0039703,-0.164527,-0.0963282,-0.126476
0.00129844,-0.0310765,0.0109402,-0.0846718,0.0469619,-0.201118,0.0806741,-0.0450151,-0.0044913,-0.100153,0.00515932,-0.133285
-0.00617709,-0.121262,0.0172236,-0.0888063,0.0482505,-0.158321,0.00597724,-0.0477661,-0.00687158,-0.02,0.13228,-0.14007
-0.0138585,-0.225519,0.0265089,-0.0926851,0.0490305,-0.113515,-0.0750933,-0.0510159,-0.0080083,0.0625027,0.277187,-0.147245
-0.0249776,-0.358424,0.0357091,-0.0966341,0.0495452,-0.0488171,-0.182854,-0.0539956,-0.00462412,0.165748,0.452632,-0.153717
-0.0373898,-0.499307,0.0440493,-0.100187,0.0485576,0.0264624,-0.301819,-0.0568355,0.00226395,0.282713,0.64026,-0.159837
-0.049173,-0.644021,0.0521837,-0.103819,0.0456691,0.100706,-0.420833,-0.0598349,0.0110762,0.40067,0.833398,-0.166193
-0.0610242,-0.792184,0.0608452,-0.107295,0.0424781,0.174326,-0.542287,-0.0630103,0.0209599,0.516042,1.03389,-0.172657
-0.0712835,-0.938305,0.0690824,-0.110797,0.037447,0.245349,-0.661833,-0.0661532,0.0317572,0.637464,1.22706,-0.178431
-0.0828481,-1.0901,0.0773828,-0.114091,0.0305189,0.317834,-0.788034,-0.0691913,0.046037,0.758226,1.42862,-0.183997
-0.0937063,-1.23737,0.085709,-0.117206,0.0238924,0.387973,-0.907767,-0.0719053,0.059682,0.876999,1.62497,-0.189445
-0.10318,-1.3705,0.0915698,-0.120048,0.0182625,0.45371,-1.01822,-0.074534,0.0712897,0.992423,1.80666,-0.194434
-0.113169,-1.50292,0.0957963,-0.123014,0.00996816,0.521186,-1.13179,-0.0771376,0.0862142,1.11055,1.98344,-0.199205
-0.12228,-1.61611,0.0995654,-0.125697,0.000559277,0.576415,-1.22679,-0.0801543,0.101575,1.21454,2.14338,-0.204228
-0.129078,-1.72729,0.103386,-0.128281,-0.00646832,0.637304,-1.31907,-0.0825621,0.112305,1.31851,2.30252,-0.208813
-0.136736,-1.8173,0.10503,-0.130563,-0.0149443,0.685727,-1.39273,-0.0849668,0.125765,1.40935,2.4383,-0.213225
-0.142148,-1.89488,0.10654,-0.132923,-0.0259254,0.725477,-1.45267,-0.0874932,0.139472,1.49011,2.55978,-0.217577
-0.146601,-1.96047,0.107679,-0.135082,-0.0339084,0.764246,-1.50218,-0.0892056,0.149198,1.56132,2.67076,-0.221691
-0.149729,-2.00514,0.109371,-0.137225,-0.0387782,0.784734,-1.52787,-0.0916032,0.154469,1.61607,2.76192,-0.225785
-0.151518,-2.03346,0.109727,-0.139422,-0.0446572,0.803961,-1.54194,-0.0938974,0.15942,1.66504,2.83742,-0.229323
-0.15214,-2.02169,0.109174,-0.141703,-0.0494527,0.79473,-1.51701,-0.0966694,0.162133,1.68905,2.87322,-0.233291
-0.153086,-1.9855,0.107942,-0.143584,-0.0527261,0.785792,-1.47589,-0.0984691,0.163945,1.70181,2.88969,-0.23728
-0.151196,-1.91716,0.103645,-0.14539,-0.055523,0.768972,-1.41394,-0.100015,0.162637,1.70217,2.87797,-0.241489
-0.148545,-1.82874,0.101297,-0.147426,-0.0599608,0.728562,-1.32385,-0.102058,0.161908,1.68663,2.84216,-0.2455
-0.146063,-1.71035,0.0964563,-0.14885,-0.0622606,0.684659,-1.21714,-0.103392,0.159813,1.65905,2.78203,-0.249692
-0.141153,-1.57444,0.0917392,-0.150891,-0.0665418,0.628453,-1.08899,-0.104502,0.157353,1.61362,2.70189,-0.254005
-0.135524,-1.39873,0.086064,-0.152362,-0.0681717,0.554021,-0.930781,-0.105505,0.151631,1.54958,2.58977,-0.25892
-0.130407,-1.21363,0.0794227,-0.153962,-0.0692714,0.477973,-0.765026,-0.106117,0.146204,1.48232,2.46461,-0.263828
-0.124487,-0.994061,0.0726556,-0.154894,-0.0698162,0.389959,-0.574631,-0.10665,0.139639,1.39626,2.31181,-0.269617
-0.11735,-0.754696,0.0642993,-0.155863,-0.0717803,0.294532,-0.367778,-0.107106,0.133586,1.30547,2.1383,-0.275009
-0.109311,-0.484387,0.0567508,-0.156672,-0.0752403,0.182244,-0.132486,-0.107818,0.128536,1.19353,1.93422,-0.281188
-0.101816,-0.192579,0.0468452,-0.157056,-0.0734865,0.0586994,0.118557,-0.108463,0.119189,1.07102,1.70819,-0.287161
-0.094842,0.103506,0.0364373,-0.157469,-0.0684999,-0.0615079,0.368483,-0.108632,0.106959,0.948157,1.47677,-0.2935
-0.0866688,0.426734,0.0265377,-0.157594,-0.0634532,-0.200632,0.64304,-0.108895,0.0938937,0.802222,1.22134,-0.300555
-0.0793323,0.755341,0.0156169,-0.157338,-0.0596796,-0.33895,0.917333,-0.109635,0.0833885,0.65656,0.957959,-0.307597
-0.071209,1.08764,0.00534789,-0.1575,-0.0586816,-0.478686,1.19632,-0.110262,0.0750844,0.497334,0.686011,-0.31566
-0.0655471,1.42729,-0.00477277,-0.157729,-0.0556721,-0.621514,1.4784,-0.111092,0.0674946,0.33944,0.402256,-0.32311
-0.0576944,1.75504,-0.0135496,-0.158043,-0.0536235,-0.759147,1.74924,-0.111676,0.0587745,0.183447,0.126138,-0.330867
-0.0499731,2.08344,-0.0226842,-0.15826,-0.0485317,-0.895109,2.01893,-0.112281,0.0472314,0.0236182,-0.156875,-0.338675
-0.0423728,2.3824,-0.0311577,-0.159,-0.0476946,-1.02049,2.26418,-0.113249,0.0401347,-0.12386,-0.421053,-0.346545
-0.0374993,2.65733,-0.0393431,-0.159816,-0.0399049,-1.13465,2.48427,-0.114214,0.0291219,-0.261031,-0.670198,-0.354383
-0.0309412,2.90595,-0.0476065,-0.16066,-0.0336062,-1.2355,2.68013,-0.115516,0.0178044,-0.395057,-0.903347,-0.362685
-0.0254915,3.1246,-0.0555179,-0.161799,-0.0312821,-1.32882,2.85285,-0.117113,0.0114385,-0.516936,-1.11567,-0.370746
-0.0201047,3.31211,-0.0630669,-0.16308,-0.027366,-1.40478,2.99422,-0.118819,0.00330989,-0.616894,-1.30601,-0.378594
-0.0133347,3.45285,-0.0696877,-0.164322,-0.0268288,-1.4631,3.0931,-0.120425,-0.00302734,-0.704944,-1.46179,-0.386149
-0.00793205,3.55699,-0.0758896,-0.165482,-0.0270694,-1.50478,3.15941,-0.122883,-0.00746009,-0.775129,-1.59042,-0.394214
-0.00531603,3.60165,-0.0781257,-0.166438,-0.0222335,-1.51825,3.17416,-0.124708,-0.0146427,-0.815541,-1.66842,-0.401545
-0.000788225,3.60155,-0.0820435,-0.167591,-0.0224573,-1.51331,3.14862,-0.126748,-0.0188312,-0.833735,-1.7127,-0.409075
0.00285782,3.53042,-0.0817333,-0.169105,-0.0189621,-1.47991,3.0641,-0.128908,-0.0261324,-0.821136,-1.70103,-0.41589
0.00528568,3.41002,-0.0781815,-0.170758,-0.0145557,-1.42695,2.93931,-0.131249,-0.0338903,-0.784295,-1.64863,-0.422932
0.00832129,3.23413,-0.0712939,-0.17227,-0.0115921,-1.35461,2.76903,-0.133574,-0.0410446,-0.721872,-1.55034,-0.429253
0.0123152,3.05512,-0.0669049,-0.171898,-0.00652938,-1.27703,2.5817,-0.136401,-0.0514458,-0.648693,-1.43955,-0.435591
0.0192371,2.81835,-0.0589143,-0.171853,-0.0043622,-1.19554,2.35527,-0.140964,-0.0622218,-0.554941,-1.2892,-0.441596
0.0246354,2.48365,-0.0470624,-0.172848,0.00144361,-1.05844,2.05053,-0.143574,-0.0754859,-0.42334,-1.06431,-0.447833
0.0303956,2.0935,-0.0326744,-0.174124,0.00666057,-0.885621,1.69652,-0.144921,-0.0884298,-0.263618,-0.79151,-0.453558
0.0376427,1.68172,-0.0171913,-0.17484,0.0122066,-0.711644,1.32578,-0.14726,-0.10371,-0.0951926,-0.502866,-0.459007
0.0471102,1.27372,-0.0047453,-0.174159,0.0150351,-0.543523,0.952367,-0.150188,-0.118307,0.0704783,-0.216948,-0.46429
0.0551238,0.849999,0.00711453,-0.17295,0.0194586,-0.375333,0.565459,-0.154159,-0.133105,0.240381,0.0854463,-0.469386
0.064845,0.389557,0.0186421,-0.171542,0.0236312,-0.176206,0.14521,-0.15633,-0.148682,0.421888,0.420048,-0.474538
0.0737045,-0.110031,0.0292525,-0.169816,0.0268457,0.0567178,-0.310907,-0.156705,-0.162819,0.626465,0.783346,-0.479006
0.0809218,-0.583856,0.0389971,-0.167926,0.0300322,0.254286,-0.735028,-0.159304,-0.175459,0.809662,1.12371,-0.483333
0.0878033,-1.05722,0.0480441,-0.165576,0.0341056,0.449955,-1.15603,-0.161954,-0.188589,0.983534,1.46306,-0.487654
0.0921752,-1.52785,0.0553616,-0.163172,0.0346825,0.663307,-1.57742,-0.162726,-0.195468,1.15946,1.80508,-0.491516
0.0967508,-1.99006,0.0610667,-0.160258,0.0349229,0.886245,-1.99091,-0.162188,-0.20179,1.32735,2.14031,-0.495146
0.0974542,-2.41114,0.0650503,-0.157129,0.0354007,1.10584,-2.36657,-0.159728,-0.204373,1.4817,2.44398,-0.498314
0.0957893,-2.79227,0.0674766,-0.153816,0.029357,1.29817,-2.70149,-0.158041,-0.198002,1.60795,2.7143,-0.501296
0.0900659,-3.13725,0.0683501,-0.150514,0.0212051,1.47262,-2.99802,-0.156627,-0.185324,1.7101,2.95295,-0.50362
0.0823632,-3.40865,0.0671636,-0.146483,0.00884243,1.60898,-3.22775,-0.15594,-0.166195,1.77106,3.13438,-0.506215
0.0705544,-3.56365,0.0648937,-0.142226,-0.00647134,1.61992,-3.33517,-0.163002,-0.14041,1.75999,3.20804,-0.508495
0.054583,-3.67678,0.061958,-0.137701,-0.0224171,1.61618,-3.40403,-0.170115,-0.109594,1.7224,3.25156,-0.510838
0.034161,-3.74226,0.0585217,-0.13338,-0.0395014,1.58677,-3.42415,-0.177129,-0.0728906,1.65668,3.25356,-0.513254
0.00854666,-3.73271,0.0530278,-0.128286,-0.0595762,1.5293,-3.38038,-0.183772,-0.0277631,1.54913,3.19868,-0.516137
-0.0201775,-3.65538,0.0461004,-0.122822,-0.079109,1.45175,-3.28088,-0.18959,0.0201597,1.40674,3.09512,-0.519579
-0.052495,-3.53131,0.0392587,-0.117998,-0.101527,1.34695,-3.13203,-0.195506,0.0746474,1.23596,2.9432,-0.523269
-0.0892293,-3.33178,0.0319954,-0.112183,-0.121121,1.22096,-2.92249,-0.200255,0.131088,1.02832,2.73952,-0.527698
-0.125892,-3.06738,0.0244765,-0.106596,-0.13983,1.06558,-2.65426,-0.205446,0.186707,0.788501,2.48417,-0.532522
-0.162037,-2.70882,0.0150204,-0.0999025,-0.158154,0.872026,-2.31262,-0.210333,0.241768,0.506981,2.15959,-0.53783
-0.200298,-2.33112,0.00480521,-0.0936061,-0.172438,0.685008,-1.95666,-0.213694,0.295349,0.224076,1.81807,-0.542967
-0.235439,-1.88326,-0.00623804,-0.08634,-0.18576,0.474689,-1.54994,-0.21683,0.34478,-0.0856725,1.42489,-0.548735
-0.266617,-1.39407,-0.018806,-0.0789884,-0.198935,0.251963,-1.11073,-0.219225,0.390505,-0.40853,1.00172,-0.55484
-0.294211,-0.866965,-0.0319875,-0.0709815,-0.208586,0.0193812,-0.647512,-0.221158,0.429403,-0.739523,0.550935,-0.560903
-0.314381,-0.328771,-0.048466,-0.0627192,-0.218095,-0.212764,-0.179412,-0.222791,0.461649,-1.06273,0.091212,-0.566779
-0.331189,0.229581,-0.0670412,-0.0542949,-0.228495,-0.450596,0.297894,-0.224009,0.492155,-1.39789,-0.37966,-0.572958
-0.340987,0.861333,-0.0947802,-0.0455307,-0.238819,-0.722468,0.826914,-0.224765,0.523121,-1.76757,-0.968741,-0.586373
-0.340856,1.48163,-0.120998,-0.03678,-0.249111,-0.99327,1.34774,-0.225607,0.543568,-2.13015,-1.5435,-0.598904
-0.336842,2.08231,-0.146974,-0.0274966,-0.260149,-1.25154,1.84648,-0.226156,0.561551,-2.4802,-2.09371,-0.610708
-0.325455,2.66084,-0.17102,-0.0171482,-0.278528,-1.49337,2.31729,-0.226777,0.580527,-2.80754,-2.61924,-0.621058
-0.30822,3.19503,-0.196494,-0.00695788,-0.299662,-1.71807,2.75203,-0.227431,0.598047,-3.11925,-3.10912,-0.630923
-0.285343,3.69644,-0.220432,0.00349493,-0.322783,-1.92365,3.15214,-0.228267,0.613801,-3.40242,-3.57061,-0.639371
-0.258344,4.13949,-0.244765,0.0135659,-0.347827,-2.10064,3.49829,-0.228654,0.630119,-3.65821,-3.98689,-0.647301
-0.228734,4.51236,-0.26883,0.0229108,-0.377829,-2.24415,3.78076,-0.228596,0.651469,-3.87545,-4.35124,-0.654532
-0.198546,4.84168,-0.290998,0.0323302,-0.397565,-2.36915,4.02344,-0.229125,0.664756,-4.06149,-4.68313,-0.661043
-0.166746,5.10913,-0.312723,0.0418313,-0.417874,-2.45702,4.19979,-0.229675,0.679836,-4.19534,-4.96946,-0.666637
-0.135428,5.22523,-0.323087,0.0508365,-0.438958,-2.48033,4.25431,-0.229972,0.692099,-4.24573,-5.07806,-0.664944
-0.103371,5.29341,-0.334156,0.0595956,-0.46079,-2.48143,4.25952,-0.230181,0.709221,-4.25284,-5.1628,-0.663334
-0.0705849,5.23735,-0.342326,0.0637297,-0.476383,-2.44174,4.17435,-0.231436,0.723292,-4.20602,-5.17123,-0.661758
-0.0383126,5.12031,-0.350089,0.0686805,-0.491311,-2.37019,4.02707,-0.23243,0.740752,-4.10769,-5.1343,-0.659394
-0.00479933,4.90308,-0.359672,0.0730911,-0.502085,-2.25315,3.79226,-0.232465,0.755991,-3.93827,-5.02788,-0.655968
This diff is collapsed.
......@@ -248,6 +248,12 @@ std::string namespace_to_coordinator_parameter_service;
int my_agentID = 0;
// filehandles for debugging
std::ofstream estimator_file;
std::ofstream input_file;
std::ofstream output_file;
// RELEVANT NOTES ABOUT THE VARIABLES DECLARE HERE:
// The "CrazyflieData" type used for the "request" variable is a
// structure as defined in the file "CrazyflieData.msg" which has the following
......@@ -340,9 +346,4 @@ std::vector<float> transformation_frame_load_to_world(std::vector<float> P_load
void desired_eulerrates_to_bodyrates( Controller::Request &request , float roll_rate , float pitch_rate, float (&bodyrates)[2]);
// Rosbag for debugging
rosbag::Bag bag_estimator;
rosbag::Bag bag_measurement;
rosbag::Bag bag_input;
rosbag::Bag bag;
\ No newline at end of file
void write_vector_to_csv(std::ofstream filehandle, int len, std::vector<float> x);
......@@ -517,6 +517,21 @@ void distributed_control_command( Controller::Request &request, Controller::Resp
void centralized_control_command( Controller::Request &request, Controller::Response &response)
{
// DEBUGGING
// write estimates to csv
for(int i=0 ; i < 33 ; i++)
{
if (i < 32)
{
estimator_file<< estimator_state_prev(i) << ",";
}
else
{
estimator_file<< estimator_state_prev(i) ;
}
}
estimator_file<< "\n" ;
// Control output
Eigen::Matrix<float,12,1> u = centralized_controller.K * estimator_state_prev;
// Estimator update
......@@ -557,29 +572,20 @@ void centralized_control_command( Controller::Request &request, Controller::Resp
}
// DEBUGGING
// write estimates to bag
for(int i=0 ; i<33 ; i++)
// write input to to csv
for(int i=0 ; i < 12 ; i++)
{
std_msgs::Float32 est_i;
est_i.data = estimator_state_prev(i) ;
std::string topic = "Estimator_" + std::to_string(i);
bag.write(topic,ros::Time::now(),est_i);
}
/* // write input to bag
for(int i=0 ; i<12 ; i++)
{
std_msgs::float32 u_i;
u_i.data = u(i) ;
bag_input.write(u_i);
if(i<11)
if (i < 11)
{
bag_input.write(",");
input_file<< u(i) << ",";
}
else
{
input_file<< u(i) ;
}
}
bag_input.write("\n");*/
input_file<< "\n" ;
if (outer_loop_counter % 2 == 0)
......@@ -658,8 +664,8 @@ void centralized_control_command( Controller::Request &request, Controller::Resp
desired_eulerrates_to_bodyrates( request , outRoll , outPitch, bodyrates);
// PREPARE AND RETURN THE VARIABLE "response"
response.controlOutput.roll = bodyrates[0];
response.controlOutput.pitch = bodyrates[1];
response.controlOutput.roll = -bodyrates[0];
response.controlOutput.pitch = -bodyrates[1];
response.controlOutput.yaw = outYaw;
response.controlOutput.motorCmd1 = computeMotorPolyBackward(thrustSum/4 + gravity_force_copterloadsystem);
response.controlOutput.motorCmd2 = computeMotorPolyBackward(thrustSum/4 + gravity_force_copterloadsystem);
......@@ -673,6 +679,22 @@ void centralized_control_command( Controller::Request &request, Controller::Resp
// response.controlOutput.onboardControllerType = ANGLE_MODE;
}
/*void write_vector_to_csv(std::ofstream filehandle, int len, std::vector<float> x)
{
for(int i=0 ; i < len ; i++)
{
if (i < len-1)
{
filehandle<< x(i) << ",";
}
else
{
filehandle<< x(i) ;
}
}
filehandle<< "\n" ;
return;
}*/
void desired_eulerrates_to_bodyrates( Controller::Request &request , float roll_rate , float pitch_rate, float (&bodyrates)[2])
{
......@@ -866,7 +888,7 @@ void get_y_from_CFData( Controller::Request &request )
// compute y w.r.t. equilibrium position, passed to controller
y_to_controller = y_meas - y_eq;
// Debugging
// DEBUGGING
if (outer_loop_counter % 1 == 0)
{
ROS_INFO_STREAM("--------------------------" );
......@@ -968,19 +990,21 @@ void get_y_from_CFData_withLoad( Controller::Request &request )
y_eq(23,0) = load_setpoint[3]; // equilibrium yaw load
// compute y w.r.t. equilibrium position, passed to controller
y_to_controller = y_meas - y_eq;
/*
// Debugging
// write y_tot_controller to bag
for(int i=0 ; i<24 ; i++)
// DEBUGGING
// write estimates to csv
for(int i=0 ; i < 24 ; i++)
{
std_msgs::float32 y_i;
y_i.data = y_to_controller(i) ;
bag_measurement.write( y_i );
if(i<23)
if (i < 23)
{
output_file<< y_to_controller(i) << ",";
}
else
{
bag_measurement.write(",");
output_file<< y_to_controller(i) ;
}
bag_measurement.write("\n");*/
}
output_file<< "\n" ;
if (outer_loop_counter % 2 == 0)
......@@ -1873,30 +1897,27 @@ int main(int argc, char* argv[]) {
ROS_INFO("[STUDENT CONTROLLER] Service ready :-)");
// Open a ROS "bag" to store data for post-analysis
// Filehandles for debugging
std::string package_path;
package_path = ros::package::getPath("d_fall_pps") + "/";
ROS_INFO_STREAM(package_path);
std::string record_file = package_path + "debugging.bag";
bag.open(record_file, rosbag::bagmode::Write);
std::string file_loc = package_path+"Estimator.csv";
estimator_file.open(file_loc);
/* std::string record_file = package_path + "estimator.bag";
bag_estimator.open(record_file, rosbag::bagmode::Write);
std::string record_file = package_path + "measurements.bag";
bag_measurement.open(record_file, rosbag::bagmode::Write);
std::string record_file = package_path + "inputs.bag";
bag_input.open(record_file, rosbag::bagmode::Write);*/
file_loc = package_path+"Input.csv";
input_file.open(file_loc);
file_loc = package_path+"Output.csv";
output_file.open(file_loc);
// Enter an endless while loop to keep the node alive.
ros::spin();
// Close the ROS "bag" that was opened to store data for post-analysis
/* bag_estimator.close();
bag_measurement.close();
bag_input.close();*/
bag.close();
estimator_file.close();
input_file.close();
output_file.close();
// Return zero if the "ross::spin" is cancelled.
return 0;
}
\ No newline at end of file
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