Those python bindings look really good. I was aware of ScenarIO from gym-ignition project, but your work is more like direct python api like rospy/rclpy in ROS.
yep, I think the key for ArduPilot is to not depends on ROS. That really simplifies workflow to not depend on ROS when it isnāt necessary !
Thanks, I looked through the ScenarIO work and managed to get it running on macOS. Their objective seems to be to use ignition gazebo directly as a library in much the same way as youād use Bullet. As I think you commented elsewhere, there is currently no access to sensor data which makes the ScenarIO project less useful for the type of thing weāre doing here. The Ignition team are fairly advanced in their support of bindings for the ignition-gazebo libraries but they didnāt have the message and transport layer in their current roadmap - hence the separate library. The idea was to expose the transport layer and messages much like ROS does, so if it looks a bit like ROS then itās on the right track
Still very much a work in progress (i.e. no water shaders yet, no tiling of the ocean), but the wave visual is now running in Ignition. Just need to add boats and buoyancyā¦
Now with boats and other flotsamā¦
Lots of caveats - definitely not ready for release yet.
- More to do to get the visuals right, that may take some core Ignition changes if I canāt manage work-arounds.
- The physics performance needs work as I suspect I busted something during the port.
- There are many hardcoded parameters that would usually be set via various XML or message parameters.
However - itās working and supports the same mixture of objects constructed from primitives or meshes as before, so a good basis for iterating improvements. If anyoneās interested in getting involved the issue tracking the migration is here:
Ship Model
Iāve put together an example ship model to help with investigations on scaling the simulation up to larger environments. The model is not currently integrated with ArduPilot (itās free floating), but gives some idea of what a target simulation might look like. The ship is approx 90m long (based on a model of a Havyard 842 tug which has a large deck area that can accommodate a quad plane). The challenge is to scale the simulation so that the local ocean field remains interesting (so reasonable resolution at the few metres scale), while the global environment is large enough for aircraft experiments (at the multiple kilometres scale). To do this properly so that it runs RT will involve using some of the advanced features of the underlying render engine that powers Ignition.
looks great! will be interesting to try this
A mixed boat / quad-plane example for proving out some additions to ardupilot_gazebo to support the Ignition thruster plugins. Unfortunately I didnāt have access to my repo with the Havyard 842, so the boat is a super size WAM-V. The example doesnāt include tridgeās Lua landing script.
High-speed scrub of the session - apologies for the keyhole surgery on an old MacBook.
Code and models in this branch: GitHub - srmainwaring/asv_wave_sim at feature/ship-landing-demo
Brief instructions here: Add ship landing example Ā· Issue #20 Ā· srmainwaring/asv_wave_sim Ā· GitHub
Hello Everyone!
I would really like to get involved in this project, Ignition Gazebo? I have worked with gazebo before but never saw something like this.
I would like to get involved and help where needed.
What is the best way to get started with all of these things you are trying out? Is there a documentation i should start with??
Thank you!
Daniel
Hi @ddomit, it would be great to have your help to improve support for Ignition Gazebo.
Updating the documentation is might be a good place to start! The Gazebo documentation in the ArduPilot wiki refers to the pre-Ignition version (Gazebo9 and Gazebo11) rather than the Ignition version that is used for ship landing. There is some documentation in the various GitHub repos that host the component parts, but there isnāt an overall manual that ties it all together.
The starting point for running the ship-landing simulation is to get a working Ignition Gazebo / ArduPilot / ardupilot_gazebo environment set up with some simple models. When that is working you can set up the sea surface simulation and run the environment for multiple vehicles.
Useful documents / repos:
- Ignition installation: https://gazebosim.org/docs/garden
- ArduPilot dev environment: Welcome to the ArduPilot Development Site ā Dev documentation
- ardupilot_gazebo plugin: GitHub - ArduPilot/ardupilot_gazebo: Plugins and models for vehicle simulation in Ignition Gazebo with ArduPilot SITL controllers
- Example models: SITL_Models/Ignition at master Ā· ArduPilot/SITL_Models Ā· GitHub
- Sea simulation: GitHub - srmainwaring/asv_wave_sim at demo/ship-landing-v2
- @tridges ship landing instructions: Ship Landing Support
Depending on your experience and interests there is a range of things to work on:
- Improve the documentation
- Add models for different vehicle types
- Improve the aerodynamics physics (propeller models, lift-drag models for aircraft)
- Improve the hydrodynamics models (thruster models, hydrodynamics behaviour)
- Improve the environmental models (waves performance and visual fidelity, wind models, sea currents models)
- Integrate different sensors with SITL: cameras, laser scanners, sonar
- ROS / ROS2 / mavlink integration - simulating off board planning etc.
- Python scripting of Ignition / ArduPilot simulation environments
Plenty to do!
Update on recent changes to the ocean and ship landing simulation:
- The Gazebo team have been migrating the simulator name from Ignition back to Gazebo. This impacts the entire library: project names, includes, namespaces, plugin names. It was not possible to integrate this a backwards compatible fashion - so Iāve elected to update the wave simulation project to use the new names and link against the main branches of the Gazebo libraries (Gazebo Garden).
- The ship landing example is available on the following branch:
demo/ship-landing-v2
. The extended ocean requires custom shaders and is currently only supported on macOS. For linux you should switch the sea surface model fromocean_waves
towaves
. The visual region is smaller, but the physics will continue to work outside the visual region using periodic boundary conditions. - There is a presentation here: Gazebo Ocean Simulation - Google Slides that provides an overview of the simulation library and some applications. Most of the simulated robots are controlled by ArduPilot, either directly or via mavros.
Hey such an awesome work!! I am really fascinated by the results / process documented
Not sure if this is still being worked but hopefully somebody has some advice. I was able to get Gazebo Garden to build on M1 Mac (native). it runs the shapes environment with no issues. My problem is at the stage of building arduPilot_gazebo
plugin. To do this, I followed the build instructions on the ardupilot_gazebo
GitHub in the ros2
branch.
I first opened a new terminal window and ran the gazebo environment setup command:
~/workspace/install/setup.zsh
I then did the following:
git clone https://github.com/ArduPilot/ardupilot_gazebo
cd ardupilot_gazebo
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
CMAKE seems to work just fine except it reports Qt issues in two locations. The first hereā¦
CMake Warning at /Users/cryptik/Development/other/gazebo-ws/install/lib/cmake/gz-gui7/gz-gui7-config.cmake:101 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
/Users/cryptik/Development/other/gazebo-ws/install/lib/cmake/gz-sim7/gz-sim7-config.cmake:98 (find_package)
/Users/cryptik/Development/other/gazebo-ws/install/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package)
CMakeLists.txt:22 (gz_find_package)
CMake Warning at /Users/cryptik/Development/other/gazebo-ws/install/lib/cmake/gz-sim7/gz-sim7-config.cmake:99 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
/Users/cryptik/Development/other/gazebo-ws/install/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package)
CMakeLists.txt:22 (gz_find_package)
and the second hereā¦
-- RapidJSON found. Headers: /opt/homebrew/Cellar/rapidjson/1.1.0/include
-- Configuring done (3.6s)
CMake Error at /Users/cryptik/Development/other/gazebo-ws/install/lib/cmake/gz-gui7/gz-gui7-targets.cmake:61 (set_target_properties):
The link interface of target "gz-gui7::gz-gui7" contains:
Qt5::Core
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
/Users/cryptik/Development/other/gazebo-ws/install/lib/cmake/gz-gui7/gz-gui7-config.cmake:131 (include)
/Users/cryptik/Development/other/gazebo-ws/install/lib/cmake/gz-sim7/gz-sim7-config.cmake:98 (find_package)
/Users/cryptik/Development/other/gazebo-ws/install/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:243 (find_package)
CMakeLists.txt:22 (gz_find_package)
-- Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.
Gazebo Garden seems to run with no problems. I have an ardupilot
and gazebo
conda environment setup with the related dependencies installed. I can run the ArduPilot SITL with mavproxy with no issues inside its conda environment. I have a separate conda environment setup for gazebo and I do the ardupilot_gazebo
build in that environment.
I also have qt@5
and qwt-qt5
installed with brew. I do not have any environment vars set for Qt, so I am not sure if that might be the issue. Any advice in getting past this issue would be most appreciated. I am running MacOS 13.4 (Ventura) on M1.
Ok, my bad. This was fixed by telling CMAKE where the qt5 stuff is. Apparently, the FindQt5 module is provided by Qt5 itself, so CMAKE needs to be told where to find it. Adding this flag to the cmake
step fixed it.
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=/opt/homebrew/Cellar/qt@5/5.15.9
Hi @cryptik - let me know if you have any further issues building on macOS - it should work with the additional cmake flags, but there are a couple of conflicts with the latest versions of qt@5
from brew
that may trip you at runtime. See comments here: Gazebo-Garden Vanilla installation both from binary as well as source ,GUI is crashing with segmentation fault in MAcOS BigSur Ā· Issue #1987 Ā· gazebosim/gz-sim Ā· GitHub
The Gazebo macOS build instructions https://gazebosim.org/docs/garden/install_osx_src#install-dependencies has the CMAKE_PREFIX_PATH setting, but is out of date as the binary build of gz-sim7
is using the rolling version of dart, not 6.10.0.
You may also need to unlink qt
as there can sometimes be conflicts with libs installed to /opt/homebrew/lib
.
I have an in progress PR here pr-ship-landing-v2-rebase to bring the ship landing demo up to date and fix a world frame orientation issue.
You may also be interested in these patches for running gz-sim
on macOS which fix the qt control, improve the gamma profile, and prevent a duplicated render call every frame in the GUI (makes a big difference with the wave sim).
Hello everyone,
Congratulations for this work !
Iām would like to run and play with your amazing demo on my Mac M1 too. Coud you explain me:
Which packages should I install via brew ?
Which git branches should I clone / patch / build ?
Will be the support of gazebo better on OSX (BareMetal) than in my Parallels virtual ubuntu 20.04 and its OpenGL emulation ?
Thanks for help,
Regards,
Macbook Pro M1
Ventura 13.3
Hi everyone ! Amazing project !
Iāve been playing with the sim_ship parameter for a few days now, especially in Copter. I used to work on copter V4.4 but today when I updated to V4.5 I found out that the sim_ship vehicle creates another copter instead of the boat it used to create. Even if it seems to work the same way (the copter circle according to the parameters we set in sim_ship_*** and the copter initiates on the deck as before) I wonder if this would be related to the advances on making a ship landing code for copter.
thatās the plane mooving with no ship in v4.5
thatās in copter where the copter lies on an other copter.
An other problem to make the ship landing for copter is the Lua vehicle:get_target_location() not working on copter. I just opened an issue on GitHub.
I will continue playing with the ship landing with copter, this is fascinating. Congrats again for your wonderful job on this feature