0
$\begingroup$

Rosanswers logo

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.


Originally posted by Josch on ROS Answers with karma: 230 on 2013-02-25

Post score: 2


Original comments

Comment by felix k on 2013-03-01:
I don't get your edit; the rqt is available for fuerte.

Comment by Josch on 2013-03-01:
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 :-).

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by felix k with karma: 1650 on 2013-02-27

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Josch on 2013-03-03:
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?

Comment by felix k on 2013-03-04:
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

Comment by Josch on 2013-03-04:
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?

Comment by Josch on 2013-03-04:
--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

Comment by felix k on 2013-03-04:
Answer updated, hope this helps.

Comment by Josch on 2013-03-04:
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?

Comment by felix k on 2013-03-05:
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).

Comment by Josch on 2013-03-05:
Okay thanks, I guess that is not worth the effort right now, but i'll keep it in mind.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Josch with karma: 230 on 2013-03-13

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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