Rover suddenly stops moving SITL

Hi all,

I am using Mission Planner 1.3.76 build 1.3.8029.15962 ArduRover V4.1.4 SITL.

I have a geofence written to the board, and I am trying to move from one place to another by using built-in Dijkstra’s algorithm. But my boat suddenly stops when fences are enabled. even if I don’t move close to the fences, after a while it stops working. but when fences are disabled, I didn’t notice such an issue yet.

Issue

Rover stops running for a while and the only way to move it disarming and arming again.

Experimental setup

set OA_TYPE = 2 (Djikstra’s)

set FENCE_ACTION = 0

set FENCE_ENABLE = 1

set FENCE_MARIGIN = 2 meters

set AVOID_ENABLE = 3

set FRAME_TYPE = 2

Initial Finding

Current drops and oscillates between 0-1 A.

Screenshots


Arming success


starts operation success, current fine


stops operating, current drops


setting another guided waypoint thinking that boat got stuck on the fence, nothing happens.


disarmed and armed, operates.

Messages tab

2/9/2022 8:37:30 AM : Throttle armed
2/9/2022 8:37:29 AM : Throttle disarmed
2/9/2022 8:37:04 AM : Throttle armed
2/9/2022 8:36:50 AM : AHRS: EKF3 active
2/9/2022 8:36:50 AM : EKF3 IMU1 is using GPS
2/9/2022 8:36:50 AM : EKF3 IMU0 is using GPS
2/9/2022 8:36:49 AM : DESKTOP-V4xxxxx
2/9/2022 8:36:49 AM : ArduRover V4.1.4 (ceb1e903)
2/9/2022 8:36:49 AM : DESKTOP-V4xxxxx
2/9/2022 8:36:49 AM : ArduRover V4.1.4 (ceb1e903)
2/9/2022 8:36:49 AM : DESKTOP-V4xxxxx
2/9/2022 8:36:49 AM : ArduRover V4.1.4 (ceb1e903)

Thanks for posting. I’m pretty sure the issue is FENCE_RADIUS. If you increase this to 1000 (e.g. 1km) then I’ll be it won’t stop.

1 Like

Seems like it works fine for now. Thanks, @rmackay9 !!! lifesaver

1 Like

i have a follow up question to this. i am trying to write fences using python pymavlink. the following code doesn’t write the fence. what can be the issue?

from pymavlink import mavutil, mavwp

master =  mavutil.mavlink_connection(device="tcp:127.0.0.1:5762")
master.wait_heartbeat()

poli = [(35.63604046,34.53116655), 
(35.63638925,34.53209996),
(35.63584863,34.53270078),
(35.63536032,34.53252912),
(35.63520337,34.53167081),
(35.63554344,34.53127384)]

#enable fence
master.mav.command_long_send(
            master.target_system,
            master.target_component,
            mavutil.mavlink.MAV_CMD_DO_FENCE_ENABLE, 0,
            1, 0, 0, 0, 0, 0, 0)


print(len(poli))
for i in range(len(poli)):
    master.mav.command_long_send(
                master.target_system,
                master.target_component,
                mavutil.mavlink.MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION, 0,
                len(poli), 
                0, 
                0, 
                0, 
                poli[i][0],
                poli[i][1], 
                0)