-
Notifications
You must be signed in to change notification settings - Fork 70
Add Tutorial on Using Transport Parameters with Systems #175
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Gaurang Ruparelia <[email protected]>
Signed-off-by: Gaurang Ruparelia <[email protected]>
Signed-off-by: Gaurang Ruparelia <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not using Ignition
anymore, the simulator was renamed to just Gazebo.
@@ -0,0 +1,117 @@ | |||
# Getting started with the Parameter interface in Ignition Gazebo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Getting started with the Parameter interface in Ignition Gazebo | |
# Getting started with the Parameter interface in Gazebo |
|
||
## Introduction | ||
|
||
The parameter declaration and manipulation interface to Ignition Gazebo enables more dynamic and configurable simulations. This tutorial explores the motivations behind this feature, outlines the setup process, showcases an example, and demonstrates why this functionality is helpful for simulation applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter declaration and manipulation interface to Ignition Gazebo enables more dynamic and configurable simulations. This tutorial explores the motivations behind this feature, outlines the setup process, showcases an example, and demonstrates why this functionality is helpful for simulation applications. | |
The parameter declaration and manipulation interface to Gazebo enables more dynamic and configurable simulations. This tutorial explores the motivations behind this feature, outlines the setup process, showcases an example, and demonstrates why this functionality is helpful for simulation applications. |
|
||
1. **Dynamic Configuration**: Parameters allow for the dynamic configuration of simulation entities without the need to alter the source code or the need to rerun. This is essential for testing various scenarios under different settings. | ||
|
||
2. **Consistency with ROS**: Many users of Ignition Gazebo come from a ROS (Robot Operating System) background, where parameter servers are a fundamental feature for storing and manipulating parameters at runtime. This addition makes Ignition Gazebo more intuitive for ROS users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. **Consistency with ROS**: Many users of Ignition Gazebo come from a ROS (Robot Operating System) background, where parameter servers are a fundamental feature for storing and manipulating parameters at runtime. This addition makes Ignition Gazebo more intuitive for ROS users. | |
2. **Consistency with ROS**: Many users of Gazebo come from a ROS (Robot Operating System) background, where parameter servers are a fundamental feature for storing and manipulating parameters at runtime. This addition makes Gazebo more intuitive for ROS users. |
|
||
#### Prerequisites | ||
|
||
1. Ignition Gazebo built from source (Fortress version or newer)- instructions can be found [here](https://gazebosim.org/docs/fortress/install_ubuntu_src). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Ignition Gazebo built from source (Fortress version or newer)- instructions can be found [here](https://gazebosim.org/docs/fortress/install_ubuntu_src). | |
1. Gazebo built from source (Fortress version or newer) - instructions can be found [here](https://gazebosim.org/docs/fortress/install_ubuntu_src). |
|
||
|
||
|
||
#### Steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### Steps | |
#### Steps |
|
||
Expected Output: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```bash |
|
||
### Summary of Features | ||
|
||
- Systems can declare parameters using the ignition::gazebo::DeclareParameter() helper function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Systems can declare parameters using the ignition::gazebo::DeclareParameter() helper function. | |
- Systems can declare parameters using the gz::gazebo::DeclareParameter() helper function. |
- ```/world/<world_name>/get_parameter service```: Get the type and value of a parameter. | ||
- ```/world/<world_name>/set_parameter service```: Set a parameter: parameter name, value, and type need to be provided. | ||
- Parameter types are protobuf messages. | ||
- A ign param command line tool is added. A simple CLI tool to interact with parameters. Though interacting with parameters using ign service is possible, it's not as easy as parameter values are serialized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- A ign param command line tool is added. A simple CLI tool to interact with parameters. Though interacting with parameters using ign service is possible, it's not as easy as parameter values are serialized. | |
- A `gz param` command line tool is added. A simple CLI tool to interact with parameters. Though interacting with parameters using `gz service` is possible, it's not as easy as parameter values are serialized. |
|
||
|
||
### Acknowledgments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Acknowledgments | |
### Acknowledgments |
|
||
### Acknowledgments | ||
|
||
This feature was made possible by contributions from the community, particularly Ivan Pauno, who spearheaded the development and integration of the parameters interface into Ignition Gazebo. Details on this change can be found on the [gz-sim repo](https://github.com/gazebosim/gz-sim/pull/1431), [gz-msgs repo](https://github.com/gazebosim/gz-msgs/pull/241), and [gz-transport repo](https://github.com/gazebosim/gz-transport/pull/305). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature was made possible by contributions from the community, particularly Ivan Pauno, who spearheaded the development and integration of the parameters interface into Ignition Gazebo. Details on this change can be found on the [gz-sim repo](https://github.com/gazebosim/gz-sim/pull/1431), [gz-msgs repo](https://github.com/gazebosim/gz-msgs/pull/241), and [gz-transport repo](https://github.com/gazebosim/gz-transport/pull/305). | |
This feature was made possible by contributions from the community, particularly Ivan Pauno, who spearheaded the development and integration of the parameters interface into Gazebo. Details on this change can be found on the [gz-sim repo](https://github.com/gazebosim/gz-sim/pull/1431), [gz-msgs repo](https://github.com/gazebosim/gz-msgs/pull/241), and [gz-transport repo](https://github.com/gazebosim/gz-transport/pull/305). |
I missed your ping about this PR. Thanks for the contribution!! However, this repo is for Gazebo-classic and the tutorial refers to things in modern Gazebo. Would you be able to move it to https://github.com/gazebosim/gz-sim? cc @scpeters |
This pull request introduces a tutorial that resolves issue #1845, as opened by @scpeters on Dec 21, 2022. The tutorial is aimed at demonstrating the use of the newly added parameter interface feature in multiple repos including gz-transport, gz-msgs repo, and gz-sim repo.
The tutorial covers:
ign param
command-line tool, with expected outputs provided for clarity.Key Highlights:
trisphere_cycle_wheel_slip.sdf
demo to showcase parameters in action.ign param
CLI for parameter interaction, illustrated with thesystems.wheel_slip.trisphere_cycle1.wheel_front
parameter as an example.I would also like to point out some strange behavior I noticed when following the instructions on issue #1845. I was unable to see the params as indicated when I try to list all and see no parameters.
I confirmed that I could successfully run the trisphere_cycle_wheel_slip.sdf demo as seen below

When I run play, it behaves as expected by sliding. Because I cannot list all, I cannot even get a specific parameter or even set a parameter as described which means I'm unable to reproduce the results mentioned in the PRs merged.
On the positive side, I was able to see the services as expected and mentioned by the contributor. They can be seen below:
I have verified that I have all the updated changes from the merged PRs (compare my branches to the branches where the merges occur for all repos):
gz-msgs repo

gz-transport repo
This tells me that I have the correct repos when I build from source, so that is not the issue.
I'm puzzled by why I can't view the parameters. I can still use the CLI tool and services interface which gave me the confidence to go ahead and create this tutorial. Some clarification here would be helpful.
Details:
OS: Ubuntu 22.04 (Dual boot)
Gazebo version: Fortress built from Source following instructions found here
A special acknowledgment to Ivan Pauno for spearheading the development and integration of the parameters interface into Ignition Gazebo, which has been instrumental in the realization of this tutorial.
Feedback and further contributions to refine and expand this tutorial are warmly welcomed.