John HsuTully Foote I carrefully check gazebo plugin on ardupilot side. It send motor command between 0 and 1.0 as rc value are bound between 1000 and 2000.
Using ARMING_REQUIRE 2.000000 , make send -1 value when no rc input as rc 3 will be 0, so the motor ouput is (0 - 1000) / 1000 = -1 . but that value is only for APM start up it can be send to motor.
So we got two solutions :
- we change the clamp Line 794 to 0 1.0 range. I think it is the easiest change, but require to adjust model parameter (setting offset to 0 for propeller) and we got the same behaviour for quad, plane ,and rover. Using this solve the issue of plane takeoff whitout input from APM ...
- I change gazebo pluggin on apm side to output motor between -1 1 for plane,
So throttles use -1 as a special signal for when rc is not connected? We can clamp motor command in the gazebo side to [0, 1] by setting cmd_max and cmd_min to [0, 1] if the apm motor command is simply [0, 1] and only -1 when rc is not detected.
Does the throttle controller actually want to leverage reverse thrust during flight in some scenarios?
Hi, I got some other changes to push . But I am waiting for ardupilot side to stabilize a little as plenty of refactoring are in progress and will break stuff ...
Some thing I will push :
- deprecation of arducopter pluggin, as ardupilot plugin is enough for all ardupilot vehicle type (at least traditional : copter, rover, plane, I didn't look at quadplane and thing like that), and update iris sdf
- allow to use gazebo gps plugin (working but sitl acting weird)
- allow to use gazebo ray sensors or sonar to be send to sitl
- update irlock plugin to be parametrable