Skip to content

Commit 1017637

Browse files
Merge pull request #32 from florent-lamiraux/devel
[RCSotController] Save log in destructor
2 parents 80ea973 + 32eaedb commit 1017637

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/roscontrol-sot-controller.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ RCSotController::RCSotController()
7878
}
7979

8080
RCSotController::~RCSotController() {
81+
std::string afilename("/tmp/sot.log");
82+
83+
RcSotLog_.record(DataOneIter_);
84+
RcSotLog_.save(afilename);
85+
8186
SotLoaderBasic::CleanUp();
8287
using namespace ::dynamicgraph;
8388
RealTimeLogger::destroy();
@@ -1125,11 +1130,6 @@ void RCSotController::starting(const ros::Time &) {
11251130
}
11261131

11271132
void RCSotController::stopping(const ros::Time &) {
1128-
std::string afilename("/tmp/sot.log");
1129-
1130-
RcSotLog_.record(DataOneIter_);
1131-
RcSotLog_.save(afilename);
1132-
11331133
}
11341134

11351135
PLUGINLIB_EXPORT_CLASS(sot_controller::RCSotController, lci::ControllerBase)

0 commit comments

Comments
 (0)