-
Notifications
You must be signed in to change notification settings - Fork 20
RoverConfiguration
jgoppert edited this page Sep 14, 2011
·
8 revisions
#Rover Configuration In order to configure your vehicle your have to make the appropriate changes in the config (.h files). Best practice is to take the CarStampede.h as an example and create your own config file, e.g. myRover.h.
In order to use your configuration file you have to include it in the main project file ardupilotone.pde.
The proposed position to include it is indicated with the following code snippet:
...
// Vehicle Configuration
#include "myRover.h"
/*
* Required Global Declarations
*/
...
/*
* myRover.h
*
* Created on: Sep 4, 2011
* Author: niklas.goddemeier based on jgoppert
*/
#ifndef CNIROVER_H_
#define CNIROVER_H_
// vehicle options
static const apo::vehicle_t vehicle = apo::VEHICLE_CAR;
static const apo::halMode_t halMode = apo::MODE_LIVE;
static const apo::board_t board = apo::BOARD_ARDUPILOTMEGA_2560; /* <- set to your board */
static const uint8_t heartBeatTimeout = 3;
// algorithm selection
#define CONTROLLER_CLASS ControllerCar
#define GUIDE_CLASS MavlinkGuide
#define NAVIGATOR_CLASS DcmNavigator
#define COMMLINK_CLASS MavlinkComm
// hardware selection
#define ADC_CLASS AP_ADC_ADS7844
#define COMPASS_CLASS AP_Compass_HMC5843 /* <- set to match our compass model, new oen is: AP_Compass_HMC5883L */
#define BARO_CLASS APM_BMP085_Class
#define RANGE_FINDER_CLASS AP_RangeFinder_MaxsonarLV
#define DEBUG_BAUD 57600
#define TELEM_BAUD 57600
#define GPS_BAUD 38400
#define HIL_BAUD 57600
// optional sensors /* this is important: select your attached sensors */
static bool gpsEnabled = true;
static bool baroEnabled = true;
static bool compassEnabled = true;
static bool rangeFinderFrontEnabled = false;
static bool rangeFinderBackEnabled = false;
static bool rangeFinderLeftEnabled = false;
static bool rangeFinderRightEnabled = false;
static bool rangeFinderUpEnabled = false;
static bool rangeFinderDownEnabled = false;
// loop rates
static const float loop0Rate = 150;
static const float loop1Rate = 100;
static const float loop2Rate = 10;
static const float loop3Rate = 1;
static const float loop4Rate = 0.1;
// gains /* ATTENTION: this values define the controller parameters */
/* for steering and throttle. You may need to play with these a little. */
static const float steeringP = 1.0;
static const float steeringI = 0.0;
static const float steeringD = 0.0;
static const float steeringIMax = 0.0;
static const float steeringYMax = 3.0;
static const float throttleP = 0.3;
static const float throttleI = 0.0;
static const float throttleD = 0.0;
static const float throttleIMax = 0.0;
static const float throttleYMax = 0.3;
static const float throttleDFCut = 3.0;
#include "ControllerCar.h"
#endif /* CNIROVER_H_ */