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

Use jinja templates for multivehicle simulations #15831

Merged
merged 1 commit into from Sep 29, 2020

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Sep 27, 2020

Describe problem solved by this pull request
Multivehicle simulations in gazebo was run using xacro macros to generate sdf files in the /tmp directory with the necessary port assignments to enable it.

However, there are several problem with this infrastructure

  • xacros do not support some of the syntaxes that were added in recent sdf versions (e.g. nested models)
  • PX4 uses xacro.py, which is deprecated
  • xacro based macros were not on the same path with the models that they represent, therefore got outdated whenever the models were updated. (see below for the current state of standard_vtol)
    ezgif com-video-to-gif (4)

Describe your solution
jina2 templates are now used to generate sdf files at build time. This PR moves the multivehicle script to use jinja templates instead of xacro files. After this is merged, xacro macros will be completely removed from sitl_gazebo

Test data / coverage
Tested in Gazebo SITL:
image

Additional context

This commit switches xacro macros to jinja templates for multivehicle simulations.
@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Sep 29, 2020

The required changes in the submodule has been merged and is included in #15797

@Jaeyoung-Lim Jaeyoung-Lim merged commit ff6b82c into master Sep 29, 2020
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-jinja-multivehicle branch September 29, 2020 13:46
Jaeyoung-Lim added a commit to PX4/PX4-SITL_gazebo-classic that referenced this pull request Oct 5, 2020
xacro macros have been replaced by jinja templates in PX4/PX4-Autopilot#15831, therefore no longer used in the PX4 toolchain.

This commit removes rotors_description to deprecate xacro templates completely
Remove xacro.py
Jaeyoung-Lim added a commit to PX4/PX4-SITL_gazebo-classic that referenced this pull request Oct 7, 2020
xacro macros have been replaced by jinja templates in PX4/PX4-Autopilot#15831, therefore no longer used in the PX4 toolchain.

This commit removes rotors_description to deprecate xacro templates completely
Remove xacro.py
mvacanti pushed a commit to mvacanti/PX4-Autopilot that referenced this pull request Nov 27, 2020
This commit switches xacro macros to jinja templates for multivehicle simulations.
sfuhrer pushed a commit that referenced this pull request Dec 20, 2020
This commit switches xacro macros to jinja templates for multivehicle simulations.
RyosukeMatsushima pushed a commit to RyosukeMatsushima/PX4-SITL_gazebo that referenced this pull request Jun 21, 2022
xacro macros have been replaced by jinja templates in PX4/PX4-Autopilot#15831, therefore no longer used in the PX4 toolchain.

This commit removes rotors_description to deprecate xacro templates completely
Remove xacro.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gazebo SITL multiple run script gives MAVLink connection only to two UAVs
2 participants