8 Replies Latest reply on Jul 30, 2018 5:08 AM by mariepauline

    No connection with FCU and no heartbeat

    mariepauline

      '

      We have 4 Intel Aero RTF, two that gets a heartbeat and two that doesn't.

       

      When we listen to the rostopic diagnostic (rostopic echo diagnostic) on the drones that doesn't work we get this output:

       

      ---
      header:
        seq: 105
        stamp:
          secs: 1531295755
          nsecs: 621677207
        frame_id:
      ''
      status:
        -
          level: 1
          name:
      "mavros: FCU connection"
          message:
      "not connected"
          hardware_id:
      "tcp://127.0.0.1:5760?ids=1,1"
          values:
            -
              key:
      "Received packets:"
              value:
      "3522"
            -
              key:
      "Dropped packets:"
              value:
      "0"
            -
              key:
      "Buffer overruns:"
              value:
      "0"
            -
              key:
      "Parse errors:"
              value:
      "0"
            -
              key:
      "Rx sequence number:"
              value:
      "169"
            -
              key:
      "Tx sequence number:"
              value:
      "67"
            -
              key:
      "Rx total bytes:"
              value:
      "2927276"
            -
              key:
      "Tx total bytes:"
              value:
      "76037"
            -
              key:
      "Rx speed:"
              value:
      "35639.000000"
            -
              key:
      "Tx speed:"
              value:
      "890.000000"
        -
          level: 0
          name:
      "mavros: GPS"
          message:
      "3D fix"
          hardware_id:
      "tcp://127.0.0.1:5760?ids=1,1"
          values:
            -
              key:
      "Satellites visible"
              value:
      "13"
            -
              key:
      "Fix type"
              value:
      "3"
            -
              key:
      "EPH (m)"
              value:
      "0.75"
            -
              key:
      "EPV (m)"
              value:
      "1.28"
        -
          level: 2
          name:
      "mavros: Heartbeat"
          message:
      "No events recorded."
          hardware_id:
      "tcp://127.0.0.1:5760?ids=1,1"
          values:
            -
              key:
      "Heartbeats since startup"
              value:
      "0"
            -
              key:
      "Frequency (Hz)"
              value:
      "0.000000"
            -
              key:
      "Vehicle type"
              value:
      "Generic micro air vehicle"
            -
              key:
      "Autopilot type"
              value:
      "Generic autopilot"
            -
              key:
      "Mode"
              value:
      ''
            -
              key:
      "System status"
              value:
      "Uninit"
        -
          level: 0
          name:
      "mavros: System"
          message:
      "Normal"
          hardware_id:
      "tcp://127.0.0.1:5760?ids=1,1"
          values:
            -
              key:
      "Sensor present"
              value:
      "0x00000000"
            -
              key:
      "Sensor enabled"
              value:
      "0x00000000"
            -
              key:
      "Sensor helth"
              value:
      "0x00000000"
            -
              key:
      "CPU Load (%)"
              value:
      "50.1"
            -
              key:
      "Drop rate (%)"
              value:
      "0.0"
            -
              key:
      "Errors comm"
              value:
      "0"
            -
              key:
      "Errors count #1"
              value:
      "0"
            -
              key:
      "Errors count #2"
              value:
      "0"
            -
              key:
      "Errors count #3"
              value:
      "0"
            -
              key:
      "Errors count #4"
              value:
      "0"
        -
          level: 0
          name:
      "mavros: Battery"
          message:
      "Normal"
          hardware_id:
      "tcp://127.0.0.1:5760?ids=1,1"
          values:
            -
              key:
      "Voltage"
              value:
      "15.74"
            -
              key:
      "Current"
              value:
      "0.0"
            -
              key:
      "Remaining"
              value:
      "46.0"
        -
          level: 0
          name:
      "mavros: Time Sync"
          message:
      "Normal"
          hardware_id:
      "tcp://127.0.0.1:5760?ids=1,1"
          values:
            -
              key:
      "Timesyncs since startup"
              value:
      "1305"
            -
              key:
      "Frequency (Hz)"
              value:
      "9.857341"
            -
              key:
      "Last RTT (ms)"
              value:
      "4.329968"
            -
              key:
      "Mean RTT (ms)"
              value:
      "28.052193"
            -
              key:
      "Last remote time (s)"
              value:
      "5666.671825000"
            -
              key:
      "Estimated time offset (s)"
              value:
      "1531290088.823733330"

       

       

       

      On the drones that run our software we have no problems and we get both a heartbeat and FCU connection.

       

       

      Another difference between the drones in that aero-get-version.py returns AeroFC version as 1.6.5 on the drones that work and "unknown" on the drones that doesn't get a heartbeat. We have tried to flash PX4 Firmware version 1.6.5 onto the drones that doesn't work but we still doesn't get a heartbeat. We have tried many versions of flashing it (directly on drone, from a remote pc etc.), and also tried version 1.8.0. Neither works.

       

      We try to fly in mission-mode through ROS and this works on the drones with heartbeat. On the drones without ROS runs but the flight controller doesn't receive our mission. The error we get is: WP Timed out.

       

        • 1. Re: No connection with FCU and no heartbeat
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello mariepauline, 

          Thank you for contacting Intel Customer Support. 
          Could you please clarify which Operating System you are using on the Drones that work and on the Drones that do not work.
          Can you also send me the output of aero-get-version.py for the drones?
          Do you have a specific software running on your Drones or what do you mean by "
          On the drones that run our software"?


          Looking forward to your response.

          Best regards, 
          Casandra 

          • 2. Re: No connection with FCU and no heartbeat
            mariepauline

            Hello Casandra,

            We got Ubuntu 16.04 running on all 4 drones, both the ones that works and the ones that doesn't.

            What I mean by "our software" is a code we have written, based on ROS that uses auto.mission-mode to fly to waypoints.

             

            This is the output of aero-get-version.py on the drones that doesn't work:

            BIOS_VERSION = Aero-01.00.16
            OS_VERSION = Ubuntu 16.04.4 LTS"
            AIRMAP_VERSION = unknown
            FPGA_VERSION = 0xc2
            AeroFC firmware version = unknown

             

             

             

            This is the output of aero-get-version.py on the drones that works:

            BIOS_VERSION = Aero-01.00.16
            OS_VERSION = Ubuntu 16.04.4 LTS"
            AIRMAP_VERSION = unknown
            FPGA_VERSION = 0xc2
            AeroFC firmware version = 1.6.5

            • 3. Re: No connection with FCU and no heartbeat
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hello Mariepauline, 


              Thank you very much for the details. 
              I would like to suggest, for the drones that do not work, that you follow the guide for  flashing the flight controller available here: https://github.com/intel-aero/meta-intel-aero/wiki/90-(References)-OS-user-Installation#flight-controller

              Please let me know if this work. 

              Best regards, 
              Casandra 

              • 4. Re: No connection with FCU and no heartbeat
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hello Mariepauline, 

                Were the steps provided useful in resolving the issue? 
                Do you require any further assistance?

                Thank you in advance, 
                Casandra 
                Intel Customer Support  
                 

                • 5. Re: No connection with FCU and no heartbeat
                  mariepauline

                  We have done this several times. Both with the px4-version can is downloaded automatically with Intel Aero repository and with other versions of px4.

                   

                  We have done some further investigation, and it looks like it is just mavros that can't get connection with the flight controller. We can arm with mavpy, but mavros doesn't get to arm the drone or anything.

                  • 6. Re: No connection with FCU and no heartbeat
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hello Mariepauline, 

                    I would like to suggest to take a look at this sample as it might be helpful for you: https://github.com/intel-aero/sample-apps/blob/master/ros/src/aero_offboard_ctrl/src/aero_offboard_ctrl_node.cpp

                    Also, offboard(manual mode) is supposed to work without GPS lock. 
                    Can you send me the script you are using to arm the motors, if you're using our sample scripts from https://github.com/intel-aero/meta-intel-aero/wiki/04-Autonomous-drone-programming-in-Python those are written to only arm the motors for 5 seconds.

                    You can also take a look at this thread: https://communities.intel.com/thread/115384
                    They seem to have an issue similar to yours. 

                    Let me know if this is helpful. 

                    Best regards,
                    Casandra 

                    • 7. Re: No connection with FCU and no heartbeat
                      mariepauline

                      We run this script:

                       

                      /**

                       

                      * @file offb_node.cpp

                      * @brief Offboard control example node, written with MAVROS version 0.19.x, PX4 Pro Flight

                      * Stack and tested in Gazebo SITL

                      */


                      #include <ros/ros.h>

                      #include <geometry_msgs/PoseStamped.h>

                      #include <mavros_msgs/CommandBool.h>

                      #include <mavros_msgs/SetMode.h>

                      #include <mavros_msgs/State.h>


                      mavros_msgs::State current_state;

                      void state_cb(const mavros_msgs::State::ConstPtr& msg){

                          current_state = *msg;

                      }


                      int main(int argc, char **argv)

                      {

                          ros::init(argc, argv, "offb_node");

                          ros::NodeHandle nh;


                          ros::Subscriber state_sub = nh.subscribe<mavros_msgs::State>

                                  ("mavros/state", 10, state_cb);

                          ros::Publisher local_pos_pub = nh.advertise<geometry_msgs::PoseStamped>

                                  ("mavros/setpoint_position/local", 10);

                          ros::ServiceClient arming_client = nh.serviceClient<mavros_msgs::CommandBool>

                                  ("mavros/cmd/arming");

                          ros::ServiceClient set_mode_client = nh.serviceClient<mavros_msgs::SetMode>

                                  ("mavros/set_mode");


                          //the setpoint publishing rate MUST be faster than 2Hz

                          ros::Rate rate(20.0);


                          // wait for FCU connection

                          while(ros::ok() && !current_state.connected){

                              ros::spinOnce();

                              rate.sleep();

                          }


                          geometry_msgs::PoseStamped pose;

                          pose.pose.position.x = 0;

                          pose.pose.position.y = 0;

                          pose.pose.position.z = 0.5;


                          //send a few setpoints before starting

                          for(int i = 100; ros::ok() && i > 0; --i){

                              local_pos_pub.publish(pose);

                              ros::spinOnce();

                              rate.sleep();

                          }


                          mavros_msgs::SetMode offb_set_mode;

                          offb_set_mode.request.custom_mode = "OFFBOARD";


                          mavros_msgs::CommandBool arm_cmd;

                          arm_cmd.request.value = true;


                          ros::Time last_request = ros::Time::now();


                          while(ros::ok()){

                              if( current_state.mode != "OFFBOARD" &&

                                  (ros::Time::now() - last_request > ros::Duration(5.0))){

                                  if( set_mode_client.call(offb_set_mode) &&

                                      offb_set_mode.response.mode_sent){

                                      ROS_INFO("Offboard enabled");

                                  }

                                  last_request = ros::Time::now();

                              } else {

                                  if( !current_state.armed &&

                                      (ros::Time::now() - last_request > ros::Duration(5.0))){

                                      if( arming_client.call(arm_cmd) &&

                                          arm_cmd.response.success){

                                          ROS_INFO("Vehicle armed");

                                      }

                                      last_request = ros::Time::now();

                                  }

                              }


                              local_pos_pub.publish(pose);


                              ros::spinOnce();

                              rate.sleep();

                          }


                          return 0;

                      }

                       

                       

                       

                       

                       

                       

                       

                       

                      But gets this output:

                       

                       

                       

                      [ INFO] [1532935281.381434474]: wait for FCU connection

                      [ INFO] [1532935281.431811653]: wait for FCU connection

                      [ INFO] [1532935281.481426644]: wait for FCU connection

                      [ INFO] [1532935281.531637055]: wait for FCU connection

                      [ INFO] [1532935281.581422624]: wait for FCU connection

                      [ INFO] [1532935281.631830403]: wait for FCU connection

                      [ INFO] [1532935281.681803369]: wait for FCU connection

                      [ INFO] [1532935281.731553600]: wait for FCU connection

                       

                       

                       

                       

                       

                      So our problem is still the FCU connection. As I said earlier we doesnt get a heartbeat from the FCU in the diagnostics.

                       

                      We also have another drone that does work with this code, so it isn't that we use offboard mode in the wrong way, it is only the drone where we don't get a heartbeat on that is the problem.

                      • 8. Re: No connection with FCU and no heartbeat
                        mariepauline

                        We solved the problem.

                         

                         

                        The issue was that when we have connected all the 4 drones to QGroundControl, QGC has given the drones different SystemIDs. This sysid is used in initialization of mavros, and we believe that this is the cause of all our problems. When we give the drone sysid=1 again we get a connection with the FCU.

                        We now work on giving the different drones different IDs so we can use several at once, so if anyone has any tips on this; get in touch!