How to launch rviz with config outside ros package?
Hi,
I want to write a launch file to launch rviz, given a config file from a certain path. This is a similar question to link , but the config file is not in a ROS package. Instead I want to achieve something like:
<launch>
<node type="rviz" name="rviz" pkg="rviz" args="-d ~/config.rviz" />
</launch>
But the config file cannot be read correctly. However, if I call rviz -d ~/config.rviz
, it works as expected. I am quite confused regarding the functionalities of roslaunch...
The reason of writing this launch file is that I want to include this launch file from other launch files...
I will appreciate any help of yours,
Thank you!
Best, Bruce.
that's because you expect
~
to be resolved to$HOME
, and eventually to the absolute path to your home directory.However,
~
only means something to Bash. It's the responsibility of Bash to replace~
with an actual path, notroslaunch
. Soroslaunch
will not do that, and RViz is then passed a path it cannot find.