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

Template tutorial updates #399

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Template tutorial updates #399

merged 1 commit into from
Oct 5, 2023

Conversation

quarkytale
Copy link
Contributor

Updated to Harmonic, will add the same changes to Fortress and Garden once approved.

Items from #382

  • Separate section for installing the models directory and exporting the paths,
  • Add reference usage of DSV file with an example,
  • Elaborate folder structure of template
    and fixed typos.

@quarkytale quarkytale requested a review from azeey October 4, 2023 20:59
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Oct 4, 2023

There is a difference in how ROS and Gazebo resolves URIs, that the ROS side can handle `package://` URIs, but by default SDFormat only supports `model://`. Now `libsdformat` can convert `package://` to `model://` URIs. So existing simulation assets can be loaded by "installing" the models directory and exporting the model paths to your environment.

This can be automated using colcon environment hooks (shell scripts provided by a ROS package) in a [DSV file](https://colcon.readthedocs.io/en/released/developer/environment.html?highlight=dsv#dsv-files). Whenever you source the setup file in a workspace these environment hooks are also being sourced. See an [example](https://github.com/gazebosim/ros_gz_project_template/blob/main/ros_gz_example_gazebo/hooks/ros_gz_example_gazebo.dsv.in) of prepending the model share path to `GZ_SIM_RESOURCE_PATH` which enables Gazebo to load models from a ROS package using the `model://` URI.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The example just add worlds/ will update the template to add models/ as well

@quarkytale quarkytale linked an issue Oct 5, 2023 that may be closed by this pull request
14 tasks
@quarkytale quarkytale merged commit abe4b16 into master Oct 5, 2023
2 checks passed
@quarkytale quarkytale deleted the quarkytale/updates branch October 5, 2023 17:52
@quarkytale quarkytale restored the quarkytale/updates branch November 27, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

ROS Integration Pages
2 participants