0
$\begingroup$

Rosanswers logo

I'm playing back data from a rosbag file and I want to view the entire NMEA "GGA" sentence in real-time. However, when I try to enlarge the play-back window I get this:

image description

The end of the sentence is cut off and replaced with "..." even though there is plenty of room in the window to print the whole message. Does anyone know how to force rqt_bag to display the whole sentence? It seems like a bug with rqt_graph.

Before anyone suggests it, I can't view the sentence by publishing the it because of an unrelated problem.


Originally posted by M@t on ROS Answers with karma: 2327 on 2016-05-01

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Problem: When playing back a bag file in rqt_bag some data values (such as NMEA sentences) are cut off after a certain length, even if the window is expanded so that there is plenty of room for the full value to be displayed eg:

image description

Cause: rqt_bag automatically truncates displayed data after 50 characters, regardless of window space.

Solution: A work-around is to edit the raw_view.py file in rqt_bag's source files to change the truncation limit. But before you make any changes, clone rqt_bag into your workspace so you have a safe version to work on. The file path should be similar to:

~/rqt_bag/plugins/raw_view.py

Then, open raw_view.py in any python editor and look for the following code segment:

# Truncate long representations
if len(obj_repr) >= 50:
    obj_repr = obj_repr[:50] + '...'

Change both "50" entries to be any larger number you want (e.g. 100) and then save the file. Open rqt_bag, load your rosbag and the problem should be fixed:

image description


Originally posted by M@t with karma: 2327 on 2016-05-03

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Martin Günther on 2016-05-04:
Actually, I think it's /opt, not ~/opt. And you should never modify files in /opt. Instead, clone rqt_bag into your catkin workspace and make the modifications there.

Comment by M@t on 2016-05-04:
Sorry, you're quite right, thanks for the corrections!

$\endgroup$

Your Answer

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