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

How to provide same parameter for multiple nodes using parameter file

asked 2022-07-14 15:56:15 -0600

Flash gravatar image

updated 2022-07-14 15:57:53 -0600

Hi, I was writing a parameter file for multiple nodes and was wondering if I can pass the same parameter for multiple nodes without me specifically mentioning it in the parameters list of each node. like

lidar_data:
  ros__parameters:
    robot_name: "BOT02/"


gpio_reader:
  ros__parameters:
    robot_name: "BOT02/"


gpio_writer:
  ros__parameters:
    robot_name: "BOT02/"

Over here I have passed robot_name to each node and in the future, if I want to change the name I have to replace it for each node. Is there something like declaring on the top of the parameter file like we do with packages and that variable is passed on wherever is required?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-07-14 19:33:17 -0600

BlakeAnderson gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-07-14 15:56:15 -0600

Seen: 446 times

Last updated: Jul 14 '22