Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignition gazebo support for PX4 Software-In-The-Loop simulations #17889

Merged
merged 2 commits into from Jul 19, 2021

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Jul 12, 2021

Describe problem solved by this pull request
This commit adds SITL support for ignition gazebo. Ignition gazebo is a replacement for the "classic" gazebo for future applications.

Since PX4 uses gazebo for a lot of integration testing and simulated environments, it makes a lot of sense to integrate into the new ignition gazebo.

Describe your solution
This implementation is a first iteration supporting SITL in the ignition environment.

  • a mavlink_interface_plugin was implemented as an interface for HIL_* mavlink messages between px4 and ignition gazebo
  • Only a quadrotor is supported in the current implementation

A demonstration of the package is shown in the video below:
ignition gazebo sitl

Test data / coverage
The dependency that is only needed in the regular environment is ignition edifice. This is the latest LTS release of ignition gazebo. Supported environments include Ubuntu Focal / Ubuntu Bionic

sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
apt update
apt install ignition-edifice

The simulation can be run as the following

make px4_sitl ignition

Additional context

This commit adds SITL support for ignition gazebo. Ignition gazebo is a replacement for the "classic" gazebo for future applications.

The simulation can be run as the following
```
make px4_sitl ignition
```
@Jaeyoung-Lim Jaeyoung-Lim added the Sim: SITL software in the loop simulation label Jul 12, 2021
@Jaeyoung-Lim Jaeyoung-Lim marked this pull request as ready for review July 12, 2021 12:34
@BazookaJoe1900
Copy link
Member

Few questions:

  • Do you plan to migrate the gazebo simulation to 'ignition' version?
  • Does it conflicts or complimentary?
  • what are the benefits? Current and future?

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Jul 12, 2021

@BazookaJoe1900

Do you plan to migrate the gazebo simulation to 'ignition' version?

This is in fact a migration of the current sitl_gazebo into ignition. IMO, the two are different enough that we cannot support both with the same code base

Does it conflicts or complimentary?

It conflicts with the current gazebo implementation. However, since gazebo is one of the most widely used simulation framework, I think it makes sense to support it as long as OSRF supports classical gazebo

what are the benefits? Current and future?

Also, ignition gazebo does not yet include all the subset of features that gazebo used to support, so doing a hard switch now would leave a lot of use cases left alone. You can check out what features ignition gazebo has in https://ignitionrobotics.org/features

Currently there are no direct benefits for our use case, but some differences to note.

  • ignition gazebo uses DART as the physics backend verses ODE in classical gazebo
  • ignition gazebo supports OGRE2 for rendering

@Jaeyoung-Lim Jaeyoung-Lim changed the title Add SITL support for ignition gazebo Add Software-In-The-Loop support for ignition gazebo Jul 13, 2021
@Jaeyoung-Lim Jaeyoung-Lim changed the title Add Software-In-The-Loop support for ignition gazebo Add PX4 Software-In-The-Loop support for ignition gazebo Jul 13, 2021
@Jaeyoung-Lim Jaeyoung-Lim changed the title Add PX4 Software-In-The-Loop support for ignition gazebo Add ignition gazebo support for PX4 Software-In-The-Loop simulations Jul 13, 2021
.gitmodules Outdated
@@ -74,3 +74,6 @@
[submodule "src/lib/events/libevents"]
path = src/lib/events/libevents
url = https://github.com/mavlink/libevents.git
[submodule "Tools/sitl_ign_gazebo"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really want to keep this naming?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's ugly. 😂

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Removed submodule Tools/sitl_ign_gazebo
Fix
@dagar dagar merged commit 58060b2 into master Jul 19, 2021
@dagar dagar deleted the pr-sitl-ign-gazebo branch July 19, 2021 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sim: SITL software in the loop simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants