Revision 2237e1f0
ID | 2237e1f0a505e07f01a4d3d3bfa818fba34e9386 |
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.
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