diff --git a/manifest.xml b/manifest.xml index fe057750..8c3bba81 100644 --- a/manifest.xml +++ b/manifest.xml @@ -96,8 +96,8 @@ install_other_linux/tutorial.md install_other_linux/tutorial-9.0.md - Installation instructions for major linux distributions (non Ubuntu). Currently, - Debian, Fedora, Arch Linux and Gentoo. + Installation instructions for major linux distributions (non Ubuntu). Currently, + Debian, Fedora, Arch Linux and Gentoo. install @@ -150,9 +150,9 @@ install_from_source/tutorial_8.md install_from_source/tutorial_default.md - Installation instructions for building a gazebo application using the - source code. For user who want to contribute with code patches or pull - requests. + Installation instructions for building a gazebo application using the + source code. For user who want to contribute with code patches or pull + requests. install @@ -256,14 +256,14 @@ intermediate - + build_model/tutorial.md build_model/tutorial-7.md Describes models, and how to create custom models. beginner - + actor/tutorial.md Describes how to create animated skeletons and scripted trajectories. intermediate @@ -271,7 +271,8 @@ model_structure/tutorial.md - Describes how Gazebo finds and load models, and requirements for creating a model. + Describes how Gazebo finds and load models, and requirements for creating a + model. beginner @@ -281,7 +282,7 @@ beginner - + nested_model/tutorial.md Describes how to create an assembly of models. beginner @@ -374,7 +375,8 @@ collide_bitmask/tutorial.md - Learn how to control which geometries collide or do not collide with each other through the use of bitmasks. + Learn how to control which geometries collide or do not collide with each other + through the use of bitmasks. beginner @@ -392,7 +394,8 @@ hydrodynamics/tutorial.md - Simulate self-propelling underwater submarines using lift, drag, and buoyancy forces. + Simulate self-propelling underwater submarines using lift, drag, and buoyancy + forces. advanced @@ -428,7 +431,6 @@ - components/tutorial.md Overview of the basic components in a Gazebo simulation. @@ -524,7 +526,8 @@ occupiedevent/tutorial.md - Use the OccupiedEvent plugin to send messages when a 3D region is occupied by a model. + Use the OccupiedEvent plugin to send messages when a 3D region is occupied by a + model. intermediate @@ -548,9 +551,9 @@ intermediate - plugins_random_velocity/tutorial-6.md - Use this for random walks of any link. - intermediate + plugins_random_velocity/tutorial-6.md + Use this for random walks of any link. + intermediate @@ -646,7 +649,8 @@ parallel/tutorial.md - Take advantage of improved physics performance with two different threading options. + Take advantage of improved physics performance with two different threading + options. advanced @@ -686,7 +690,8 @@ ros_wrapper_versions/tutorial.md - Details the reasons to pick an specific ROS or Gazebo version and provide instructions about how to install the different options + Details the reasons to pick an specific ROS or Gazebo version and provide + instructions about how to install the different options intermediate @@ -759,6 +764,13 @@ + + parameter_interface_tutorial/tutorial.md + How to get and set parameters in Ignition Gazebo. + intermediate + + contrib_code/tutorial.md How to create new code for inclusion into Gazebo. @@ -811,15 +823,18 @@ intermediate - + drcsim_atlas_robot_interface/tutorial.md - A guide to compiling a stand-in for the AtlasRobotInterface library version 3.0.0. + A guide to compiling a stand-in for the AtlasRobotInterface library version + 3.0.0. intermediate drcsim_launchfiles/tutorial.md - A guide to launching DRCSim with different Atlas versions, hand options, and world files. + A guide to launching DRCSim with different Atlas versions, hand options, and + world files. intermediate @@ -837,7 +852,8 @@ drcsim_modify_world/tutorial.md - How to modify the simulated Atlas' environment, such as adding objects to the world. + How to modify the simulated Atlas' environment, such as adding objects to the + world. intermediate @@ -861,37 +877,44 @@ drcsim_animate_joints/tutorial.md - How to move a robot in simulation without dynamics through the use of a model plugin and ROS. + How to move a robot in simulation without dynamics through the use of a model + plugin and ROS. intermediate drcsim_grasp_sandia/tutorial.md - How to send desired grasp pose to Sandia hands mounted on the Atlas robot through ROS. + How to send desired grasp pose to Sandia hands mounted on the Atlas robot through + ROS. intermediate drcsim_keyboard_teleop/tutorial.md - DRCSim provides an interface to the Atlas Sim Interface and BDI Controller. It consists of an Actionlib server and a keyboard_teleop python ROS node. This tutorial explains how to use the teleop. + DRCSim provides an interface to the Atlas Sim Interface and BDI Controller. It + consists of an Actionlib server and a keyboard_teleop python ROS node. This tutorial + explains how to use the teleop. advance drcsim_switch_modes/tutorial.md - How to use the BDI-provided behavior library to control the Atlas robot, and how to switch between behavior-library control and your own controller. + How to use the BDI-provided behavior library to control the Atlas robot, and how + to switch between behavior-library control and your own controller. advance drcsim_atlas_siminterface/tutorial.md - How to use the Atlas Sim Interface to command Atlas to walk dynamically or step statically. + How to use the Atlas Sim Interface to command Atlas to walk dynamically or step + statically. advance drcsim_control_sync/tutorial.md - How to setup synchronized controller updates over ROS topics by using the built-in synchronization mechanism within Atlas simulation interface AtlasPlugin + How to setup synchronized controller updates over ROS topics by using the + built-in synchronization mechanism within Atlas simulation interface AtlasPlugin advance @@ -903,7 +926,8 @@ drcsim_ros_cmds/tutorial.md - How to send joint positions to a robot in simulation through the use of a simple joint position command ROS topic publisher. + How to send joint positions to a robot in simulation through the use of a simple + joint position command ROS topic publisher. intermediate @@ -915,13 +939,17 @@ drcsim_vehicle_atlas/tutorial.md - How to automatically place the Atlas robot in the driver's seat of the DRC vehicle using ROS topics provided by the VRC plugin. Note that this is a development aid provided for testing. + How to automatically place the Atlas robot in the driver's seat of the DRC + vehicle using ROS topics provided by the VRC plugin. Note that this is a development aid + provided for testing. intermediate - + drcsim_set_joint_damping/tutorial.md - Changing Atlas and Sandia Hand Joint Viscous Damping Coefficients Over ROS Service + Changing Atlas and Sandia Hand Joint Viscous Damping Coefficients Over ROS + Service advance @@ -933,7 +961,8 @@ drcsim_bdi_examples/tutorial.md - How to start the 5-step behavior demo implemented in the Boston Dynamics Atlas Behavior library. + How to start the 5-step behavior demo implemented in the Boston Dynamics Atlas + Behavior library. intermediate @@ -947,46 +976,47 @@ set_velocity/tutorial_7.md - This tutorial describes how to programatically set velocities on links and joints + This tutorial describes how to programatically set velocities on links and + joints advanced - gazebojs_install/tutorial.md - Explains how to install the javascript NodeJs bindings to Gazebo. - advanced + gazebojs_install/tutorial.md + Explains how to install the javascript NodeJs bindings to Gazebo. + advanced - gazebojs_install_mac/tutorial.md - Explains how to install the javascript NodeJs bindings to Gazebo on OSX. - advanced + gazebojs_install_mac/tutorial.md + Explains how to install the javascript NodeJs bindings to Gazebo on OSX. + advanced - gazebojs_pubsub/tutorial.md - Explains how to write publishers and subscribers for Gazebo topics. - advanced + gazebojs_pubsub/tutorial.md + Explains how to write publishers and subscribers for Gazebo topics. + advanced - gazebojs_camera_topics/tutorial.md - Explains how to save images from Gazebo camera topics. - advanced + gazebojs_camera_topics/tutorial.md + Explains how to save images from Gazebo camera topics. + advanced - gazebojs_models/tutorial.md - Explains how to access the sdf and to get other information from Gazebo models. - advanced + gazebojs_models/tutorial.md + Explains how to access the sdf and to get other information from Gazebo models. + advanced - hydra_gzjs_pub/tutorial.md - Hydra publisher using node-sixense and GazeboJs - beginner + hydra_gzjs_pub/tutorial.md + Hydra publisher using node-sixense and GazeboJs + beginner @@ -1027,13 +1057,15 @@ haptix_tactors/tutorial.md - This tutorial describes how to craft a DIY tactor glove for experiencing simulated sensor data with real tactile feedback. + This tutorial describes how to craft a DIY tactor glove for experiencing + simulated sensor data with real tactile feedback. advanced haptix_teleop/tutorial.md - This tutorial describes how to control arm position and grasps using a keyboard, SpaceNav, or Razer Hydra. + This tutorial describes how to control arm position and grasps using a keyboard, + SpaceNav, or Razer Hydra. beginner @@ -1043,7 +1075,8 @@ beginner - + haptix_world_sim_api/tutorial.md intermediate @@ -1073,7 +1106,8 @@ - Instructions to install Gazebo on all the plaforms supported: major linux distributions and Mac (windows is still under development). + Instructions to install Gazebo on all the plaforms supported: major linux + distributions and Mac (windows is still under development). install_ubuntu install_other_linux @@ -1087,7 +1121,9 @@ - Welcome to the Gazebo tutorials! This is a great place to start, especially if you're a new Gazebo user. Each category to the left presents a collection of relevant tutorials. + Welcome to the Gazebo tutorials! This is a great place to start, especially if + you're a new Gazebo user. Each category to the left presents a collection of relevant + tutorials. quick_start components @@ -1097,7 +1133,9 @@ - The following tutorials describe how to build and modify a robot. Included are examples of building a wheeled robot, attaching sensors, attaching actuators, and animating a model. + The following tutorials describe how to build and modify a robot. Included are + examples of building a wheeled robot, attaching sensors, attaching actuators, and animating + a model. model_structure model_contrib @@ -1118,7 +1156,8 @@ - The following tutorials describe how to build and modify robots using the model editor. + The following tutorials describe how to build and modify robots using the model + editor. model_editor extrude_svg @@ -1126,7 +1165,8 @@ - These tutorials describe how to create an environment in which robots can be simulated. + These tutorials describe how to create an environment in which robots can be + simulated. build_world modifying_world @@ -1138,7 +1178,8 @@ - Gazebo ships with many tools and utilities. These tutorials describe the available tools, and how they are used. + Gazebo ships with many tools and utilities. These tutorials describe the + available tools, and how they are used. logging_playback log_filtering @@ -1147,11 +1188,14 @@ introspection profiler performance_metrics + parameter_interface_tutorial - Plugins allow you to control models, sensors, world properties, and even the way Gazebo runs. The following tutorials describe how to create and load plugins for various purposes. + Plugins allow you to control models, sensors, world properties, and even the way + Gazebo runs. The following tutorials describe how to create and load plugins for various + purposes. plugins_hello_world plugins_model @@ -1176,7 +1220,9 @@ - A simulated sensor analyzes the environment and produces a data stream that closely matches the sensor's physical counterpart. These tutorials describe how to use and modify sensors. + A simulated sensor analyzes the environment and produces a data stream that + closely matches the sensor's physical counterpart. These tutorials describe how to use and + modify sensors. sensor_noise contact_sensor @@ -1189,14 +1235,16 @@ - Gazebo has a custom math library. These tutorials describe how to use these math functions. + Gazebo has a custom math library. These tutorials describe how to use these math + functions. random_numbers - User input can take many forms, including interactions from the graphical interface and hardware devices such as joysticks. + User input can take many forms, including interactions from the graphical + interface and hardware devices such as joysticks. hydra gui_overlay @@ -1204,7 +1252,8 @@ - Player is a robot control framework. These tutorials describe how to interface Gazebo and Player. + Player is a robot control framework. These tutorials describe how to interface + Gazebo and Player. player_position player_laser @@ -1213,7 +1262,8 @@ - Gzweb is a WebGL client for Gazebo. It lets you interact with the simulation from the comfort of a web browser. + Gzweb is a WebGL client for Gazebo. It lets you interact with the simulation from + the comfort of a web browser. gzweb_install gzweb_development @@ -1221,7 +1271,8 @@ - ROS is a robot control framework. These tutorials describe how to interface Gazebo and ROS. + ROS is a robot control framework. These tutorials describe how to interface + Gazebo and ROS. ros_overview ros2_overview @@ -1242,7 +1293,9 @@ plugins_world_properties/tutorial_2-2.md plugins_world_properties/tutorial.md - Communication between the simulation server and client tools uses an advanced message passing system. These tutorials describe how to use Gazebo's message passing infrastructure. + Communication between the simulation server and client tools uses an advanced + message passing system. These tutorials describe how to use Gazebo's message passing + infrastructure. topics_subscribed custom_messages @@ -1250,7 +1303,8 @@ - A core component of Gazebo are the physics engines. These tutorials describe how to use the physics engines in order to acheive desired behavior. + A core component of Gazebo are the physics engines. These tutorials describe how + to use the physics engines in order to acheive desired behavior. friction torsional_friction @@ -1266,7 +1320,8 @@ - Gazebo's rendering library is used to generate sensor data and provide user feedback by rendering the environment state. + Gazebo's rendering library is used to generate sensor data and provide user + feedback by rendering the environment state. lightmap oculus @@ -1275,7 +1330,9 @@ - Customizing Gazebo is easy thanks to extensive documentation, tutorials, and online support. These tutorials describe how to contribute your modifications back to Gazebo. + Customizing Gazebo is easy thanks to extensive documentation, tutorials, and + online support. These tutorials describe how to contribute your modifications back to + Gazebo. tutorial_contrib contrib_code @@ -1349,4 +1406,4 @@ - + \ No newline at end of file diff --git a/parameter_interface_tutorial/tricycle.png b/parameter_interface_tutorial/tricycle.png new file mode 100644 index 00000000..5eef2356 Binary files /dev/null and b/parameter_interface_tutorial/tricycle.png differ diff --git a/parameter_interface_tutorial/tutorial.md b/parameter_interface_tutorial/tutorial.md new file mode 100644 index 00000000..c4f81bb0 --- /dev/null +++ b/parameter_interface_tutorial/tutorial.md @@ -0,0 +1,117 @@ +# Getting started with the Parameter interface in Ignition 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. + +### Motivations + +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. + +3. **Enhanced Simulation Control**: With parameters, users can control and adjust simulation aspects on the fly, such as physics properties, sensor configurations, and environmental settings, making simulations more versatile and adaptable. + +4. **Simplification of Experiments**: Researchers and developers can easily conduct a range of experiments under varying conditions without the need for multiple SDF files or complex reconfigurations. + +### Testing the Parameter Interface + +#### Prerequisites + +1. Ignition Gazebo built from source (Fortress version or newer)- instructions can be found [here](https://gazebosim.org/docs/fortress/install_ubuntu_src). + + + +#### Steps + +**Launch the Demo World**: Once built, you can launch the `trisphere_cycle_wheel_slip.sdf` demo to see the parameters in action with the following command (please source the gazebo fortress workspace which was built from source before proceeding): + + ``` + ign gazebo trisphere_cycle_wheel_slip.sdf + ``` + +After running this command you will see the following window open: +![Tricycle Demo](tricycle.png) + +### Utilizing Parameters + +With the simulation running, you can interact with the simulation parameters in a separate terminal. Please make sure you source the gazebo fortress workspace which was built from source in the terminal terminal each time before running the commands. + +1. **Listing Available Parameters**: + + ``` + ign param -r /world/wheel_slip -l + ``` + + Expected output: + + ``` + systems.wheel_slip.trisphere_cycle1.wheel_front [ignition.msgs.WheelSlipParameters] + systems.wheel_slip.trisphere_cycle1.wheel_rear_right [ignition.msgs.WheelSlipParameters] + systems.wheel_slip.trisphere_cycle0.wheel_rear_right [ignition.msgs.WheelSlipParameters] + systems.wheel_slip.trisphere_cycle1.wheel_rear_left [ignition.msgs.WheelSlipParameters] + systems.wheel_slip.trisphere_cycle0.wheel_rear_left [ignition.msgs.WheelSlipParameters] + systems.wheel_slip.trisphere_cycle0.wheel_front [ignition.msgs.WheelSlipParameters] + + ``` + + This command lists all parameters available in the `wheel_slip` world, showing their names and types. + +2. **Getting a Parameter Value**: + + ```sh + ign param -r /world/wheel_slip -g -n systems.wheel_slip.trisphere_cycle1.wheel_front + ``` + + Here, we fetch the current values of the `wheel_front` parameter for `trisphere_cycle1`, including `slip_compliance_lateral` and `slip_compliance_longitudinal`. + + Expected output: + + ``` + slip_compliance_lateral: 1 + slip_compliance_longitudinal: 1 + ``` + +3. **Setting a Parameter Value**: + + ```sh + ign param -r /world/wheel_slip -s -n systems.wheel_slip.trisphere_cycle1.wheel_front -t ign_msgs.WheelSlipParameters -m + "slip_compliance_lateral: 1 + slip_compliance_longitudinal: 2" + ``` + + Expected output: + + ``` + Parameter successfully set! + ``` + +4. **Get the systems.wheel_slip.trisphere_cycle1.wheel_front parameter again, its value should have changed**: + + ``` + ign param -r /world/wheel_slip -g -n systems.wheel_slip.trisphere_cycle1.wheel_front + ``` + + Expected Output: + + ``` + slip_compliance_lateral: 1 + slip_compliance_longitudinal: 2 + ``` + +This adjusts the wheel slip parameters, demonstrating the dynamic reconfiguration capabilities provided by the new parameter interface. + +### Summary of Features + +- Systems can declare parameters using the ignition::gazebo::DeclareParameter() helper function. +- Parameters can be introspected or set from external processes through three services provided by the Parameters system: + - ```/world//list_parameters service```: List available parameters names and types. + - ```/world//get_parameter service```: Get the type and value of a parameter. + - ```/world//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. + + +### 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).