Ask Your Question
1

Run RViz with configuration file from .launch file

asked 2018-04-05 10:01:10 -0500

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-04-05 10:14:30 -0500

gvdhoorn gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-04-05 10:01:10 -0500

Seen: 7,327 times

Last updated: Apr 05 '18