ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.87k stars 17.35k forks source link

[Copter-4.3] Internal error during GUIDED_NOGPS takeoff with GUID_OPTIONS = 8 #22938

Open lmark1 opened 1 year ago

lmark1 commented 1 year ago

Bug report

Issue details

Prior to 4.3 I was able to set GUID_OPTIONS parameter to 8 in order to achieve direct thrust control, both in SITL and on actual UAVs.

Once I upgraded to Copter-4.3 I was able to normally control the altitude using the climb rate. However, when i tried commanding thrust directly (by setting GUID_OPTIONS to 8) the firmware raises an internal error and resets while the UAV model simply stays firmly on the ground without prop spin. I have only tried this in SITL and not with the actual UAVs.

After doing some digging around, I believe that the internal error (PANIC: AP_InternalError::error_t::flow_of_ctrl) is raised from here: https://github.com/ArduPilot/ardupilot/blob/fe838aab8d20691d689bda43e3e1002ab4c87af3/ArduCopter/land_detector.cpp#L57

Once I reverted land_detector.cpp to the previous commit (d18cf7fa758805d4cb219228a60dd92faa44f4ce) it is working as expected again, i.e. the UAV takes off normally. I am not sure if this is a correct / safe solution though.

Version Copter 4.3

Platform [ ] All [ ] AntennaTracker [X] Copter [ ] Plane [ ] Rover [ ] Submarine

Airframe type X

Hardware type SITL

Logs

Setting SIM_SPEEDUP=1.000000
Starting SITL Gazebo
Bind 127.0.0.1:9003 for SITL in
Setting Gazebo interface to 127.0.0.1:9002
Starting sketch 'ArduCopter'
Starting SITL input
Using Irlock at port : 9005
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection ....
Connection on serial port 5760
Warning: Ignoring FORMAT_VERSION in param file
Warning: Ignoring FORMAT_VERSION in param file
Loaded defaults from ../../git/uav_ros_simulation/.gitman/ardupilot/Tools/autotest/default_params/copter.parm,../../git/uav_ros_simulation/.gitman/ardupilot/Tools/autotest/default_params/gazebo-iris.parm,/home/lmark/Documents/kopterworx_1_startup/identity.parm
bind port 5762 for 2
Serial port 2 on TCP port 5762
bind port 5763 for 3
Serial port 3 on TCP port 5763
bind port 5765 for 5
Serial port 5 on TCP port 5765
bind port 5766 for 6
Serial port 6 on TCP port 5766
Home: -35.363262 149.165237 alt=584.000000m hdg=353.000000
validate_structures:488: Validating structures
Warning: Ignoring FORMAT_VERSION in param file
Warning: Ignoring FORMAT_VERSION in param file
Loaded defaults from ../../git/uav_ros_simulation/.gitman/ardupilot/Tools/autotest/default_params/copter.parm,../../git/uav_ros_simulation/.gitman/ardupilot/Tools/autotest/default_params/gazebo-iris.parm,/home/lmark/Documents/kopterworx_1_startup/identity.parm
PANIC: AP_InternalError::error_t::flow_of_ctrl
Running: sh dumpstack.sh 837110 >dumpstack.sh_arducopter.837110.out 2>&1
Failed
Running: sh dumpcore.sh 837110 >dumpcore.sh_arducopter.837110.out 2>&1
Failed
GOT SIGALRM
Setting SIM_SPEEDUP=1.000000
Starting SITL Gazebo
...
(It restarts)
mateusfbsoares commented 1 year ago

I'm having the same problem in ArduCopter V4.3.7, SITL. Reverting as you said also solved the problem for me.