Getting Started¶
Reading through the pages in this user guide in order should provide you with the information you need to get a vehicle flying with ROSflight. The following is a summary of the steps you'll need to follow to get your vehicle set up, with links to the corresponding documentation pages:
- Set up your hardware (fixed-wing or multirotor platform, flight controller, and companion computer)
- Flash your flight controller with the latest ROSflight firmware
- Set up your RC transmitter
- Set up ROS on your companion computer
- Configure the flight controller for your setup: the configuration checklists below should help guide you through this process
- Run through your preflight checks
- Tune the attitude controller gains (multirotors only)
- Set up autonomous flight via offboard control (optional)
Configuration Checklist¶
The following checklists should help you get a new vehicle set up for the first time. This checklist assumes that your hardware is already set up correctly.
General Setup¶
- Set the
FIXED_WING
parameter (1
if a fixed-wing,0
if a multirotor) - Set the
RC_TYPE
parameter (0
if PPM,1
if SBUS) - Set the
MIXER
parameter to the appropriate value described in the Hardware Setup page - Set the
MOTOR_PWM_UPDATE
parameter (typically490
for SimonK ESCs,50
for standard servos) - Make sure your RC transmitter is set up correctly
- Set up your RC switches
- If you want to arm/disarm using a switch, set the
ARM_CHANNEL
parameter to the appropriate channel (0-indexed) - If you want to use a switch to enable RC override, set the
RC_ATT_OVRD_CHN
andRC_THR_OVRD_CHN
parameters to the appropriate channel(s) (0-indexed). If you want complete control (attitude and throttle) when you flip the switch, set both these parameters to the same channel.
- If you want to arm/disarm using a switch, set the
- Calibrate your IMU: start
rosflight_io
, then runrosservice call /calibrate_imu
- Complete the multirotor-specific or fixed-wing-specific checklist below
- Save the parameters (
rosservice call /param_write
) - You'll probably want to save a backup of your parameters (call
rosservice call /param_save_to_file /path/to/file.yml
) - Make sure you run through the Preflight Checklist before flying
Multirotor-specific Setup¶
Danger
IMPORTANT: Remove all props from the vehicle when calibrating ESCs!!!
-
Calibrate ESCs
- Make sure
MOTOR_MIN_PWM
andMOTOR_MAX_PWM
are correct (usually1000
and2000
) - Set
MIXER
param to0
(ESC calibration mixer) - Set
ARM_SPIN_MOTORS
to0
-
Perform ESC calibration. For standard ESCs:
- With power disconnected from the motors, arm the flight controller
- Set throttle to maximum
- Connect power to the motors
- Drop the throttle to minimum
-
Set the
MIXER
parameter back to the appropriate value for your vehicle (see the Hardware Setup page) - Set
ARM_SPIN_MOTORS
back to1
- Make sure
-
The
ARM_SPIN_MOTORS
parameter should be set to1
so the motors spin slowly when armed. The idle throttle setting can be adjusted with theMOTOR_IDLE_THR
parameter. - You'll most likely want to set the
CAL_GYRO_ARM
param to1
to enable calibrating gyros before arming - Set the
RC_ATT_MODE
parameter to set RC control mode (0
for rate mode,1
for angle mode [default]) - Set torque offsets as described in the RC trim calculation section of the Improving Performance page
- Tune the controller gains as described in the Multirotor gain tuning section of the Improving Performance page
Fixed-Wing-Specific Setup¶
- Reverse servo directions if necessary using the
AIL_REV
,ELEVATOR_REV
, andRUDDER_REV
parameters (1
to reverse,0
to keep current direction) - You'll most likely want to set the
ARM_SPIN_MOTORS
parameter to0
so that the prop doesn't spin at a minimum throttle setting when you arm, especially if you'll be doing hand launching