ArduSub and Gazebo not letting BlueRov2 to enter Guided mode

Hello,
I would like to preface I could not find a category for ArduSub, so I labeled it as ArduRover. I am currently using this repo: GitHub - evan-palmer/blue at humble I am now running into a problem where I can not get the sim to entered guided mode. The ROS CLI, MAVProxy CLI, and qgroundcontrol all fail to switch the BlueROV2 into guided mode. There are other repos that allow the BlueROV2 to enter guided mode but those repos are not ROS compatible at the time. I originally thought I needed a simulated GPS but it appears that might not be the problem, and something else could be the problem. I am new to this stack of technology so any help would be appreciated. Thank you!

Hi @ssicari - I’m working through the installation instructions of the Blue project. I develop on macOS so there are a few minor tweaks to get everything building.

  • Using ArduPilot Sub-4.1.
  • Simulation is running using: ros2 launch blue_bringup bluerov2_heavy.launch.py use_sim:=true.
  • Sub responds to manual commands: rc 5 1600 etc.
  • Sub will not switch to GUIDED.
  • No position reported in map.
  • No global postion:
MANUAL> status GLOBAL*
MANUAL> 2332: GLOBAL_POSITION_INT {time_boot_ms : 647473, lat : 0, lon : 0, alt : -1230, relative_alt : -1123, vx : 0, vy : 0, vz : 0, hdg : 10456}
MANUAL> status GPS*
MANUAL> 2568: GPS_RAW_INT {time_usec : 0, fix_type : 0, lat : 0, lon : 0, alt : 0, eph : 65535, epv : 65535, vel : 0, cog : 0, satellites_visible : 0, alt_ellipsoid : 0, h_acc : 0, v_acc : 0, vel_acc : 0, hdg_acc : 0, yaw : 0}

Looks like the problem is the lack of a global fix. I’m not that familiar with the sub code and the appropriate param set up. The next step would be to compare params and mavros config with a package where I’ve had the guided and auto modes working (e.g. GitHub - clydemcqueen/bluerov2_ignition: BlueROV2 model for Gazebo Garden).

Update 1: I see that there is also some discussion of the problems here:

Update 2: I applied the PR Initial patch for enabling GUIDED mode and mission planning and it seems to be working.

  • Position reported.
  • Location in map showing.
  • Can change modes to GUIDED and use the Fly To feature in the MAVProxy map.

The vehicle is not constrained to stay below sea level, but this is an issue with the buoyancy model - not the location service.

I noticed that I am running ardusub 4.2 -dev and wondering if the dev branch is causing conflicts. I am going to try to switch to the stable version and possible reclone the repo to see if that fixes it. I already tried pulling the new PR and that still hasn’t worked so I think it has to be something wrong with my ardusub install. Thank you for all the help

I am looking to switch ardusub to either the stable mode or to 4.1, but all the documents I see talk about how to change it in qgroundcontrol when plugged into the vehicle. I am still running the sim and don’t have the vehicle with me right now, is there a simply way to just change the ardusub version without that. Do you have any resources that talk about how to do it without the vehicle by chance? Thank you!

I’m not quite sure I follow why you need a vehicle to hand when running simulations in Gazebo. I use MAVProxy as a GCS when developing and build ArduPilot directly from source. The dev wiki has a great deal of information on getting set up from scratch: Welcome to the ArduPilot Development Site — Dev documentation.

If you haven’t already, I can recommend working through the sections on downloading using git, building, and simulation and testing. If you’re planning to do a lot of simulation in Gazebo a good working knowledge of the dev tools will be a great help.

Ok thank you I will look into that. I have ardupilot cloned and set up already it’s just I would like to change the version of ardusub I have running. A lot of the forums I was reading were talking about flashing real hardware to a new version of ardusub but none I looked at mentioned how to change it locally so I was curious. Such as connect your GCS (specifically Qgroundcontrol) to your vehicle’s hardware and qgroundcontrol has an option to flash a new version onto your ROV hardware. Thank you for the response I will go back and reread over the ardupilot site.