-d option with rviz

1,020 views
Skip to first unread message

Cactus Jack

unread,
Apr 2, 2015, 7:31:55 AM4/2/15
to ros-by-...@googlegroups.com
When I try to use the -d option with rviz, rviz opens up, but the extension after the -d will not pull up.  Do you have to alter any settings to get this to work?

Cactus

Davide Picchi

unread,
Apr 2, 2015, 8:46:21 AM4/2/15
to ros-by-...@googlegroups.com
Can you write the whole line of code????
What are the other inputs?

2015-04-02 13:31 GMT+02:00 'Cactus Jack' via ros-by-example <ros-by-...@googlegroups.com>:
When I try to use the -d option with rviz, rviz opens up, but the extension after the -d will not pull up.  Do you have to alter any settings to get this to work?

Cactus

--
You received this message because you are subscribed to the Google Groups "ros-by-example" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-by-exampl...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-by-example.
For more options, visit https://groups.google.com/d/optout.

B Lamb

unread,
Apr 2, 2015, 10:03:52 AM4/2/15
to ros-by-...@googlegroups.com
This would be a good example:
rosrun rviz rviz -d `rospack find turtle_tf`/rviz/turtle_rviz.rviz

It starts rviz, but it doesn't set the turtle tf configuration.

Cactus



You received this message because you are subscribed to a topic in the Google Groups "ros-by-example" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ros-by-example/j4Nc0roWAl0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ros-by-exampl...@googlegroups.com.

Patrick Goebel

unread,
Apr 2, 2015, 10:36:25 AM4/2/15
to ros-by-...@googlegroups.com
Hi Cactus,

This usually means that your configuration file cannot be found.  RViz won't complain with an error, it will just come up with its default settings.  So double check your package name and the path to your config file like this:

$ roscd turtle_tf/rviz
$ ls -l turtle_rviz.rviz

If the first command returns a "no such package" or "no such file" then you don't have the turtle_tf package installed or the subdirectory "rviz" does not exist.  You can install the turtle_tf package under ROS Hydro using the command:

$ sudo apt-get install ros-hydro-turtle-tf
$ rospack profile

If the first command succeeds but the second command yields a "file not found error", then the config file does not exist or you have a typo in the name.

--patrick

B Lamb

unread,
Apr 3, 2015, 7:28:51 AM4/3/15
to ros-by-...@googlegroups.com
Hi Patrick,
This is what I get when I run roscd turtle_tf/rviz:

/opt/ros/hydro/share/turtle_tf/rviz$

I can launch rviz, and find the configuration file that I want to run in rviz and open it up and it works.

Here is a good example of the problem:
rospack find rbx1_nav
returns  /home/cactus/catkin_ws/src/rbx1/rbx1_nav

but when I run rospack find rbx1_nav /sim.rviz
nothing happens, yet I know that sim.rviz is in the rbx1_nav directory.

Thanks for your help

Patrick Goebel

unread,
Apr 3, 2015, 2:32:31 PM4/3/15
to ros-by-...@googlegroups.com
The "rospack find" command only finds package names and not files within those packages.  That's why we have to use the backquotes to separate the package name from the path to a file in that package.  For example, to start RViz with the file sim.nav in the rbx1_nav package, we would use the command:

$ rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz

The part in backquotes, `rospack find rbx1_nav` first finds the package rbx1_nav, the resulting full path is silently substituted into the command at the point and the path /sim.rviz is tacked on the end to complete the full path to the file.

Hope that helps.

--patrick
Reply all
Reply to author
Forward
0 new messages