Couldn't control the fixedwing by publishing /command

Hey,

Thanks for this great resource! My company wants to try rosflight/rosplane and switch from Ardupilot to obtain more control over the flight. I’m starting off by trying to control the fixedwing in gazebo. As mentioned in the docs, I tried to maneuver the plane by publishing to /fixedwing/command (subscribed by rosflight_io). However, the plane doesn’t move at all. I think I’m missing something simple. I could control it with rc_keyboard though. Essentially:

My system:
Ubuntu 20.04, ROS Noetic

I tried this:

$ roslaunch rosflight_sim fixedwing.launch
$ rosrun rosflight rosflight_io _udp:=true __ns:=fixedwing
$ rosrun rosflight_joy rc_keyboard __ns:=fixedwing

I loaded these parameters to rosflight_io:

- {name: ACC_LPF_ALPHA, type: 9, value: 0.5}
- {name: ACC_X_BIAS, type: 9, value: -0.1645687520503998}
- {name: ACC_X_TEMP_COMP, type: 9, value: 0}
- {name: ACC_Y_BIAS, type: 9, value: -0.05699463188648224}
- {name: ACC_Y_TEMP_COMP, type: 9, value: 0}
- {name: ACC_Z_BIAS, type: 9, value: 0.2929900586605072}
- {name: ACC_Z_TEMP_COMP, type: 9, value: 0}
- {name: AIL_REV, type: 6, value: 0}
- {name: ARM_CHANNEL, type: 6, value: 5}
- {name: ARM_SPIN_MOTORS, type: 6, value: 0}
- {name: ARM_THRESHOLD, type: 9, value: 0.1500000059604645}
- {name: BARO_BIAS, type: 9, value: -1.642162680625916}
- {name: BATT_CURR_ALPHA, type: 9, value: 0.9950000047683716}
- {name: BATT_CURR_MULT, type: 9, value: 0}
- {name: BATT_VOLT_ALPHA, type: 9, value: 0.9950000047683716}
- {name: BATT_VOLT_MULT, type: 9, value: 0}
- {name: BAUD_RATE, type: 6, value: 921600}
- {name: CAL_GYRO_ARM, type: 6, value: 0}
- {name: DIFF_PRESS_BIAS, type: 9, value: 0.08283837884664536}
- {name: ELEVATOR_REV, type: 6, value: 0}
- {name: FAILSAFE_THR, type: 9, value: 0.300000011920929}
- {name: FC_PITCH, type: 9, value: 0}
- {name: FC_ROLL, type: 9, value: 0}
- {name: FC_YAW, type: 9, value: 0}
- {name: FILTER_ACCMARGIN, type: 9, value: 0.1000000014901161}
- {name: FILTER_INIT_T, type: 6, value: 3000}
- {name: FILTER_KI, type: 9, value: 0.009999999776482582}
- {name: FILTER_KP_ACC, type: 9, value: 0.5}
- {name: FILTER_KP_EXT, type: 9, value: 1.5}
- {name: FILTER_MAT_EXP, type: 6, value: 1}
- {name: FILTER_QUAD_INT, type: 6, value: 1}
- {name: FILTER_USE_ACC, type: 6, value: 1}
- {name: FIXED_WING, type: 6, value: 1}
- {name: GROUND_LEVEL, type: 9, value: 1387}
- {name: GYROXY_LPF_ALPHA, type: 9, value: 0.300000011920929}
- {name: GYROZ_LPF_ALPHA, type: 9, value: 0.300000011920929}
- {name: GYRO_X_BIAS, type: 9, value: 0.04656616225838661}
- {name: GYRO_Y_BIAS, type: 9, value: 0.007180217653512955}
- {name: GYRO_Z_BIAS, type: 9, value: -0.00280337012372911}
- {name: MAG_A11_COMP, type: 9, value: 1}
- {name: MAG_A12_COMP, type: 9, value: 0}
- {name: MAG_A13_COMP, type: 9, value: 0}
- {name: MAG_A21_COMP, type: 9, value: 0}
- {name: MAG_A22_COMP, type: 9, value: 1}
- {name: MAG_A23_COMP, type: 9, value: 0}
- {name: MAG_A31_COMP, type: 9, value: 0}
- {name: MAG_A32_COMP, type: 9, value: 0}
- {name: MAG_A33_COMP, type: 9, value: 1}
- {name: MAG_X_BIAS, type: 9, value: 0}
- {name: MAG_Y_BIAS, type: 9, value: 0}
- {name: MAG_Z_BIAS, type: 9, value: 0}
- {name: MIN_THROTTLE, type: 6, value: 1}
- {name: MIXER, type: 6, value: 10}
- {name: MOTOR_IDLE_THR, type: 9, value: 0.1000000014901161}
- {name: MOTOR_PWM_UPDATE, type: 6, value: 50}
- {name: OFFBOARD_TIMEOUT, type: 6, value: 100}
- {name: OVRD_LAG_TIME, type: 6, value: 1000}
- {name: PARAM_MAX_CMD, type: 9, value: 1}
- {name: PID_PITCH_ANG_D, type: 9, value: 0.05000000074505806}
- {name: PID_PITCH_ANG_I, type: 9, value: 0}
- {name: PID_PITCH_ANG_P, type: 9, value: 0.1500000059604645}
- {name: PID_PITCH_RATE_D, type: 9, value: 0}
- {name: PID_PITCH_RATE_I, type: 9, value: 0}
- {name: PID_PITCH_RATE_P, type: 9, value: 0.07000000029802322}
- {name: PID_ROLL_ANG_D, type: 9, value: 0.05000000074505806}
- {name: PID_ROLL_ANG_I, type: 9, value: 0}
- {name: PID_ROLL_ANG_P, type: 9, value: 0.1500000059604645}
- {name: PID_ROLL_RATE_D, type: 9, value: 0}
- {name: PID_ROLL_RATE_I, type: 9, value: 0}
- {name: PID_ROLL_RATE_P, type: 9, value: 0.07000000029802322}
- {name: PID_TAU, type: 9, value: 0.05000000074505806}
- {name: PID_YAW_RATE_D, type: 9, value: 0}
- {name: PID_YAW_RATE_I, type: 9, value: 0}
- {name: PID_YAW_RATE_P, type: 9, value: 0.25}
- {name: RC_ATT_CTRL_CHN, type: 6, value: -1}
- {name: RC_ATT_MODE, type: 6, value: 1}
- {name: RC_ATT_OVRD_CHN, type: 6, value: 4}
- {name: RC_F_CHN, type: 6, value: 2}
- {name: RC_MAX_PITCH, type: 9, value: 0.7860000133514404}
- {name: RC_MAX_PITCHRATE, type: 9, value: 3.141590118408203}
- {name: RC_MAX_ROLL, type: 9, value: 0.7860000133514404}
- {name: RC_MAX_ROLLRATE, type: 9, value: 3.141590118408203}
- {name: RC_MAX_YAWRATE, type: 9, value: 1.506999969482422}
- {name: RC_NUM_CHN, type: 6, value: 6}
- {name: RC_OVRD_DEV, type: 9, value: 0.1000000014901161}
- {name: RC_THR_OVRD_CHN, type: 6, value: 4}
- {name: RC_TYPE, type: 6, value: 0}
- {name: RC_X_CHN, type: 6, value: 0}
- {name: RC_Y_CHN, type: 6, value: 1}
- {name: RC_Z_CHN, type: 6, value: 3}
- {name: RUDDER_REV, type: 6, value: 0}
- {name: SERIAL_DEVICE, type: 6, value: 0}
- {name: STRM_AIRSPEED, type: 6, value: 50}
- {name: STRM_ATTITUDE, type: 6, value: 200}
- {name: STRM_BARO, type: 6, value: 50}
- {name: STRM_BATTERY, type: 6, value: 10}
- {name: STRM_GNSS, type: 6, value: 1000}
- {name: STRM_GNSS_FULL, type: 6, value: 10}
- {name: STRM_HRTBT, type: 6, value: 1}
- {name: STRM_IMU, type: 6, value: 250}
- {name: STRM_MAG, type: 6, value: 50}
- {name: STRM_RC, type: 6, value: 50}
- {name: STRM_SERVO, type: 6, value: 50}
- {name: STRM_SONAR, type: 6, value: 40}
- {name: STRM_STATUS, type: 6, value: 10}
- {name: SWITCH_5_DIR, type: 6, value: 1}
- {name: SWITCH_6_DIR, type: 6, value: 1}
- {name: SWITCH_7_DIR, type: 6, value: 1}
- {name: SWITCH_8_DIR, type: 6, value: 1}
- {name: SYS_ID, type: 6, value: 1}
- {name: X_EQ_TORQUE, type: 9, value: 0}
- {name: Y_EQ_TORQUE, type: 9, value: 0}
- {name: Z_EQ_TORQUE, type: 9, value: 0}

This is my topic list:

/clock
/fixedwing/RC
/fixedwing/airspeed
/fixedwing/attitude
/fixedwing/attitude/euler
/fixedwing/aux_command
/fixedwing/baro
/fixedwing/battery
/fixedwing/command
/fixedwing/external_attitude
/fixedwing/gnss
/fixedwing/gnss_full
/fixedwing/imu/data
/fixedwing/imu/temperature
/fixedwing/magnetometer
/fixedwing/navsat_compat/fix
/fixedwing/navsat_compat/time_reference
/fixedwing/navsat_compat/vel
/fixedwing/output_raw
/fixedwing/rc_raw
/fixedwing/rosflight_errors
/fixedwing/sonar
/fixedwing/status
/fixedwing/truth/NED
/fixedwing/truth/NWU
/fixedwing/unsaved_params
/fixedwing/version
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg

I calibrated the imu and barometer by service calls. Then armed the plane using rc_keyboard.
When I run:

$ rostopic pub -r 10 /fixedwing/command rosflight_msgs/Command "header:
  seq: 0
  stamp: {secs: 0, nsecs: 0}
  frame_id: ''
mode: 0
ignore: 0
x: 0.0
y: 0.0
z: 0.0
F: 1.0" 

the plane doesn’t move at all (given it’s at full throttle). What am I missing?

Okay I solved this. It’s a matter of setting Computer Control active in addition to Arming the plane. Assuming the rc_keyboard is launched: Once the plane is armed by pressing M, the throttle is set to full by pressing W. Then sending latching commands to /fixedwing/command works.