0
$\begingroup$

Rosanswers logo

Hi everyone!

I was wondering if there is any way you can open rviz from a launch file while openning a custom configuration. The terminal command would be:

rosrun rviz rviz -d `rospack find package_name`/rviz/config_file.rviz

Thank you!


Originally posted by alextac98 on ROS Answers with karma: 113 on 2018-04-05

Post score: 5

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes:

<launch>
  <node type="rviz" name="rviz" pkg="rviz" args="-d $(find package_name)/rviz/config_file.rviz" />
</launch>

Note that this is the same approach you would use for any program / node that accepts command line arguments. Doing it in a launch file just allows you to use the find substitutation command.


Originally posted by gvdhoorn with karma: 86574 on 2018-04-05

This answer was ACCEPTED on the original site

Post score: 24

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.