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_WINGparameter (1if a fixed-wing,0if a multirotor) - Set the
RC_TYPEparameter (0if PPM,1if SBUS) - Set the
MIXERparameter to the appropriate value described in the Hardware Setup page - Set the
MOTOR_PWM_UPDATEparameter (typically490for SimonK ESCs,50for 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_CHANNELparameter to the appropriate channel (0-indexed) - If you want to use a switch to enable RC override, set the
RC_ATT_OVRD_CHNandRC_THR_OVRD_CHNparameters 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_PWMandMOTOR_MAX_PWMare correct (usually1000and2000) - Set
MIXERparam to0(ESC calibration mixer) - Set
ARM_SPIN_MOTORSto0 -
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
MIXERparameter back to the appropriate value for your vehicle (see the Hardware Setup page) - Set
ARM_SPIN_MOTORSback to1
- Make sure
-
The
ARM_SPIN_MOTORSparameter should be set to1so the motors spin slowly when armed. The idle throttle setting can be adjusted with theMOTOR_IDLE_THRparameter. - You'll most likely want to set the
CAL_GYRO_ARMparam to1to enable calibrating gyros before arming - Set the
RC_ATT_MODEparameter to set RC control mode (0for rate mode,1for 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_REVparameters (1to reverse,0to keep current direction) - You'll most likely want to set the
ARM_SPIN_MOTORSparameter to0so that the prop doesn't spin at a minimum throttle setting when you arm, especially if you'll be doing hand launching