ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Stdr and RViz

asked 2018-02-09 19:46:22 -0600

pitosalas gravatar image

updated 2018-02-10 16:45:42 -0600

My understanding: STDR provides a simulator of a 2d Robot and it's environment (map). Which means that it listens for variations of cmd_vel and moves an imaginary robot on a simulated field. The field can have obstacles, and this imaginary robot will not be able to power through the walls. Presumably you can cmd_vel all you like and your odom will tell you that you've not moved.

Separate but connected, STDR also lets me visualize the map and the robot to allow me to see what's going on. And I can create more robots and give them different sensors all that will publish on the expected Topics.

Did I get that right?

So my question is then: Why does Stdr have a GUI and still sometimes we use it with RViz? In other words, why would you need RViz when using Stdr? I am sure this question comes from my not quite understanding what RViz does and it's relationship with other packages.

Followup based on response below:

"It's just that it's a nice tool to render the dataflows running through your application in context (ie: their spatial and temporal relationships) in a 3D world." -- I thought RViz just did 2d?

In general I am not exactly clear yet what RViz displays that STDR gui does not. The map is from the same /map service and the robots position, orientation, and sensor displays are the same aren't they? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-10 02:57:47 -0600

gvdhoorn gravatar image

updated 2018-02-10 07:53:33 -0600

Why does Stdr have a GUI [..]

Because it's convenient to be able to verify that your robot's internal state (ie: the data it publishes on topics and uses for its control algorithms (in the broadest sense)) has some correspondance (ie: makes sense) to the 'real world', which is what STDR is simulating.

and [why do] we use it with RViz?

Because for humans it's infinitely easier to assess whether the internal state of your robot makes sense by looking at a 3D graphical representation than by looking at raw msg contents streamed onto a console by something like rostopic echo ...

In other words, why would you need RViz when using Stdr?

You don't need to use RViz at all. It's just that it's a nice tool to render the dataflows running through your application in context (ie: their spatial and temporal relationships) in a 3D world.

I am sure this question comes from my not quite understanding what RViz does and it's relationship with other packages.

RViz doesn't really have a relationship with other packages. You can use ROS and have a robot be completely controlled by ROS without ever touching or using RViz.

You would probably be missing out on a great visual debugging tool and one of the easier ways to get an insight into what your robot is doing though. And all 'for free', as RViz is just one other subscriber to the data that gets published by your nodes anyway.

Finally, in this particular context -- which is not unique to STDR, but would seem to be similar to RViz+Gazebo, RViz+V-REP, etc -- the idea is that the simulator is only a stand-in for a real robot. There is no 'GUI' for your real robot or the real world. Considering this, having RViz running next to your simulator doesn't seem so redundant any more I believe.


Edit:

I thought RViz just did 2d?

No. RViz is a full 3D rendering application. See this video (old, but it shows RViz' capabilities well). It's just that in a lot of navigation setups, it's used with its top-down view, which makes it look like it's 2D.

In general I am not exactly clear yet what RViz displays that STDR gui does not. The map is from the same /map service and the robots position, orientation, and sensor displays are the same aren't they?

Again, that may be true for this particular setup, but is not true in general (especially not when you replace your simulator with the real world).

RViz shows you the world as your robot 'sees' it (or: as your nodes publish their messages). Your simulator GUI shows you the internal state of the simulator.

Those two do not necessarily have to be identical.

RViz is a generic tool, it's not limited to use with STDR.

edit flag offensive delete link more

Comments

See extended question in original post please. Thanks!

pitosalas gravatar image pitosalas  ( 2018-02-10 07:48:13 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-09 19:46:22 -0600

Seen: 694 times

Last updated: Feb 10 '18