Setting up a simulation environment

Hello,

Again sorry for the trivial question, but how did you go about installing Gazebo 8 on 18.04. I wasn’t able to to find the package using apt.

Thanks!

You should try to use Gazebo 9, it is available in apt. If there is a problem, let us know.

Hi @Paranoia,

At the time, the last ubuntu LTS version was 16.04, from my tests, some modifications are necessary to run the plugin in Gazebo 9, since the API is different.

I added an issue to update the plugin here:
https://github.com/patrickelectric/bluerov_ros_playground/issues/32

But we don’t have a deadline.

Hey I am currently using pixhawk PX4 as my flight controller and ras pi 3 as my companion computer.I have installed SITL and was trying to simulate the movement of bot in QGC. The data gets uploaded intlo the pixhawk perfectly and when i start simulation the bot doesnot move according to the pre described path but randomly keps moving. I was not able to figure out Why this was happening. I have not installed Gazebo and was trying only through only SITL. The mode of the mission is AUTO . I am attaching the pics along with this query. The bot keeps moving even if i disarm the vehicle.

Hello,
what version of ardusub are you running? It looks like the sub is sideways, maybe the frame orientation parameter is wrong.

The Auto mode is highly experimental right now. Make sure the waypoints altitude is 0 in QGC or upload the mission with mavproxy (qgc forbids altitude < 0).

The ardusub version i am currently using 3.5.4 , I have set the altitudes of waypoints to 0 and when I arm the vehicle the mode directly changes into AUTO mode. i had changed the vehicle orientaton from simple ROV-4 to default Blue ROV2 and could you also give me some idea about the vehicle info that has to be set in the Q Ground Control.

The only frame currently supported in SITL is the BlueROV2.
Try checking the other flight modes with a joystick to check if everything looks right. The virtual horizon is a good first clue that something could be wrong. It should always show the sky blue at the stop.

You can try resetting the sitl eeprom by using the -w argument with sim_vehicle.py

Hey thanks for the suggestion, currently on don’t have any joystick with me as of now, is there any other option on how the simulation can be done?
And could you also verify the vehicle info

Hi, I was able to setup SITL but I encounter the error shown below whenever I try installing freebuoyancy_gazebo. I’ve tried using different gazebo versions (7, 8, 9) but the same error always pops up and I have no idea how to fix this. Hope you could help me with this.

:~/ardupilot/ArduSub/freebuoyancy_gazebo/build$ make
Scanning dependencies of target freebuoyancy_gazebo
[ 50%] Building CXX object CMakeFiles/freebuoyancy_gazebo.dir/src/freebuoyancy.cpp.o
/home/ardupilot/ArduSub/freebuoyancy_gazebo/src/freebuoyancy.cpp:10:37: fatal error: urdf_parser/urdf_parser.h: No such file or directory
compilation terminated.
CMakeFiles/freebuoyancy_gazebo.dir/build.make:62: recipe for target 'CMakeFiles/freebuoyancy_gazebo.dir/src/freebuoyancy.cpp.o' failed
make[2]: *** [CMakeFiles/freebuoyancy_gazebo.dir/src/freebuoyancy.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/freebuoyancy_gazebo.dir/all' failed
make[1]: *** [CMakeFiles/freebuoyancy_gazebo.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2~~~

Hi @Lausanne,

Unfortunately ROS infrastructure breaks for each version, it’s hard to catch up and maintain everything in sync.
This error appears to be a mismatch between this package and your gazebo version, the urdf_parser should be somewhere.
Check in your file system where the file is and try to update the package to the new file.
If the file does not exist, corrections around the library are necessary to make it work.

Hi, please help me. I am new

I have tried your guide on running SITL, but i am not getting the same result when running ArduSub with gazebo. Qgroundcontrol is not able to connect (i manually run QGroundControl, because after running this

it is opening gazebo, but without QGroundControl as your picture shows). Qgroundcontrol stuck at waiting for vehicle connection.

any suggestions ?

Hello, I’ve also gotten that error. I think this can happen because I have not installed ROS. So what I do to solve it is

  1. Remove Gazebo reference
    sudo apt-get remove ‘.gazebo.’ ‘.sdformat.’ ‘.ignition-math.’ ‘.ignition-msgs.’ ‘.ignition-transport.
  2. Install ROS full tutorial
    sudo apt-get install ros-kinetic-desktop-full
    This ROS is equipped with the latest version of Gazebo7
  3. Then continue the freebuoyancy_gazebo installation process

I hope that helps

1 Like

Hello,

I’m a beginner starting to work on the BlueROV2.
Currently, I’m stuck on installation process of the S.I.T.L.

I followed the instructions provided here in one of the messages above.

From this link, I ended up going to:Setting up the Build Environment (Linux/Ubuntu) — Dev documentation

Over here I did…

  1. git clone ttps://github.com/ArduPilot/ardupilot (I intentionally removed the h, new users can’t put more than 2 links in a post)

  2. cd ardupilot

  3. git submodule update --init --recursive

  4. If you are on a debian based system (such as Ubuntu or Mint), we provide) that will do it for you. Fr### Install some required packagesom ardupilot directory :Tools/environment_install/install-prereqs-ubuntu.sh -y

  5. Reload the path (log-out and log-in to make permanent):
    . ~/.profile

After this, the tutorials points out to this link: ardupilot/BUILD.md at master · ArduPilot/ardupilot · GitHub

Could someone help me out with the steps for building for S.I.T.L for the BlueROV2?
Also I noticed that the tutorials mentioned about sim_vehicle.py file, but I don’t seem to find the file in my copy.

Hello @DJ95,

you should answer yes when asked “Add $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to your PATH [N/y]?” to have the path with sim_vehicle.py added to your PATH and easily accessible from anywhere via terminal.

Note that $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS will be the path of
ardupilot/tools/autotest in your setup

Got it, Thanks for the prompt reply.

Also are you aware if this tutorial is still functional?
I currently have Ubuntu 18 with Gazebo9.

I followed the steps and I get this now:

It says waiting for heartbeat.

Hi,

I have not tested myself personally, but some people are using it with gazebo 9, you can check it in this PR:

Did you hit play in gazebo ?

1 Like

I did not, that resolved the problem.