Set the QoS parameters of ROS2(galactic) by command line

Dear all,

I use Jetson Xavier.

Host OS Jetpack R32.4.3

The Docker run on the Xavier.

Docker image: jetson-containers dustynv/ros:galactic-ros-base-l4t-r32.4.4

I want to set QoS parameters by command line.

But it set fail.

Could you give me suggestion?

Following are my test steps on Docker.

Creat a yaml file : demo_params.yaml

root@nvidia-desktop:/home/nvidia/workspace# cat demo_params.yaml 
/talker:
  ros__parameters:
    qos_overrides:
      /parameter_events:
        publisher:
          depth: 5
          durability: volatile
          history: keep_last
          reliability: best_effort
    use_sim_time: false

set QoS parameters by yaml file

root@nvidia-desktop:/home/nvidia/workspace# ros2 run demo_nodes_cpp talker __params:=demo_params.yaml
[INFO] [1657011523.551291089] [talker]: Publishing: 'Hello World: 1'
[INFO] [1657011524.551193044] [talker]: Publishing: 'Hello World: 2'
....

Open another terminal to watch QoS parameters

root@nvidia-desktop:/home/nvidia/workspace# ros2 param dump /talker 
Saving to:  ./talker.yaml
root@nvidia-desktop:/home/nvidia/workspace# cat talker.yaml 
/talker:
  ros__parameters:
    qos_overrides:
      /parameter_events:
        publisher:
          depth: 1000
          durability: volatile
          history: keep_last
          reliability: reliable
    use_sim_time: false
root@nvidia-desktop:/home/nvidia/workspace#

Question:

The reliability no change to “best_effort”.

The depth no change to 5.

Why new QoS parameters set fail?

Best regards

-Jason

Hi @jason.tseng914, I’m not very familiar with setting QoS in ROS2, so you may want to post your question to the ROS Discourse.

My only guess is that I set the ROS2 RWM implementation to cyclone_dds in the Dockerfile here: https://github.com/dusty-nv/jetson-containers/blob/be0dca3d19b30e64d129c92e93425c9ede40d65f/Dockerfile.ros.galactic#L202

I would think Cyclone DDS supports QoS, but again I’m not familiar with those details, sorry about that. You could try changing the RWM implementation and see if that changes the behavior.

Dear Dusty_nv,

Thank you about your suggestion.
The ROS2(galactice) always rmw_cyclonedds_cpp on my docker image.
I follow your suggestion.
I post the question to ROS Discourse.

Best regards

-Jason

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.