Configure Snapdragon

This topic explains how to configure the Qualcomm Snapdragon Flight.

Autostart PX4 and Snap VIO

In order to boot both the ROS node and PX4 automatically on bootup, edit the /etc/rc.local file on the Snapdragon Flight to look like this (note that the first line must change too!):

  1. #!/bin/bash -e
  2. #
  3. # rc.local
  4. #
  5. # This script is executed at the end of each multiuser runlevel.
  6. # Make sure that the script will "exit 0" on success or any other
  7. # value on error.
  8. #
  9. # In order to enable or disable this script just change the execution
  10. # bits.
  11. #
  12. # By default this script does nothing.
  13. # Generate the SSH keys if non-existent
  14. test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server
  15. # Prepare the ROS environment
  16. cd /home/linaro
  17. source /opt/ros/indigo/setup.bash
  18. source /home/linaro/ros_ws/devel/setup.bash
  19. # Launch the mavros vislam node but add some delay otherwise startup is not reliable
  20. sleep 5
  21. roslaunch snapdragon_mavros_vislam mavros_vislam.launch > /dev/null &
  22. # Launch PX4 autopilot in VIO configuration but add some delay otherwise startup is not reliable
  23. sleep 5
  24. ./px4 /home/linaro/ros_ws/src/ros-examples/px4_configs/ekf2/mainapp.conf > /dev/null &
  25. exit 0

Put Snapdragon back into Access Point Mode

The Snapdragon Flight was set to station mode in the ROS Setup. This could be a problem if you want to fly it outdoors where your home Wi-Fi is no longer available, so we recommend putting it back into access point mode.

  1. /usr/local/qr-linux/wificonfig.sh -s softap
  2. sudo reboot

Adjust Parameters

Parameter Name Recommended Value
EKF2_HEIGHT_MODE 3 VISION
EKF2_AID_MASK 24 (VISION POS, VISION YAW)
MPC_THR_HOVER 25 %
MC_PITCHRATE_P 0.03
MC_PITCHRATE_D 0.001
MC_ROLLRATE_P 0.03
MC_ROLLRATE_D 0.001
MC_RAWRATE_P 0.08
EKF2_IMU_POS_Z 0.030m
EKF2_EV_POS_Z 0.03m
PWM_MIN 1150us