 unsigned long encoder_right_pos;
 ros::Time last_encoder_read_time;
 
-double ang_vel_l[10];
-double ang_vel_r[10];
+#define NUM_VEL_SAMPLES 10
+double ang_vel_samples_l[NUM_VEL_SAMPLES];
+double ang_vel_samples_r[NUM_VEL_SAMPLES];
 int velocity_index = 0;
 
 // IMU and Magnetometer

  encoder_right_pos = 0.0;
  motor_left_speed = 0.0;
  motor_right_speed = 0.0;

  // Initialize and connect to ros
  ros_nh.initNode();

geometry_msgs::TransformStamped ros_odom_transform;
tf::TransformBroadcaster ros_odom_broadcaster;

double x;
double y;
double th;

ros::Time current_time;
ros::Time previous_time;

