Inability to change mode when controlling autonomous underwater vehicle with Mavros

Hii;
I want to control and change the modes of my Ardusub-based unmanned underwater vehicle with Mavros. However, I can only use certain modes of Ardusub. These are; Stabilize, Manual and Acro. I can switch to other modes by typing which modes in the terminal in Ubuntu. I also want my vehicle to do the tasks and commands I want, how can I do this?

Hi @Abdurrahman -
Depth hold and guided/auto mode require additional sensors - a pressure sensor and location sensors, respectively. Can you share more about the hardware you’re using? What autopilot, version of BlueOS, etc.? What are your overall goals for the vehicle?

First off all.Thank you.We are using jetson and pixhawk. ArduSub software is installed on Pixhawk. We have pressure sensors but when we try to change the mode, we do not attach the sensors to our vehicle. As I mentioned above, we use ArduSub software and Mavros communication. Our vehicle will work completely autonomously. We will make the vehicle perform tasks with the Ros commands we will send. We also tried the px4 software, it can still run certain head modes and the vehicle does not arm when we change the mode.

Hi @Abdurrahman -
Auto flight mode requires the vehicle to know its position. For surface vehicles, this can come from a GPS, once underwater a USBL or DVL is required…

A supported pressure sensor needs to be connected and feeding measurements to the autopilot via I2C in order for depth hold to work…


First I attached my depth sensor to the vehicle. Then in the terminal in Ubuntu, there are modes for the px4 software, but my vehicle does not arm in any of them, and there is also no depth-related mode in px4. What should I do in this case? I have a problem like this: if I change the mode in px4, the vehicle does not arm, if I arm the vehicle, this time the mode does not change, so if I do one, the other does not work, there is such a problem.

Hii Tony White,
sim_vehicle.py -L RATBeach

  • -out=udp:127.0.0.1:14550
  • console -map

roslaunch mavros

apm.launch fcu_url:="udp://:

14550@127.0.0.1:14550"

roslaunch bluerov_ros_playground gazebo.launch

rosservice call /mavros/ set_mode “(base_mode: 0, custom_mode: ‘GUIDED’}” rosservice call /mavros/ cmd/arming “{value: true)” rostopic echo /mavros/state rostopic pub /mavros/ setpoint_velocity/ cmd_vel_unstamped geometry_msgs/Twist ‘[1.0, 0.0, 0.0}’[0.0, 0.0, 0.0]’

these commands When I run it, I can see the movement of the vehicle on the map, but I can’t make the vehicle in Gazebo move. There is no problem in changing modes and arming, but when I write the movement code, only the vehicle on the map moves, the vehicle in Gazebo does not move at all. I have a similar problem, can you look into it too?Thank you so much.