Home        Store        Learn        Blog

Stabilize and depth-hold modes are not working with SITL properly

Hello,

I am using SITL with ArduSub, the firmware boots in manual mode but before arming the vehicle I am initializing the rc channels to 1500 rc all 1500 so the ROV is stable after that, if I changed the mode to stabilize or depth-hold the ROV start to move randomly and rotate around itself.
I have mavros running with the SITL simulator the /mavros/rc/override and the /mavros/rc/in are having values of 1500 in all channels
but the /mavros/rc/out is changing randomly!!

Version Version Version. When you are getting developer help or debugging with other developers, it is always important to mention the version of the software that you are working with.

I have no problems and cannot reproduce your issue on ArduSub STABLE v3.5.3:

MANUAL> rc all 1500
MANUAL> arm throttle
MANUAL> APM: Arming motors
Got MAVLink msg: COMMAND_ACK {command : 400, result : 0}
ARMED
Arming checks disabled
mode stabilize
MANUAL> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
STABILIZE> Mode STABILIZE
mode alt_hold
STABILIZE> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
ALT_HOLD> Mode ALT_HOLD

Hi,

I’m using the last version of ArduSub and mavros and everything is working fine here also.

#rostopic echo /mavros/rc/out
---
header: 
  seq: 198
  stamp: 
    secs: 1533228095
    nsecs: 428080505
  frame_id: ''
channels: [1500, 1500, 1500, 1500, 1500, 1500, 0, 0]
---

I don’t what was the problem but after going to ‘Frame Setup’ and pressing ‘Load vehicle default parameters’ I got everything working fine

by the way, I have never changed any parameter

Thank you guys for your help everything is working fine now

@ShehabAldeen @jwalser
I was wondering, were you using ArduSub stable version or 3.6 dev version for this test?

Because I’m having problems running SITL with gazebo using Ardusub stable version. Can’t seem to be able to link it to the gazebo simulation and it doesn’t seem to have the gazebo-bluerov2 frame which worked with with me with gazebo in ardusub-dev-3.6

SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: “mavproxy.py” “–master” “tcp:127.0.0.1:5760” “–sitl” “127.0.0.1:5501” “–out” “127.0.0.1:14550” “–out” “127.0.0.1:14551” “–out” “udp:0.0.0.0:14550” “–console”
RiTW: Starting ArduSub : /home/yuzo-san/ardupilot/build/sitl/bin/ardusub -S -I0 --home -35.363261,149.165230,584,353 --model bluerov2 --speedup 1
Connect tcp:127.0.0.1:5760 source_system=255
[Errno 111] Connection refused sleeping
[Errno 111] Connection refused sleeping
[Errno 111] Connection refused sleeping
[Errno 111] Connection refused sleeping
Failed to connect to tcp:127.0.0.1:5760 : [Errno 111] Connection refused
SIM_VEHICLE: MAVProxy exited
SIM_VEHICLE: Killing tasks

This is the error I’m getting