rosapi.params module

async rosapi.params.delete_param(node_name, name, params_glob)

Delete a parameter in a given node.

async rosapi.params.get_param(node_name: str, name: str, params_glob: str) str

Get a parameter from a given node.

async rosapi.params.get_param_names(params_glob: str | None) list[str]
async rosapi.params.has_param(node_name: str, name: str, params_glob: str) bool

Check whether a given node has a parameter or not.

rosapi.params.init(node: Node, timeout_sec: float = 5.0)

Initialize params module with a rclpy.node.Node for further use.

This function has to be called before any other for the module to work.

Parameters:
  • node (Node) – The rclpy node to use for service calls.

  • timeout_sec (float | int, optional) – The timeout in seconds for service calls.

Raises:

ValueError – If the timeout is not a positive number.

async rosapi.params.set_param(node_name: str, name: str, value: str, params_glob: list[str])

Set a parameter in a given node.