Now I’m trying to controll my drone with my Jetson board by using Pymavlink.
I wrote pymavlink script and need to validate it works well.
So I did these.
- Run Sim_vehicle
" sim_vehicle.py -v ArduCopter --out=tcpin:0.0.0.0:5765"
- Connect sim with GCS, TCP:localhost:5765
- Connect sim with Pymavlink connection, TCP:localhost:5762
- Give Loiter_turn params
0, # confirmation
1, # number of turns
10, # radius
0, # reserved
new_lat, # latitude
new_lon, # longitude
0 # altitude
- Let it circle
These sequence make drone can circular but It falls down soon.
It looks like the vehicle never arms. Start it in GUIDED mode, then switch to CIRCLE.
It looks like you are going to circle mode (not an auto mission with loiter turns). In circle mode the throttle from your RC controls altitude (like in alt-hold and loiter mode). Since you have no RC connected in the sim (i assume) its commanding a descent during the circle.
Thank you, but I started it in Guided by manually, then switched to Circle.
You can see message “Hit the ground” on GCS
Thank you, You mean If I don’t have any RC controller, I have to switch to Auto mode right?
So, Is that right to give Loiter turn params for Auto mode as mission?
then, It automatically do when I switch to Auto mode?
Yeah switch to auto with that in the mission - or somehow simulate middle throttle on a rc controller.
Thank you, but there is some issue.
When I tried to switch mode to Auto, error came out like “mode AUTO init failed”. There is no other log about why It can’t be Auto mode.
There is a setting to allow Auto mode when throttle is still at zero - usually you have to raise the throttle for Auto mode to take effect (like do a take off)
Maybe I understand. But I don’t want to control by RC controller. Only with my Jetson board with python scripts. I mean “autonomous”.
When I don’t connect RC controller, vehicle doesn’t have any throttle values. right?
So If I allow to auto mode when there is no throttle(but still flying in Guided mode), It automatically keep its altitude?
Modify the AUTO_OPTIONS parameter with the behavior you want.
Thanks a lot for all you guys’ advices.
I did many things, then I can enter auto mode as modifying AUTO_OPTIONS param.
But there is no other way to give mission item about LOITER_TURNS so I decided to make turn same as LOITER_TURNS in GUIDED mode.
There is my code and vehicle’s moving, of course I need to adjust some params about yaw and speed…
Thank you for your interests