How to run rviz2 with own settings in .rviz from launch file which refers to my my package via arguments = ["-d", "$(find my_package)/rviz/my.rviz"]
Hello! As in question. How to run rviz2
with my own settings saved in .rviz
from the launch file which refers to my_package
by name? I can add that when I refer to the .rviz file using its absolute path, it works.
The following launches rviz2 but without own settings:
my_rviz2 = Node(package = "rviz2",
executable = "rviz2",
arguments = ["-d", "$(find my_package)/rviz/my.rviz"]
)
ld = LaunchDescription()
ld.add_action(declare_use_sim_time_argument)
ld.add_action(declare_params_file_cmd)
ld.add_action(log_param_change)
ld.add_action(my_rviz2)
return ld