3 Replies Latest reply on Dec 11, 2017 11:49 AM by RandyK

    USing PX4FLOW on Aero RTF

    weiqi_liu

      Hi,

       

      Is there someone using PX4FLOW sensor on Aero RTF drone?

      I installed PX4FLOW on aero foll0wing this:Intel Aero Drone - Altitude and Position Hold Using PX4Flow: 11 Steps (with Pictures) and everything is OK other than the frequency of the output. The output rate is only 0.5 HZ(I know it from QGroundControl). How can I modify the output rate?

      Thanks!

        • 1. Re: USing PX4FLOW on Aero RTF
          RandyK

               > output rate is only 0.5 HZ

           

          Are you using qgroundcontrol to view this? And are you connecting via a telemetry radio?

          If yes, then I saw a similar problem. You might try connecting qgroundcontrol via wifi (udp or tcp) and see if you get different results. (expect around 10hz)

           

          I was able to get better radio telemetry performance by changing how mavlink gets initialized on the flight controller (rebuilt firmware and re-flashed)

          Details:

          In this file:

             ./Firmware/ROMFS/px4fmu_common/init.d/rcS

          change this line:

          set MAVLINK_F "-r 1200 -d /dev/ttyS3"

          To this:

          set MAVLINK_F "-d /dev/ttyS3 -b 57600 -r 2880 -m onboard"

           

          Alternatively, you could update the stream rate directly in the code for the desired mode....

          See file: /Firmware/src/modules/mavlink/mavlink_main.cpp

          and look for:

          configure_stream("DISTANCE_SENSOR", 0.5f);

          configure_stream("OPTICAL_FLOW_RAD", 1.0f);

           

          Hope that helps.

          - Randy

          • 2. Re: USing PX4FLOW on Aero RTF
            weiqi_liu

            Hi RandyK,

            Thanks a lot for your reply!

            but I can not find the file: /Firmware on my drone. In addition, I flash my FC referring to this::Intel Aero Drone - Altitude and Position Hold Using PX4Flow: 11 Steps (with Pictures), and then all the output rate(see from qgroundcontrol) has been limited including HIGH IMU , ALTITUDE and so on. Do you know why?

             

            Thanks again.

            -Liu

            • 3. Re: USing PX4FLOW on Aero RTF
              RandyK

                  >I can not find the file: /Firmware on my drone

               

              Sorry I was not clear. I downloaded the source code and re-built the flight controller firmware on a desktop linux system (Ubuntu).

               

              Here's How I got the source, how I build it, and how I update or re-flash the drone...

               

              Get the source...

              cd ~

              mkdir px4

              cd px4

              git clone https://github.com/PX4/Firmware.git

               

               

              Here's how I build it...

              cd ~/px4/Firmware

               

              make nuttx_aerofc-v1_default

               

              The previous step creates the following file:

              ~/px4/Firmware/build/nuttx_aerofc-v1_default/aerofc-v1_default.px4

               

              Then I copy that to the drone (via wifi), I shell into the drone and update the firmware. For me, that looks like this:

              copy it...

              scp ~/px4/Firmware/build/nuttx_aerofc-v1_default/aerofc-v1_default.px4     root@YOUR_DRONE_IP:/etc/px4-fw/aerofc-v1_default.px4

               

              shell into the drone...

              ssh root@YOUR_DRONE_IP

              cd /etc/px4-fw

               

              aerofc-update.sh aerofc-v1_default.px4

               

              The update procedure is flaky, so you might have to try that last step a few times if it appears to be stuck in a loop for more than a minute.

               

              I'm not an expert. I'm still trying to get my head around this stuff, but that's what works for me.

               

                   >output rate(see from qgroundcontrol) has been limited

               

              Might be related to the band width of your connection in qgroundcontrol.

               

              - Randy