BlueROV2 Gazebo Simulation Not Moving
Hello,
I am trying to set up the BlueROV2 simulation using Ubuntu 20.04, ROS Noetic, and Gazebo 11. I have completed my ArduSub SITL and MAVROS connections, but I am facing the following issues:
- The Gazebo environment opens, but the vehicle remains stationary.
- When I send a movement command via the terminal:
- The vehicle moves on the ArduSub map, but the model in Gazebo does not respond.
- When I click “Start Simulation”, the vehicle **immediately falls
Installation Steps I Followed
sudo apt update && sudo apt upgrade -y
sudo apt install ros-noetic-desktop-full -y
sudo apt install ros-noetic-mavros ros-noetic-mavros-extras -y
(Here is the github link, I couldn’t share it because the form didn’t allow it.)
sudo bash install_geographiclib_datasets.sh
sudo apt install git python3 python3-pip -y
pip3 install pymavlink MAVProxy
Likewise, there is an ArduPilot cloning code here.
cd ardupilot
git checkout ArduSub
git submodule update --init --recursive
Tools/environment_install/install-prereqs-ubuntu.sh -y
. ~/.profile
sudo apt install python3-catkin-tools -y
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone github/patrickelectric/bluerov_ros_playground
git clone github/uuvsimulator/uuv_simulator.git
cd ~/catkin_ws
catkin build
source devel/setup.bash
sudo apt install ros-noetic-gazebo-ros ros-noetic-gazebo-plugins ros-noetic-gazebo-msgs -y
cd ~/ardupilot/ArduSub
echo ‘export PATH=$PATH:$HOME/ardupilot/Tools/autotest’ >> ~/.bashrc
source ~/.bashrc
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”
rostopic echo /mavros/state
The output shows **`"connected: True"`**.
I can **change modes** and **ARM** the vehicle.
```bash
cd ~/catkin_ws/src
git clone https://github.com/freefloating-gazebo/freefloating_gazebo.git
cd ~/catkin_ws
catkin_make
source devel/setup.bash
roslaunch bluerov_ros_playground gazebo.launch
Troubleshooting Attempts
- Checking MAVROS Connection:
rostopic echo /mavros/state
Output: `"connected: True"`
2. Switching to GUIDED Mode & Arming the Vehicle:
rosservice call /mavros/set_mode "{base_mode: 0, custom_mode: 'GUIDED'}"
rosservice call /mavros/cmd/arming "{value: true}"
The vehicle changes mode and arms successfully.
3. Sending Movement Commands:
rostopic pub /mavros/setpoint_velocity/cmd_vel_unstamped geometry_msgs/Twist ‘[1.0, 0.0, 0.0]’ ‘[0.0, 0.0, 0.0]’
No response from the model in Gazebo.
The vehicle on the map opened with the ArduSub code is moving.
However, the model in Gazebo does not move.
The environment does not open very stable either, the vehicle is colored but the environment is black, I’m talking about the environment with the ship
Key Issues:
- ArduSub SITL is working and MAVROS is connected, but the vehicle does not move in Gazebo.
- When I start the simulation, the vehicle immediately falls.
- Movement commands have no effect.
What could be causing this issue? Am I missing or misconfiguring something?
Thank you!