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

Set RViz laserscan decay time

asked 2013-02-25 02:17:30 -0600

Josch gravatar image

updated 2013-02-27 02:29:16 -0600

I am writing an RViz plugin which allows the user to play rosbags and also let's him pause the playing. The problem with pausing is that the decay time is still the same, so pointcloud data will exceed the decay time even if they should stay while the playing is paused.

There is a RViz display plugin tutorial, but it only describes how to create new displays.

Does anybody know how to programmatically change the decay time of this display? Or is there another possibility to hold the current message?

EDIT: I need this node to work on fuerte and Ubuntu 12.04 LTS.

edit retag flag offensive close merge delete

Comments

I don't get your edit; the rqt is available for fuerte.

felix k gravatar image felix k  ( 2013-03-01 02:39:33 -0600 )edit

Thank you for your answer. I thought it's only available on groovy. At the moment some other functions are more important, but I will come back to your answer the next week. I hope you're still open for questions then, if neccessary :-).

Josch gravatar image Josch  ( 2013-03-01 02:59:09 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-03-13 03:21:32 -0600

Josch gravatar image

I've just found another method to set the display parameters: In your plugin class override onInitialize() (it doesn't need to do anything, just override it). This will allow you to access a VisualizationManager instance via vis_manager_. The VisualizationManager contains several useful instances, like a ViewController and all the displays you are working with. You can then get the required display and change parameters. If you have any other questions, feel free to ask.

edit flag offensive delete link more
1

answered 2013-02-27 01:48:45 -0600

felix k gravatar image

updated 2013-03-04 03:13:14 -0600

Have you considered using the new ROS GUI RQT with a RViz and a Bag plugin? Your question might be valid though.

Have you tried using the --clock option for rosbag play? More info for clock.

Set the /use_sim_time parameter and then start RViz etc. (rosbag with --clock). RViz does obey this. If the laser decay time does not, please file that as an issue.

edit flag offensive delete link more

Comments

I just tried RQT, but it's not showing my LaserScan data unfortunately. And I still don't really understand how I can change the decay time through RQT. Could you explain that?

Josch gravatar image Josch  ( 2013-03-03 22:13:49 -0600 )edit

RQT just loads RViz as a subwindow, it should open your default config. The decay time is still in the Laser Display options. Does RViz show any warning or error? Check with rxgraph if and for which topics rosbag and rviz are connected. If you mean how to enable --clock for RQT-bag... I don't see it

felix k gravatar image felix k  ( 2013-03-03 23:39:16 -0600 )edit

I think it's not clear enough what the problem is. The rosbag plays perfectly fine on RViz. But as soon as I pause the rosbag play process, the last published message will disappear due to the decay time. What I want to do is set the decay time programmatically. How can RQT help me doing that?

Josch gravatar image Josch  ( 2013-03-04 00:09:17 -0600 )edit

--clock only makes rosbag publish the timestamp of each message. How does this help showing the messages? :-) RQT is showing the Laserscan data now, but that is offtopic anyway. Thanks for helping though

Josch gravatar image Josch  ( 2013-03-04 00:10:39 -0600 )edit
1

Answer updated, hope this helps.

felix k gravatar image felix k  ( 2013-03-04 03:13:54 -0600 )edit

Aaaaaaah, now I get it :-). Thank you very much, that really helped! Now a final question: Is there a way to clear the screen after rosbag has played?

Josch gravatar image Josch  ( 2013-03-04 19:38:49 -0600 )edit
1

I'm no RViz dev, but never saw something that simulates the reset button (except for markers). You could code that, send 'invisible' message for every topic, simply close and restart rviz (loosing display adjustments) or provoke the reset with emulated window controls (in descending coolness order).

felix k gravatar image felix k  ( 2013-03-05 01:29:23 -0600 )edit

Okay thanks, I guess that is not worth the effort right now, but i'll keep it in mind.

Josch gravatar image Josch  ( 2013-03-05 01:42:56 -0600 )edit

Question Tools

Stats

Asked: 2013-02-25 02:17:30 -0600

Seen: 2,074 times

Last updated: Mar 13 '13