commit ea068cf1895f60473f109326def6bff27dd7e4e3
Author: sschulz <sschulz@techfak.uni-bielefeld.de>
Date:   Mon Feb 22 11:04:00 2016 +0100

    cleaning up and naming convention

diff --git a/src/server/controller.cpp b/src/server/controller.cpp
index 3cb1e23..0638078 100644
--- a/src/server/controller.cpp
+++ b/src/server/controller.cpp
@@ -40,8 +40,9 @@
 using humotion::server::Controller;
 
 //! constructor
-Controller::Controller(JointInterface *j) : activated(false) {
-    joint_interface = j;
+Controller::Controller(JointInterface *j) {
+    activated_ = false;
+    joint_interface_ = j;
 }
 
 //! destructor
@@ -54,30 +55,30 @@ void Controller::init_motion_generators() {
     //       (i.e. the neck generator must be added after the eye generator!)
 
     // eye motion generation:
-    add_motion_generator(new EyeMotionGenerator(joint_interface));
+    add_motion_generator(new EyeMotionGenerator(joint_interface_));
 
     // eyelid motion generator
-    add_motion_generator(new EyelidMotionGenerator(joint_interface));
+    add_motion_generator(new EyelidMotionGenerator(joint_interface_));
 
     // neck motion generator
-    add_motion_generator(new NeckMotionGenerator(joint_interface));
+    add_motion_generator(new NeckMotionGenerator(joint_interface_));
 
     // mouth motion generator
-    add_motion_generator(new MouthMotionGenerator(joint_interface));
+    add_motion_generator(new MouthMotionGenerator(joint_interface_));
 
     // eyebrow motion generator
-    add_motion_generator(new EyebrowMotionGenerator(joint_interface));
+    add_motion_generator(new EyebrowMotionGenerator(joint_interface_));
 }
 
 //! add a single motion genrator
 void Controller::add_motion_generator(MotionGenerator *m) {
-    motion_generator_vector.push_back(m);
+    motion_generator_vector_.push_back(m);
 }
 
 //! calculate target angles for all motion generators:
 void Controller::calculate_targets() {
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->calculate_targets();
     }
 }
@@ -86,7 +87,7 @@ void Controller::calculate_targets() {
 //! NOTE: this is done in an extra loop to have a low delay between consequent sets:
 void Controller::publish_targets() {
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->publish_targets();
     }
 }
@@ -102,7 +103,7 @@ humotion::GazeState Controller::relative_gaze_to_absolute_gaze(humotion::GazeSta
 
     // check if this timestamp allows a valid conversion:
     Timestamp history_begin =
-            joint_interface->get_ts_position(JointInterface::ID_NECK_PAN).get_first_timestamp();
+            joint_interface_->get_ts_position(JointInterface::ID_NECK_PAN).get_first_timestamp();
     // Timestamp history_end   =
     //       joint_interface->get_ts_position(JointInterface::ID_NECK_PAN).get_last_timestamp();
 
@@ -115,40 +116,40 @@ humotion::GazeState Controller::relative_gaze_to_absolute_gaze(humotion::GazeSta
         // to do any guesswork and try to calculate a valid absolute target
         // therefore we will use the last known targets (see below)
         // in case we did not see this timestamp before, show a warning:
-        if (last_known_absolute_timestamp != relative_target_timestamp) {
+        if (last_known_absolute_timestamp_ != relative_target_timestamp) {
             printf("> WARNING: restored/guessed absolute target for unknown timestamp %f "
                    "[this should not happen]\n", relative_target_timestamp.to_seconds());
-            last_known_absolute_target_pan = 0.0;
-            last_known_absolute_target_tilt = 0.0;
-            last_known_absolute_target_roll = 0.0;
+            last_known_absolute_target_pan_ = 0.0;
+            last_known_absolute_target_tilt_ = 0.0;
+            last_known_absolute_target_roll_ = 0.0;
         }
     } else {
         // all fine, we can reconstruct the absolute target
         // fetch head / camera pose during that timestamp
-        double neck_pan  = joint_interface->get_ts_position(
+        double neck_pan  = joint_interface_->get_ts_position(
                 JointInterface::ID_NECK_PAN).get_interpolated_value(relative_target_timestamp);
-        double eye_l_pan = joint_interface->get_ts_position(
+        double eye_l_pan = joint_interface_->get_ts_position(
                 JointInterface::ID_EYES_LEFT_LR).get_interpolated_value(relative_target_timestamp);
-        double eye_r_pan = joint_interface->get_ts_position(
+        double eye_r_pan = joint_interface_->get_ts_position(
                 JointInterface::ID_EYES_RIGHT_LR).get_interpolated_value(relative_target_timestamp);
-        last_known_absolute_target_pan       = neck_pan + (eye_l_pan + eye_r_pan)/2.0;
+        last_known_absolute_target_pan_       = neck_pan + (eye_l_pan + eye_r_pan)/2.0;
         //
-        double neck_tilt = joint_interface->get_ts_position(
+        double neck_tilt = joint_interface_->get_ts_position(
                 JointInterface::ID_NECK_TILT).get_interpolated_value(relative_target_timestamp);
-        double eye_tilt  = joint_interface->get_ts_position(
+        double eye_tilt  = joint_interface_->get_ts_position(
                 JointInterface::ID_EYES_BOTH_UD).get_interpolated_value(relative_target_timestamp);
-        last_known_absolute_target_tilt      = neck_tilt + eye_tilt;
+        last_known_absolute_target_tilt_      = neck_tilt + eye_tilt;
         //
-        last_known_absolute_target_roll      = joint_interface->get_ts_position(
+        last_known_absolute_target_roll_      = joint_interface_->get_ts_position(
                 JointInterface::ID_NECK_ROLL).get_interpolated_value(relative_target_timestamp);
 
         // safe this timestamp as known:
-        last_known_absolute_timestamp = relative_target_timestamp;
+        last_known_absolute_timestamp_ = relative_target_timestamp;
     }
 
-    pan  = last_known_absolute_target_pan;
-    tilt = last_known_absolute_target_tilt;
-    roll = last_known_absolute_target_roll;
+    pan  = last_known_absolute_target_pan_;
+    tilt = last_known_absolute_target_tilt_;
+    roll = last_known_absolute_target_roll_;
 
     // substract offsets
     pan  -= relative.pan_offset;
@@ -176,13 +177,13 @@ humotion::GazeState Controller::relative_gaze_to_absolute_gaze(humotion::GazeSta
 
 //! activate controller
 void Controller::set_activated(void) {
-    activated = true;
+    activated_ = true;
 }
 
 //! update gaze target:
 //! \param GazeState with target values for the overall gaze
 void Controller::set_gaze_target(humotion::GazeState new_gaze_target) {
-    if (!activated) {
+    if (!activated_) {
         // not yet initialized, ignore incoming targets
         return;
     }
@@ -200,7 +201,7 @@ void Controller::set_gaze_target(humotion::GazeState new_gaze_target) {
     }
 
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->set_gaze_target(target_gaze);
     }
 }
@@ -208,13 +209,13 @@ void Controller::set_gaze_target(humotion::GazeState new_gaze_target) {
 //! update mouth state:
 //! \param MouthState with target values for the mouth joints
 void Controller::set_mouth_target(MouthState s) {
-    if (!activated) {
+    if (!activated_) {
         // not yet initialized, ignore incoming targets
         return;
     }
 
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->set_mouth_target(s);
     }
 }
