Project

General

Profile

Revision c63c9752

IDc63c97520e4ba4810364a2b18151db6f250300b8

Added by Alex Zirbel over 11 years ago

Scoutsim now has consistent units of m and m/s.

This will cause some problems.

  • Behaviors which relied on the old units will have to change. We need to change the Control classes to scale things right.
  • Encoder ticks are almost fixed, but not quite right (I think because of a rounding problem).
  • Speeds are now all in m/s, which is much different than before - we'll have to change the Control class somehow.

I'm afraid I'm out of time to make the rest of these changes now, but I'll do them ASAP.

View differences:

scout/scoutsim/src/scout_constants.h
49 49

  
50 50
namespace scoutsim
51 51
{
52
    // Pixels in scoutsim per real-world meter.
53
    // Note that scout image size has been set based on this.
54
    const float PIX_PER_METER = 200.0;
55

  
52 56
    // Scout dimensions, in meters
53 57
    const float SCOUT_WIDTH = 0.05;
54 58
    const float SCOUT_LENGTH = 0.2;
......
57 61
    const float SCOUT_SONAR_X = -0.01;
58 62
    const float SCOUT_SONAR_Y = 0.0;
59 63

  
64
    // @todo Inaccurate. Update
65
    const float ENCODER_TICKS_PER_METER = 363.78;
66

  
60 67
    const unsigned int SONAR_MAX_RANGE = 255;
68

  
61 69
    // Time it takes for the sonar to spin from position 0 to position 23
62 70
    const float SONAR_HALF_SPIN_TIME = 0.5;
71

  
72
    const float SCOUTSIM_REFRESH_RATE = 0.01;   // s
63 73
}

Also available in: Unified diff