I want to develop a controller in ROS for the Bluerov2, and I decided to first start developing the code using SITL.
I did the following procedure to start controlling the ROV:
- Run sim_vehicle.py from ~/…/ardupilot/ArduSub
- Launched gazebo with roslaunch bluerov_ros_playground gazebo_sitl.launch
- Launched QGroundControl (because I found it more convenient to toggle between navigation modes)
After that, the next step is to send the ROV the control commands. AFAIK, mavros/rc/override and /mavros/setpoint (I specifically want to use cmd_vel) can be used to do that.
According to ROS wiki:
Send RC override […] Not recommended to use in automatic control because lack of safety mechanisms. Use one of setpoint plugins and OFFBOARD mode.
However, there was a little discussion about this question in this topic , where you stated that:
rc/override -> (STABILIZE/MANUAL) MODE
cmd_vel -> GUIDED MODE
However, GUIDED MODE requires to have a GPS, because as Patrick said:
You are not able to set speed reference without a position system, the software derivative the position to use it as a velocity reference for the control loop.
I guess that cmd_vel works in the SITL but will not work in the real ROV since I don’t have GPS, but, since cmd_vel is more recommended for automated systems, is there any workaround I can do to be able to use GUIDED MODE and thus this topic? Maybe publishing the Bluerov2 Pose in some topic?
Edit: cmd_vel was not working at first because I had the joystick connected and I guess there were conflict in the commands. However, the same question for the real ROV remains!!