 int Car::getEncoderBR() {
   return BR_count;
 }
+float Car::getVelEstFL() {
+  return vel_FL;
+}
+float Car::getVelEstFR() {
+  return vel_FR;
+}
+float Car::getVelEstBL() {
+  return vel_BL;
+}
+float Car::getVelEstBR() {
+  return vel_BR;
+}
+
+void Car::calcVelocityEstimate() {
+
+  // vel = distance / time
+  // distance = 2*pi*R/8 since there are 8 partitions
+  if(FL_DeltaTime > 0){
+    vel_FL = 0.25*pi*R/(FL_DeltaTime/1000000.0);
+  }
+  if(FR_DeltaTime > 0){
+    vel_FR = 0.25*pi*R/(FR_DeltaTime/1000000.0);
+  }
+  if(BL_DeltaTime > 0){
+    vel_BL = 0.25*pi*R/(BL_DeltaTime/1000000.0);
+  }
+  if(BR_DeltaTime > 0){
+    vel_BR = 0.25*pi*R/(BR_DeltaTime/1000000.0);
+  }
+}

barc::ECU ecu;
barc::ECU rc_inputs;
barc::Encoder encoder;

ros::NodeHandle nh;

ros::Publisher pub_encoder("encoder", &encoder);
ros::Publisher pub_rc_inputs("rc_inputs", &rc_inputs);
ros::Subscriber<barc::ECU> sub_ecu("ecu_pwm", ecuCallback);


    int getEncoderFR();
    int getEncoderBL();
    int getEncoderBR();
    float getVelEstFL();
    float getVelEstFR();
    float getVelEstBL();
    float getVelEstBR();

    // Interrupt service routines
    void incFR();
    void incFL();
