1 2 Previous Next 22 Replies Latest reply on Jun 29, 2017 4:30 PM by philipbinbin

    Intel Aero Drone commands to move motors

    AcomaGaze

      I have set up the Intel Aero drone. However there is no instructions on how to move the drone. I have no control over the motors besides the remote control. What is the code for moving the drone?

       

      I am interested in any commands for take-off and landing, as well as lateral and vertical motion.

        • 1. Re: Intel Aero Drone commands to move motors
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello AcomaGaze,

          Thank you for interest in the Intel® Aero Compute Board.

          The best way to do what you are trying to accomplish is with QGroundControl over WiFi, because it provides full flight control and vehicle setup for PX4 powered vehicles.

          If you go to the Fly View, at the bottom of the view is the Guided Bar, some of the possible options are:
          •    Takeoff
          •    Change altitude
          •    Go to location

          Just make sure you follow all the setup steps, here are the corresponding links:
          •    QGroundControl User Guide
                         https://www.gitbook.com/book/donlakeflyer/qgroundcontrol-user-guide/details
          •    WiFi streaming using QGroundControl
                         https://github.com/intel-aero/meta-intel-aero/wiki/WiFi-Streaming
          •    QGroundControl – Fly View
                         https://donlakeflyer.gitbooks.io/qgroundcontrol-user-guide/content/FlyView/FlyView.html

          I hope you find the previous information useful.

          If you need further assistance, don’t hesitate to contact us.

          Regards,
          Andres V.

          • 2. Re: Intel Aero Drone commands to move motors
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hello AcomaGaze,

            I was wondering if you had the chance to check the information provided.

            If you have any other question, don’t hesitate to contact us.

            Regards,
            Andres V.

            • 3. Re: Intel Aero Drone commands to move motors
              AcomaGaze

              Thank you for your assistance,

               

              I want to install a code for the drone so that it moves based on the parameters of the code rather than manually having to indicate where and when it has to do each action through qgroundcontrol.

               

              I have found this link  where it tells the drone how to lift off and drop off using RobotOS, would these commands work?

              https://github.com/intel-aero/meta-intel-aero/wiki/Meta-ROS

               

                     i.e.:

                     rosservice call /mavros/set_mode 220 AUTO.TAKEOFF  

                     rosservice call /mavros/set_mode 220 AUTO.RTL 

               

              Also if these service calls do work to control the drone, are there other variations of these commands? (i.e. move to a certain GPS coordinate)

               

              Thank you again for your help.

              • 4. Re: Intel Aero Drone commands to move motors
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hello AcomaGaze,

                Thank you for the information provided, now I understand better what you are trying to achieve.

                I checked the link provided, but haven’t personally tried the Robot Operating System approach. I’ll be needing more time to read about it and come up with information that you may find useful.

                I’ll contact you through this thread as soon as I have relevant information.

                Thank you for your patience.

                Regards,
                Andres V.

                • 5. Re: Intel Aero Drone commands to move motors
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hello AcomaGaze,

                   

                  I was reading GitHub’s intel-aero software release notes, and noticed that MAVLink Router is a compatible with the Intel RTF Drone (https://github.com/intel-aero/meta-intel-aero/wiki/Software-Release-Notes).

                   

                  So I kept searching and found the following documentation that introduces MAVLink:
                  https://software.intel.com/en-us/articles/intel-aero-compute-board-developer-guide-for-setting-up-a-simulation-environment#_Toc468441671.

                   

                  I suggest you take a look at the previous document, also, check MAVLink’s GitHub for further information and examples.

                   

                  Besides that, I couldn’t find a command-based alternative for controlling the drone.

                   

                  I hope you find the previous information useful.

                   

                  Regards,
                  Andres V.

                  • 6. Re: Intel Aero Drone commands to move motors
                    Soubhi

                    Hello All,

                     

                    If you want to control the drone using commands, check MAVProxy. I am able to give some commands to drone like changing flight mode.

                    In addition, have a look on Mavlink-routerd examples.

                     

                    Regards,

                    Soubhi.

                    • 7. Re: Intel Aero Drone commands to move motors
                      intel_jassowski

                      I have been attempting control of the Aero through mavproxy, but I must be doing something wrong.  I can connect to the controller and detect a heartbeat and see messages just fine.

                      I am able to send messages like ARM and TAKEOFF, which work: but the drone takes off rapidly in the horizontal dimension (I have it tethered, so it didn't get too far).

                       

                      So this might help the OP, at least to get to the point of causing the drone to move... but might not be exactly useful as the movement is pretty unpredictable...

                       

                      Here is the relevant parts of my code (full code attached):

                                       mav = mavutil.mavlink_connection('udpin:' + '127.0.0.1:14550')
                                       mav.wait_heartbeat()
                                       print "Set Speed"
                                       mav.mav.command_long_send(mav.target_system, mav.target_component,
                                         mavutil.mavlink.MAV_CMD_DO_CHANGE_SPEED, 0, 0.5,
                                         0, 0, 0, 0, 0, 0)
                                       print "Set Home"
                                       mav.mav.command_long_send(mav.target_system, mav.target_component,
                                         mavutil.mavlink.MAV_CMD_DO_SET_HOME, 0, 1,
                                         0, 0, 0, 0, 0, 0)
                                       print "Homed"
                                       mav.mav.command_long_send(mav.target_system, mav.target_component,
                                         mavutil.mavlink.MAV_CMD_NAV_GUIDED_ENABLE, 0, 1,
                                         0, 0, 0, 0, 0, 0)
                                       print "Guided Mode Set"
                                       mav.mav.command_long_send(mav.target_system, mav.target_component,
                                         mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 1,
                                         0, 0, 0, 0, 0, 0)
                                       print "armed"
                                       time.sleep(10)
                                       print "taking off"
                                       mav.mav.command_long_send(mav.target_system, mav.target_component,
                                         mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 0,
                                         0, 1, 0, 0, 0, 3)
                      

                       

                      Any clues what I might be doing wrong?  Initially I started with just ARM and TAKEOFF, and added the SPEED, HOME, and GUIDED to attempt to get better control.  Only the SPEED seemed to help (in that it moved horizontally at a slower rate).

                      I did notice when posting this that the MAV_CMD_NAV_TAKEOFF had a '1' set for the 4th variable (I first tried MAV_CMD_NAV_TAKEOFF_LOCAL and that sets the ascending speed -- but that command doesn't seem to be supported).  Since that variable is unused, that shouldn't be an issue?

                      • 8. Re: Intel Aero Drone commands to move motors
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hello intel_jassowski,

                        Thank you for sharing that information.

                        I’ll check your code and I’ll contact you through this post as soon as I have relevant results.

                        Thank you for your patience. 

                        Regards,
                        Andres V.

                        • 9. Re: Intel Aero Drone commands to move motors
                          intel_jassowski

                          It turns out that MAV_CMD_NAV_TAKEOFF uses the longitude and latitude values, and my drone was attempting to fly to 0N, 0W... setting those values to the current lat & lng (i.e.:

                          mav.mav.command_long_send(mav.target_system, mav.target_component,  
                                             mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 0,  
                                             0, 1, 0, lat, lng, 3)  
                          
                          

                          )

                          [where lat & lng are floats which represent the current position of the UAV], and the drone will hover in place.

                          1 of 1 people found this helpful
                          • 10. Re: Intel Aero Drone commands to move motors
                            Soubhi

                            intel_jassowski

                            Hi,

                             

                            Today I faced the same problem and I have two questions if you can help me.

                            First, I do not want to depend on the GPS. i.e. I want the drone to go up for one meter and land again. How can I achieve that?
                            Second, when you set 1 for Altitude, Is that mean one meter or what?

                             

                             

                            Currently I just want to figure out how to tell the drone to go up for specific heigh and go ahead for one meter and land again.

                            Today I tried a code (which is similar to yours ) and the drone kept going in horizontal line and go away and I was terrified until I dropped it down.

                             

                            Could you please provide me with commands/parameters to do that?

                             

                            Thank you

                            • 11. Re: Intel Aero Drone commands to move motors
                              intel_jassowski

                              Soubhi,

                                Here's what I've been able to determine:

                              1) if you are not sending the correct current GPS coordinates for the drone, it will attempt to fly to the ones you supply (i.e. 0, 0 will take the drone somewhere off the coast of Africa). 

                              2) Altitude is in meters, however there is a minimum takeoff altitude which is set as a parameter, and possibly also in the firmware.  I have not yet been able to get a controlled takeoff to anything under about 10m, but I'm still looking into that.

                              3) Without GPS, you'll need to be using some other position feedback mechanism: optical flow, uwb, etc.  Otherwise the Aero won't know if it's in the right location.  And then, I don't know what MAV command you would use to takeoff without providing latitude and longitude. In looking through the PX4 code, it seems like you could send 'None' for the position coordinates, but then it substitutes the current lon/lat values from home: not sure what happens if no GPS is available.  This would probably be a good question to ask on a PX4 site (i.e. How to use takeoff/go-to MAV commands without GPS).

                              1 of 1 people found this helpful
                              • 12. Re: Intel Aero Drone commands to move motors
                                Soubhi

                                intel_jassowski Thank you very much. Your replies are very helpful for me.

                                Today I tried some commands :

                                 

                                mav.mav.command_long_send(mav.target_system,mav.target_component,mavutil.mavlink.MAV_MODE_GUIDED_ARMED, 0, 0, 0, 0, 0, 0, 0, 0)

                                print ("Set Home") 

                                mav.mav.command_long_send(mav.target_system, mav.target_component, 

                                mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 1, 

                                0, 0, 0, 0, 0, 0) 

                                print ("armed")  

                                time.sleep(3)

                                mav.mav.command_long_send(mav.target_system, mav.target_component, 

                                mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 0, 

                                0, 0, 0, 36.0990708, -95.9254266, 2) 

                                time.sleep(5)

                                mav.mav.command_long_send(mav.target_system, mav.target_component, 

                                mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 

                                0, 0, 0, 0, 0, 0);

                                time.sleep(7)

                                mav.mav.command_long_send(mav.target_system, mav.target_component, 

                                mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 0, 

                                0, 0, 0, 0, 0, 0) 

                                print ("disarmed")

                                 

                                The behavior was strange. I set the altitude to 2 but I went much more higher. I set the mode to RTL but It did not return to launch point.

                                The commands do not work as they are specified in Ardupilot website and the new OS for the Aero and firmware from Ardupilot are not ready to be downloaded too.

                                What can I do? I am really lost. I need to do just basic navigation operations (using GPS) but the commands work strangely. I even broke the drone today when I executed the program.

                                I do not know how I can test my code. When I test it on the simulator, it works totally different from real testing. In addition, many commands are not supported by the simulator.

                                Thank you.

                                • 13. Re: Intel Aero Drone commands to move motors
                                  intel_jassowski

                                  I see the same issue with the TAKEOFF command.  There are minimum altitude settings for TAKEOFF in the parameters and hard coded into firmware, but I have not been able to successfully launch to a height of less than 10m or so.  I'm still looking into what might be causing this, and I'll update here when I know more.

                                  As for RTL, I have not tried this: I'm just using a LAND command with the original HOME coordinates, and that gets me pretty close to the launch site (within GPS accuracy of a meter or so).

                                  1 of 1 people found this helpful
                                  • 14. Re: Intel Aero Drone commands to move motors
                                    Soubhi

                                    intel_jassowski ,

                                     

                                    Thank you

                                    Did you try to change the value for this parameter MIS_TAKEOFF_ALT. They say that this is the parameter which is responsible to set the minimum altitude :  https://dev.px4.io/en/advanced/parameter_reference.html  .

                                    I am not able to test it currently because of the bad weather.

                                    Have you tried to use DroneKit to control the drone or not?

                                    How do you get the current lan & long for the drone? Are there any parameters that give you the current coordinates for the drone ?

                                     

                                    Thank you,

                                    Soubhi

                                    1 2 Previous Next