Project

General

Profile

Revision 2237e1f0

ID2237e1f0a505e07f01a4d3d3bfa818fba34e9386

Added by Thomas Mullins about 11 years ago

Changed motor max speed and added constants in set_motors.msg

The new speed range is -100 to 100, to be consistent with the pwm
driver. They can be accessed with motors::set_motors::MIN_SPEED and
motors::set_motors::MAX_SPEED respectively.

View differences:

scout/scoutsim/src/scout_constants.h
48 48
#ifndef _SCOUTSIM_SCOUT_CONSTANTS_
49 49
#define _SCOUTSIM_SCOUT_CONSTANTS_
50 50

  
51
#include <motors/set_motors.h>
52

  
51 53
/// TODO put these in a utility file somewhere?
52 54
#define min(x,y) ((x < y) ? x : y)
53 55
#define max(x,y) ((x > y) ? x : y)
......
55 57
namespace scoutsim
56 58
{
57 59
    // Maximum speed which will be sent to scoutsim in absolute units
58
    const int MAX_ABSOLUTE_SPEED = 127;
59
    const int MIN_ABSOLUTE_SPEED = -128;
60
    const int MAX_ABSOLUTE_SPEED = motors::set_motors::MAX_SPEED;
61
    const int MIN_ABSOLUTE_SPEED = motors::set_motors::MIN_SPEED;
60 62

  
61 63
    // Speed in m/s corresponding to maximum absolute speed
62 64
    const float MAX_SPEED_MPS = 1.0;

Also available in: Unified diff