Run arm_test.py The motor does not work


#1

pi@raspberrypi : ~/pidronescripts/dk $ sudo python arm_test.py

WARNING:autopilot:GCS Failsafe Cleared

CRITICAL:autopilot:PreArm: Throttle below Failsafe

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

CRITICAL:autopilot:PreArm: Throttle below Failsafe

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.

Waiting for vehicle to become armable.


#2

Hi there @Huang

Let’s make sure your parameters are set up correctly.

Try going to Mission Planner > Full Parameter Tree > FS > FS_THR_MIN

Make this value like 975.

If the channel 3 (throttle channel) is below the PWM on this parameter, the drone will not arm. If your FS_THR_MIN is too high, then it could prevent the drone from arming even though everything is fine.


#3

I followed your method and all the errors were resolved
But the execution of arm_test.py does not display an error, but the motor still does not work
The flight control I use PIXHAWK 2.4.8
The arm_test.py connection method has a little change:
vehicle = connect(’/dev/serial0’,wait_ready=True,baud=921600)
Does it affect operations?

Execution :
pi@raspberrypi:~/pidronescripts/dk$ sudo python arm_test.py
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.
Waiting for vehicle to become armable.


I use the remote control without any problems


#4

I’m facing the same problem but with a Navio2, is there any fix?


#5

@Huang
@Ankith

Most often when the dronekit script forever loops with ‘waiting or vehicle to become armable’, there is some ‘safety’ check preventing the drone from arming. Of note, if you are seeing this message, it means that the python script is actually connected with the ArduPilot firmware, so there isn’t a connection issue or anything of that sort.

As a test, you could set the ARMING_CHECK parameter in Mission Planner to 0, then run the arm_test.py script to confirm that the issue isn’t with dronekit. Then I would set ARMING_CHECK back to whatever the original value was.

Then it’s time to search for the reason why the drone isn’t armable. You can always check in the MESSAGES section of mission planner to get some clues, but it won’t always give you the answer.

Most often when I encounter this issue, the drone isn’t armable because the RC controller is turned off, and simply flicking the RC transmitter on will make the drone armable.

Another good thing to look for is the color of the flashing light on the flight controller- that will give you really good clues. For example, a blue blinking light means there is no GPS lock, a yellow blinking light means there is pre-arm issues (and likely the RC transmitter or throttle below failsafe).

Let me know what you guys find!


#6

pi@raspberrypi:~/pidronescripts/dk$ python takeoff_and_land.py
WARNING:autopilot:GCS Failsafe Cleared
Vehicle is now armable
Waiting for drone to enter GUIDED flight mode
Vehicle now in GUIDED MODE. Have fun!!
Exiting script. manualArm set to True but vehicle not armed.
Set manualArm to True if desiring script to arm the drone.
Waiting for drone to land

==============
I don’t know what it means manualArm set to True ,Where to set?


#7

Hi there @Huang

manualArm is a variable in the python script. When you set it to ‘True’, it means the dronekit script won’t arm the motors, and will require you to arm the motors from the RC controller. Once the RC controllers are spinning the script will continue in an autnonomous manner.

If it is set to ‘False’, the script will automatically arm the motors and you won’t need to RC controller at all (aside from safety reasons to take control if necessary).

This manualArm variable should only set to True for debugging for when you are experiencing arming issues. For your case set the manualArm to ‘False’ and will be good to go.


#8

Thank you
This is my precision landing demo

https://www.facebook.com/100000336275173/posts/3683134075041099/?

Demonstration several times this time is better


#9

Very nice!

Was the drone tracking the larger aruco? It looks like it didn’t see the smaller aruco in the video.


#10

Nice job! :clap:


#13

Nice work! Question, why didnt it land directly on the marker? It was a pretty big marker. What kind of camera did you use, picam v1?