ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The steps that I have taken generally are:

Steps:

  1. Create yaml file with params and place in appropriate directory.
  2. Load yaml file in the launch file, and pass params to parameters argument in ComposableNode constructor.
  3. Declare the parameters in the class constructor of your node object.
  4. Get the parameters before using in your program.

You can use a ROS 2 (eloquent) package, ros2_ipcamera, I created as a specific working example:

The numbering below is associated with the steps above.

  1. see /config/ipcamera.yaml
  2. see /launch/ipcamera.launch.py
  3. and 4. see /src/ipcamera_component.cpp

Reading through the discussion associated with issue #715 was informational as well.