ArduPilot / ardupilot

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

Copter: POSHOLD does not stop/slide when vehicle reaches a fence #14876

Open muramura opened 4 years ago

muramura commented 4 years ago

Issue details POSHOLD mode can fly beyond the polygon fence. LOITER mode did not exceed the polygon fence. I'm thinking, POSHOLD mode does not exceed the polygon fence, because it also uses position.

I discovered this phenomenon at SITL.

Please describe the problem

Version What version was the issue encountered with

APM: ArduCopter V4.1.0-dev (717bf718)

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

Airframe type What type of airframe (flying wing, glider, hex, Y6, octa etc)

Hardware type What autopilot hardware was used? (Pixhawk, Cube, Pixracer, Navio2, etc)

Logs Please provide a link to any relevant logs that show the issue

rmackay9 commented 4 years ago

@muramura, yes, that's right, the stop-at-fence feature only works in Loiter and Guided velocity mode. It is difficult to make it work in PosHold because the pilot controls the lean angles not the velocity of the copter. It's possible but it's a bit tricky.

chobitsfan commented 4 years ago

I have a partial solution for this in #13720.