Project

General

Profile

Revision 3db79f25

ID3db79f259e8820845822e6176be5c3b81a405021

Added by Priya over 11 years ago

Fixed Odometry behavior so that it now works and then added a get readings functionality to sonarcontrol.

View differences:

scout/libscout/src/behaviors/Odometry.h
4 4
#include "../Behavior.h"
5 5

  
6 6

  
7
#define WHEEL_RADIUS  5
7
#define WHEEL_RADIUS  2
8 8
#define WHEEL_CIRCUM  (2*M_PI*WHEEL_RADIUS)
9
#define WHEEL_BASE    2
10
#define ENCODER_COUNT 8800000000
9
#define WHEEL_BASE    5
10
#define ENCODER_COUNT (4*1200*M_PI/5)
11 11
#define DIST_PER_TICK (WHEEL_CIRCUM/ENCODER_COUNT)
12 12

  
13 13
typedef struct{
......
38 38

  
39 39
    float msg_time_in;
40 40

  
41
    float motor_fl_dist;
42
    float motor_fr_dist;
43
    float motor_bl_dist;
44
    float motor_br_dist;
41
    int motor_fl_dist;
42
    int motor_fr_dist;
43
    int motor_bl_dist;
44
    int motor_br_dist;
45 45

  
46
    float motor_fl_ticks;
47
    float motor_fr_ticks;
48
    float motor_bl_ticks;
49
    float motor_br_ticks;
46
    unsigned int motor_fl_ticks;
47
    unsigned int motor_fr_ticks;
48
    unsigned int motor_bl_ticks;
49
    unsigned int motor_br_ticks;
50 50
    float scout_theta;
51 51

  
52 52
    pos* scout_pos;

Also available in: Unified diff