ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is what I did.

class xyz{ 
  Private:
    int count;
    double init_x, init_y, init_t;
 public: 
    xyz( ros::NodeHandle &nh){
       count = 0;
       define the callback here
    }
   void callback(...){
       if (count == 0){
          store the values of x, y and t in init_x, init_y and init_t
          count ++;
       }else{
          subtract initial values with the current values
      }
 }

}

This is what I did.

class xyz{ 
  Private:
    int count;
    double init_x, init_y, init_t;
 public: 
    xyz( ros::NodeHandle &nh){
       count = 0;
       define the callback here
    }
   void callback(...){
       if (count == 0){
          store the values of x, y and t in init_x, init_y and init_t
          count ++;
       }else{
          subtract initial values with the current values
      }
 }
}}

}

This is what I did.

class xyz{ 
  Private:
    int count;
    double init_x, init_y, init_t;
 public: 
    xyz( ros::NodeHandle &nh){
       count = 0;
       define the callback here
    }
   void callback(...){
       if (count == 0){
          store the values of x, y and t in init_x, init_y and init_t
          count ++;
       }else{
          subtract initial values with the current values
      }
 }}

Update: If you update AR Drone firmware, you can eliminate this problem. There are a few ways to update the firmware. The easiest is thorough the official AR.FreeFlight App by Parrot. The newer versions of this app has an option to update the firmware. Just make sure your phone battery and AR Drone battery is full and click update. First the file will get transferred and after a few drone-turn on-off episodes the green lights will turn on indicating a successful firmware update. Then odometry works properly.