ros-visualization / rqt_bag Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://wiki.ros.org/rqt_bag
Home Page: http://wiki.ros.org/rqt_bag
From @ablasdel on January 8, 2013 21:31
Now that we have the new Point Cloud Library (PCL), it would be great if you could store a cloud to disk by clicking on the some pop up associated with point clouds
To download a rxbag plugin to display point clouds see the trac ticket
https://code.ros.org/trac/ros/ticket/2525
change history from trac (copy pasted on Jan 8 2013):
Changed 3 years ago by tfield
status changed from new to assigned
milestone ROS 1.1 deleted
Sure, that shouldn't be difficult. Can you suggest a good format to dump them to disk?
Changed 3 years ago by tfield
I'm hazarding a guess that pcl's PCD format is what you want. Is that correct?
Changed 3 years ago by tfield
status changed from assigned to closed
resolution set to wontfix
Assuming this is no longer required.
Changed 22 months ago by jcorrea
status changed from closed to reopened
resolution wontfix deleted
Although PCD is the format to save point cloud provided by PCL library, rxbag lacks the ability so save, or view, point clouds. It would be very desirable to have such feature present.
Changed 22 months ago by tfield
This is possible. I wrote code recently to serialize PointCloud2 messages in Python. Theoretically, wxPython includes PyOpenGL but I'd need to check how good it is and its cross-platform support.
Changed 22 months ago by jcorrea
Maybe using VTK for displaying? I may give it a try, but after next week, right now I don't have much time left.
For serializing, I think the best approach would be to try and use PCL, as they already have saving to PCD files.
Changed 22 months ago by tfield
No need to pull in a huge framework like VTK to display point clouds - it's very simple to write a shader to do that.
Also, no need to use PCL - I've already implemented PointCloud2 serialization natively in Python. As far as I'm aware, PCL doesn't have Python bindings anyway.
Changed 10 months ago by tfield
owner changed from tfield to gerkey
status changed from reopened to new
Changed 6 months ago by jcorrea
attachment rxbag_pointcloud_plugin.tar.bz2 added
RxBag? plugin to display pointclouds
Changed 6 months ago by jcorrea
I've attached a plugin for RXBAG that displays pointclouds. It uses matplotlib and probably is not the most optimum approach.
Changed 4 minutes ago by ablasdel
status changed from new to closed
resolution set to duplicate
The replacement to rxbag in groovy is rqt_bag. It is a port of rxbag and has almost the same plugin api. Please see the github ticket created for this issue here for further information:
Copied from original issue: ros-visualization/rqt_common_plugins#7
If you want to load one bag then an other but don't end with with the two bag files in the same timeline right now the only option is to close rqt_bag
and open the second bag file.
It would be nice to be able to reset the timeline and load the bag as the only one in the timeline.
But we need to keep the possibility to load and append a bag file.
Since we are fixing issues... I thought I might as well add another :) Saw it while reviewing PRs.
There is something different about how the last 4 buttons in the GUI are created, that makes them display differently from the other buttons. The size is wrong, and the icons on them simply don't show up.
This is the first thing that comes up upon running rqt_bag
, so it's super noticeable.
I assume it has to do with HiDPI displays, since on the Wiki page, the screenshots look normal.
To reproduce, on a HiDPI display:
$ rosrun rqt_bag rqt_bag
Notice how the last 4 buttons are very large and blank:
If I do this trick, which is an environment variable that tells Qt to rescale windows and make them appear more normal on a HiDPI display, then the button sizes are right, but they are still blank (icons don't show up):
$ export QT_AUTO_SCREEN_SCALE_FACTOR=1
Not sure if this counts as enhancement or bug.
Reproducable rqt_bag crash
rqt_bag any_rosbag.bag
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/mat_data_plot.py", line 107, in resizeEvent
self.figure.tight_layout()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 1755, in tight_layout
self.subplots_adjust(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 1620, in subplots_adjust
self.subplotpars.update(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 232, in update
raise ValueError('bottom cannot be >= top')
From @trainman419 on March 30, 2015 17:28
Found when testing and reviewing #306 and #307:
If I open a plot view for a topic, close it, and reopen it, the plot view now contains two copies of every UI element.
I suspect this is because the layout isn't properly cleared out when the Widget is reopened, and in the past this has been masked by #306.
Copied from original issue: ros-visualization/rqt_common_plugins#309
The version of PyQt on Ubuntu 22.04 is 5.15.6, and it is a lot more picky about the types being passed into API calls. In particular, trying to pass in float values to API calls like setPointSize(self, int)
result in an exception now. We've fixed some of these, but more need to be fixed. See #108 for more information.
From @chuck-h on April 10, 2015 22:6
plot_view has a single member, self.bag, and uses bag.read_messages(). It seems this would want to change to something based on timeline.get_entries()?
Copied from original issue: ros-visualization/rqt_common_plugins#310
To make clear: This is more of a feature request than an issue.
It would be very handy to have the ability to graphically select a subset of topics and a time span and then to be able to save such a selection as a new bag file.
This functionality can be mimicked by replaying a bag file and performing a rosbag record with the necessary parameters, but this is cumbersome and not as clean as stripping unneeded parts from a rosbag.
Best regards
Prior to ros-visualization/qt_gui_core#250 being merged, icons didn't work at all on Linux. Once that PR is merged, icons work for the most part, but there are a few missing in rqt_bag (see the attached file for a screenshot).
From the tooltips, these missing icons look like "Zoom In", "Zoom Out", "Zoom Home", and "Toggle Thumbnails"
There is an issue in
rqt_bag/plugins/raw_view.py
and
rqt_bag_plugins/plot_view.py
regarding PEP 0237.
Python 3 handles long data types as an int, long is therefore not available:
Traceback (most recent call last): File "/opt/ros/melodic/lib/python3.7/site-packages/rqt_bag/plugins/message_view.py", line 92, in event self.message_viewed(bag, msg_data) File "/opt/ros/melodic/lib/python3.7/site-packages/rqt_bag/plugins/raw_view.py", line 65, in message_viewed self.message_tree.set_message(msg) File "/opt/ros/melodic/lib/python3.7/site-packages/rqt_bag/plugins/raw_view.py", line 103, in set_message self._add_msg_object(None, '', '', msg, msg._type) File "/opt/ros/melodic/lib/python3.7/site-packages/rqt_bag/plugins/raw_view.py", line 186, in _add_msg_object if type(obj) in [int, long, float]: NameError: name 'long' is not defined
The error is printed from a call to rqt_bag_plugins.image_helper.imgmsg_to_pil
, but I don't know if the cause is in this package or somewhere deeper in the actual image conversion, because I see different behavior in Melodic and Noetic while compiling from the same commit hash.
Version: commit hash 3beb083
Platforms: Ubuntu 18.04 + Melodic vs. Ubuntu 20.04 + Noetic
To reproduce:
In rqt_bag
, load a rosbag containing message type sensor_msgs/CompressedImage
. Toggle thumbnail on.
In Melodic, image thumbnails are displayed. No messages are printed in the terminal.
In Noetic, no image thumbnails are displayed. These messages are printed in the terminal
Can't convert image: initial_value must be str or None, not bytes
Disabling renderer on /camera/color/image_raw/compressed
That topic is a sensor_msgs/CompressedImage
.
From @ablasdel on April 21, 2015 3:12
It would be nice if you could get multiple topics in the same plugin graph for correlation.
Copied from original issue: ros-visualization/rqt_common_plugins#312
From @bricerebsamen on November 14, 2015 2:37
that would be very useful for scripts that call rqt_bag
--publish-all
--publish topic1,topic2
--no-publish topic1,topic2
just implementing the publish-all
would be awesome
Copied from original issue: ros-visualization/rqt_common_plugins#346
In Python 3,
Line no: 52 pil_img = Image.open(StringIO(img_msg.data))
fails..
It works when using BytesIO
from io
module
Line no: 35 from io import BytesIO
Line no: 52 pil_img = Image.open(BytesIO(img_msg.data))
I am trying to view a set of images from my BAG files however I am seeing the following in the console:
Can't convert image: Unsupported image format: yuv422
Is there a plugin available to handle this format?
Since a week or so, I cannot start rqt_bag:
$ rqt_bag
Traceback (most recent call last):
File "/opt/ros/kinetic/bin/rqt_bag", line 5, in <module>
from rqt_bag.bag import Bag
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag.py", line 39, in <module>
from .bag_widget import BagWidget
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_widget.py", line 40, in <module>
from python_qt_binding.QtCore import Qt, qInfo, qWarning, Signal
ImportError: cannot import name qInfo
Also reported here:
https://answers.ros.org/question/274739/rqt_bag-cannot-import-name-qinfo/
This happened after a system update
$ dpkg -l | grep rqt_bag
ii ros-melodic-rqt-bag 0.4.12-0bionic.20180522.045045 amd64 rqt_bag provides a GUI plugin for displaying and replaying ROS bag files.
ii ros-melodic-rqt-bag-plugins 0.4.12-0bionic.20180522.162523 amd64 rqt_bag provides a GUI plugin for displaying and replaying ROS bag files.
I can open a bag file but I cannot see any contents inside:
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/timeline_cache.py", line 74, in run
msg_stamp, item = self.loader(topic, stamp, item_details)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag_plugins/image_timeline_renderer.py", line 160, in _load_thumbnail
msg_topic, msg, msg_stamp = bag._read_message(pos)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 1299, in _read_message
return self._reader.seek_and_read_message_data_record(position, raw)
TypeError: seek_and_read_message_data_record() takes exactly 4 arguments (3 given)
Exception in thread Thread-15:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/message_loader_thread.py", line 83, in run
msg_data = self._get_message(bag, playhead_position)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/message_loader_thread.py", line 96, in _get_message
msg_data = self.timeline.read_message(bag, position)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/bag_timeline.py", line 481, in read_message
return bag._read_message(position)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 1299, in _read_message
return self._reader.seek_and_read_message_data_record(position, raw)
TypeError: seek_and_read_message_data_record() takes exactly 4 arguments (3 given)
In the GUI:
rqt_bag
Example bag file:
http://wiki.ros.org/ethzasl_sensor_fusion/Tutorials/getting_started?action=AttachFile&do=view&target=dataset.bag
abner@abner-XPS-8700:~/bagfiles$ rqt_bag nsh_indoor_outdoor.bag
Traceback (most recent call last):
File "/opt/ros/kinetic/bin/rqt_bag", line 5, in <module>
from rqt_bag.bag import Bag
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag.py", line 39, in <module>
from .bag_widget import BagWidget
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_widget.py", line 40, in <module>
from python_qt_binding.QtCore import Qt, qInfo, qWarning, Signal
My ros is kinetic and system is Ubuntu 16.04.
I remember that I had encountered before, but also solved. I modified a few words of a file about QT to fix the error. But now I can not find the URL for that solution, and I forget how to fix it.
Using a recent ROS Rolling packaging job, rqt_bag makes rqt slow and unresponsive after ceasing to record.
Start a launch file with data to record
ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.py
Click the red record icon on rqt_bag
Select /joint_states
for recording.
Wait a few seconds for it to record data (it's also slow to start).
Click the red record icon on rqt_bag again to stop recording.
The whole rqt window becomes very slow to repond. A good way to see this is to add rqt_plot
and try to display /joint_states/position[0]
- it will update very very slowly.
From @gdlg on March 8, 2016 20:11
Hi,
rqt_bag treats latched topics as if they were not latched. This is the case both for recording and playing a bag file. In constrast, both recording and playing work as expected with rosbag.
I attached two .bag files to this report. test_rosbag.bag was recorded with "rosbag record" and contains information about latched topic. test_rqt_bag.bag was recorded with rqt_bag and misses the information.
Each .bag has two example topics:
/chatter_no_latch
sends one message every 100ms;/chatter_latch
sends one latched message at the beginning. The topic is only latched in the rosbag version (since rqt_bag ignores the latch flag).Here is the connection info header as seen in the function rosbag.bag._BagReader200.seek_and_read_message_data_record:
for test_rqt_bag.bag:
{u'topic': '/chatter_no_latch', u'message_definition': 'string data\n\n', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'type': 'std_msgs/String'}
and for test_rosbag.bag:
{u'message_definition': 'string data\n', u'callerid': '/talker', u'latching': '0', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'topic': '/chatter_no_latch', u'type': 'std_msgs/String'}
I wrote a quick fix in Jade to replay latched topics correctly (I didn't look at the recording issue). Unfortunately this is slightly complicated because the latch flag is not directly available through the Python interface of rosbag.bag. I am not sure how to proceed. I assume that I should open an issue for ros/ros_comm to add latch support to its interface before landing any fix to rqt_bag itself.
Thank you
Copied from original issue: ros-visualization/rqt_common_plugins#357
line 90:
if pil_mode == 'I;16':
should be:
if pil_img.mode == 'I;16':
When trying to visualize a bag file using rqt_bag, it showed this error :
rqt_bag /disk/XXX.bag
Traceback (most recent call last):
File "/home/user/roslib/devel/bin/rqt_bag", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/kuser/roslib/src/rqt_bag/rqt_bag/scripts/rqt_bag", line 5, in
from rqt_bag.bag import Bag
File "/home/user/roslib/src/rqt_bag/rqt_bag/src/rqt_bag/bag.py", line 37, in
from qt_gui.plugin import Plugin
ImportError: No module named qt_gui.plugin
Ubuntu : 18.04
ROS : melodic
packages were built through catkin build command.
From @alex-gee on February 26, 2015 17:10
This issue is that i use
OuterMessage:
Header header
ClusterMsg[] clusters
ClusterMsg:
uint8[] indices
string label
But the content inside the raw view looks like in the image.
If i play the bagfile and listen with "rostopic echo /labels" i can see that the array is filled correctly
Update: The problem could be the "uint8". Apparently there is some cast to (int) missing before calling the print function.
greetings!
Copied from original issue: ros-visualization/rqt_common_plugins#305
From @DLu on August 12, 2015 18:11
I believe with rxbag you could just open bag files to examine them without a core. However, rqt_bag requires a core, even without trying to publish anything.
Copied from original issue: ros-visualization/rqt_common_plugins#332
Latest master, 0.5.1, 0.5.0, and most probably prior versions too
When canceling on loading a bag (i.e., not selecting a bag to load) the code errors out:
Traceback (most recent call last):
File "/home/moslemk/projects/catkin_ws/src/rqt_bag/rqt_bag/src/rqt_bag/bag_widget.py", line 283, in _handle_load_clicked
self._timeline._timeline_frame._layout()
File "/home/moslemk/projects/catkin_ws/src/rqt_bag/rqt_bag/src/rqt_bag/timeline_frame.py", line 392, in _layout
new_history_bottom = max([y + h for (_, y, _, h) in self._history_bounds.values()]) - 1
ValueError: max() arg is an empty sequence
This happens due to trying to get the layout updated with no values due to invalid (none) filename:
rqt_bag/rqt_bag/src/rqt_bag/bag_widget.py
Line 279 in 059a221
Checking the filename prior to that line (in `_handle_load_clicked) and returning early.
rqt_bag occurs a error when I open some bags, but it can work well in other bags.
here is the error info:
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_timeline.py", line 491, in on_mouse_down
TimelinePopupMenu(self, event, topic)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/timeline_menu.py", line 213, in init
self.process(action)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/timeline_menu.py", line 262, in process
frame.show(self.timeline.get_context())
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/timeline_menu.py", line 85, in show
self._viewer = self._viewer_type(self._timeline, self, self._topic)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag_plugins/plot_view.py", line 91, in init
self.plot_widget = PlotWidget(timeline, parent, topic)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag_plugins/plot_view.py", line 176, in init
msg = bag._read_message(entry.position)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 986, in _read_message
return self._reader.seek_and_read_message_data_record(position, raw)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 2475, in seek_and_read_message_data_record
msg_type = _get_message_type(connection_info)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1571, in _get_message_type
message_type = genpy.dynamic.generate_dynamic(info.datatype, info.msg_def)[info.datatype]
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/dynamic.py", line 168, in generate_dynamic
tmp_file.file.write(full_text.encode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 574: ordinal not in range(128)
Any suggestion?
The following error occurs when running
ros2 run rqt_bag rqt_bag
orrqt
and adding the rqt bag widget manuallyPluginManager._load_plugin() could not load plugin "rqt_bag/Bag":
Traceback (most recent call last):
File "/opt/ros/rolling/lib/python3.10/site-packages/qt_gui/plugin_handler.py", line 102, in load
self._load()
File "/opt/ros/rolling/lib/python3.10/site-packages/qt_gui/plugin_handler_direct.py", line 55, in _load
self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
File "/opt/ros/rolling/lib/python3.10/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/rolling/lib/python3.10/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 69, in load
return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
File "/opt/ros/rolling/lib/python3.10/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_gui/ros_plugin_provider.py", line 107, in load
return class_ref(plugin_context)
File "/home/ijnek/Downloads/tmp/soccer_vision_msgs_layers_ws/build/rqt_bag/src/rqt_bag/bag.py", line 58, in __init__
self._widget = BagWidget(context, args.clock)
File "/home/ijnek/Downloads/tmp/soccer_vision_msgs_layers_ws/build/rqt_bag/src/rqt_bag/bag_widget.py", line 84, in __init__
self._timeline = BagTimeline(context, publish_clock)
File "/home/ijnek/Downloads/tmp/soccer_vision_msgs_layers_ws/build/rqt_bag/src/rqt_bag/bag_timeline.py", line 111, in __init__
self._timeline_frame = TimelineFrame(self)
File "/home/ijnek/Downloads/tmp/soccer_vision_msgs_layers_ws/build/rqt_bag/src/rqt_bag/timeline_frame.py", line 131, in __init__
self._topic_font.setPointSize(self._topic_font_size)
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'
Environment:
OS: Ubuntu22.04 Jammy
Distro: Rolling
ROS Installation Method: Binary
This is a detailed example for ros-visualization/rqt#266. Although this can be resolved in rqt_bag by ensuring the argument type matches that expected by the method (ie. self._topic_font.setPointSize(int(self._topic_font_size))
or self._topic_font.setPointSizeF(self._topic_font_size)
) the issue exists in quite a lot of places for rqt_bag, and will very likely exist across any library that depends on python_qt_binding
.
I've put up a branch that seems to work (for at least some basic preliminary testing).
i used kinetic on Ubuntu16.04, and when i use rqt_bag to record all the topics it would crash and display the following error msg.
Traceback (most recent call last): File "/home/lupeng/catkin_ws/src/rqt_bag/src/rqt_bag/timeline_frame.py", line 293, in paint self._draw_topic_dividers(painter) File "/home/lupeng/catkin_ws/src/rqt_bag/src/rqt_bag/timeline_frame.py", line 520, in _draw_topic_dividers (x, y, w, h) = self._history_bounds[topic] KeyError: '/usb_cam/image_raw'
Hello, when I try to run rqt_bag from the terminal I get the following error:
Traceback (most recent call last):
File "/opt/ros/kinetic/bin/rqt_bag", line 5, in <module>
from rqt_bag.bag import Bag
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag.py", line 39, in <module>
from .bag_widget import BagWidget
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_widget.py", line 40, in <module>
from python_qt_binding.QtCore import Qt, qInfo, qWarning, Signal
ImportError: cannot import name qInfo
Hi,
I have the following problem in ROS Noetic in Ubuntu 20.04, Python version is 3.8.2.
I've tried to display raw IMU data on rqt_bag. After solving a bug as explained in #35, I get this error in raw_view.py script:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/message_view.py", line 93, in event
self.message_viewed(bag, msg_data)
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/raw_view.py", line 72, in message_viewed
self.message_tree.set_message(msg)
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/raw_view.py", line 111, in set_message
self._add_msg_object(None, '', '', msg, msg._type)
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/raw_view.py", line 240, in _add_msg_object
self._add_msg_object(item, subpath, subobj_name, subobj, subobj_type)
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/raw_view.py", line 240, in _add_msg_object
self._add_msg_object(item, subpath, subobj_name, subobj, subobj_type)
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/raw_view.py", line 208, in _add_msg_object
obj_repr = codecs.utf_8_decode(str(obj), 'ignore')[0]
TypeError: a bytes-like object is required, not 'str'
In this case, type(obj) is str
. Even though its type is not str
, it is converted to str
before passing to codecs.utf_8_decode
.
This error appears when trying to visualize IMU data from Rosario Dataset:
https://www.cifasis-conicet.gov.ar/robot/doku.php
rqt_bag can open using the File Open dialog, but fails when specifying the bag directory or metadata.yaml filename from the command line.
I am experiencing a problem roughly similar to this:
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/rqt_bag/rqt_bag", line 5, in
from rqt_bag.bag import Bag
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag.py", line 39, in
from .bag_widget import BagWidget
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_widget.py", line 40, in
from python_qt_binding.QtCore import Qt, qInfo, qWarning, Signal
ImportError: cannot import name qInfo
Unfortunately I followed those suggestion but my problem seems to be different.
these are some information from my system.
rosversion rqt_bag: 0.4.10
python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import python_qt_binding
>>> print(python_qt_binding.QT_BINDING)
pyqt
>>> from python_qt_binding.QtWidgets import QWidget
>>> print(python_qt_binding.QT_BINDING_VERSION)
5.5.1
>>> print(python_qt_binding.QT_BINDING_MODULES)
{'QtGui': <module 'PyQt5.QtGui' from '/usr/lib/python2.7/dist-packages/PyQt5/QtGui.x86_64-linux-gnu.so'>, 'QtSvg': <module 'PyQt5.QtSvg' from '/usr/lib/python2.7/dist-packages/PyQt5/QtSvg.x86_64-linux-gnu.so'>, 'QtWidgets': <module 'PyQt5.QtWidgets' from '/usr/lib/python2.7/dist-packages/PyQt5/QtWidgets.x86_64-linux-gnu.so'>, 'QtNetwork': <module 'PyQt5.QtNetwork' from '/usr/lib/python2.7/dist-packages/PyQt5/QtNetwork.x86_64-linux-gnu.so'>, 'QtXml': <module 'PyQt5.QtXml' from '/usr/lib/python2.7/dist-packages/PyQt5/QtXml.x86_64-linux-gnu.so'>, 'QtWebKitWidgets': <module 'PyQt5.QtWebKitWidgets' from '/usr/lib/python2.7/dist-packages/PyQt5/QtWebKitWidgets.x86_64-linux-gnu.so'>, 'QtCore': <module 'PyQt5.QtCore' from '/usr/lib/python2.7/dist-packages/PyQt5/QtCore.x86_64-linux-gnu.so'>, 'QtOpenGL': <module 'PyQt5.QtOpenGL' from '/usr/lib/python2.7/dist-packages/PyQt5/QtOpenGL.x86_64-linux-gnu.so'>}
>>> import PyQt5
>>> from PyQt5 import QtWidget
>>> print PyQt5.QtCore.PYQT_VERSION_STR
5.5.1
I have to replay a bag file, which contains 15000 messages over a duration of 66seconds. I wrote a subscriber node to this topic. On the subscriber side, I count the number of messages received. I notice that not all messages are received. And the number of messages received is not fixed every time. I need to replay this bag file in real-time and without data loss. How can I achieve this?
I tried replaying the same bag with rosbag play (command line) the performance of command line is much better when compared to rqt_bag, but there is still some data loss. How can I ensure that all messages are received on subscriber end?
Your help is much appreciated. Thanks in advance.
Hello, I've been hit by the bug fixed in #54 would it be possible to get a new release please (in my case for Melodic at least)?
Thank you very much!
From @saikrishna-1996 on July 2, 2015 19:2
this option is not available right now
Copied from original issue: ros-visualization/rqt_common_plugins#325
The current implementation of rqt_bag for ROS 2 does not allow for different storage implementations, it is explicitly implemented as a SQLite3 reader. Til now this was not a large concern, but as MCAP gains usership, this will become more of a concern. The rosbag2_py
API is intended to be a generic interface to ROS 2 bag access and manipulation. Anything that rqt_bag
needs, that rosbag2_py
does not provide, needs to be added as part of completion of this ticket.
sqlite3
- should not see that exact string anywhere in the.mcap
files, with anything that can currently be done with .db3
filesIn some cases rewriting the timestamp of a rosbag eases debugging (so you can play the bag in a loop), specially with the /tf topic. Also if you are mixing real data of a robot with a rosbag.
It would be nice to have an option to rewrite the timestamps of a specific topic. The first idea that comes to my mind would be having another option on right click to be Publish rewriting Timestamps
(probably something shorter). I don't know if this is feasible to be added as a plugin, if so, and if anyone else thinks this may be useful, I'll try to implement it.
Maybe would be nice to have rosbag play
have the same capability.
I think it would be nice to have a Ubuntu desktop launcher so that an end user can easily launch rqt_bag
, open his bag file and play with the data.
Currently I'm using a script + desktop launcher:
cat /usr/local/bin/rqt_bag_desktop
(make sure it has execute rights)
#!/bin/bash
source /opt/ros/kinetic/setup.bash
RESULT=$(pgrep roscore && echo Running)
if [ "${RESULT:-null}" = null ]; then
echo "roscore not running! Running it as background process"
roscore &
sleep 0.5
fi
rqt_bag $1
cat /usr/local/share/applications/rqt_bag.desktop
[Desktop Entry]
Name=ROS Qt bag
Comment=Record and play bag files
Exec=/usr/local/bin/rqt_bag_desktop
Icon=/usr/share/icons/Adwaita/scalable/apps/utilities-system-monitor-symbolic.svg
Type=Application
Categories=ROS;
StartupNotify=true
Is there a way to include such a thing in this package?
roscore
when the application exit?I tried to open a bag file /home/victor/Téléchargements/data_2018-02-28-12-10-50.bag
$ rqt_bag
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_widget.py", line 264, in _handle_load_clicked
self.load_bag(filename[0])
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_bag/bag_widget.py", line 267, in load_bag
qDebug("Loading '%s'..." % filename)
TypeError: qDebug(str): argument 1 has unexpected type 'unicode'
The é
in the path name causes the problem.
Tested on ROS Kinetic
Commenting the two qDebug
lines in the code makes the import work.
http://doc.qt.io/qt-5/qtextcodec.html#fromUnicode
Seems like it would solve the problem.
Help, after I upgraded to the latest rqt_bag, it will crash view raw topic which contains ASCII code such as Chinese character 中文
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/plugins/message_view.py", line 93, in event
self.message_viewed(bag, msg_data)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/plugins/raw_view.py", line 73, in message_viewed
self.message_tree.set_message(msg)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/plugins/raw_view.py", line 115, in set_message
self._add_msg_object(None, '', '', msg, msg._type)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/plugins/raw_view.py", line 239, in _add_msg_object
self._add_msg_object(item, subpath, subobj_name, subobj, subobj_type)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_bag/plugins/raw_view.py", line 207, in _add_msg_object
obj_repr = codecs.utf_8_decode(str(obj).encode(), 'ignore')[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
[1] 16885 abort (core dumped) rqt_bag data_big_2020-12-31-06-54-03_0.bag
From @ablasdel on January 10, 2013 23:2
Currently horizontal scrolling is painful in rqt_bag. The main way being middle mouse dragging.
A good improvement would be a visualization of the entire bag across the top of the graphicsview.
It should allow for clicking to jump to any point in the bag file.
It should show the current viewport position on the entire visualization.
If you click the viewport and drag it then the viewport should re-position to the desired location.
Copied from original issue: ros-visualization/rqt_common_plugins#11
Hi!
I have the version 0.4.11-0xenial-20171101-091232-0800 of rqt_bag and I get a segmentation fault if i try to run it.
user@IDG2033:~$ rqt_bag Segmentation fault (core dumped)
The problem seems related to PyQt4.QtGui
Any tips?
Thanks!
In Noetic, after loading a bag and showing the raw display of a message, clicking the arrow buttons for next or previous message at the top of the message pane causes this error:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/plugins/topic_message_view.py", line 87, in navigate_previous
for entry in self.timeline.get_entries([self.topic], self.timeline._timeline_frame.start_stamp, self.timeline._timeline_frame.playhead):
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/bag_timeline.py", line 273, in get_entries
for entry, _ in bag._mergesort(bag_entries, key=lambda entry: entry.time):
AttributeError: module 'rosbag.bag' has no attribute '_mergesort'
It seems the _mergesort
function in the rosbag.bag
was replaced by heapq.merge
(ros/ros_comm#2017).
But in the current version
rqt_bag/rqt_bag/src/rqt_bag/bag_timeline.py
Line 273 in b36db71
rqt_bag/rqt_bag/src/rqt_bag/bag_timeline.py
Line 303 in b36db71
Using ROS2 Galactic I can not get the rqt_bag player to publish topics from a recorded bag file.
I've right clicked on on each topic in the player timeline and checked "Publish" but nothing works.
I've been testing with the attached turtlesim bag file.
Issue appears in Lunar on OS X, see mikepurvis/ros-install-osx#89.
Two instances, both in bag_widget.py
: https://github.com/ros-visualization/rqt_bag/search?q=qInfo
Hi,
When I use rqt_bag to record a topic, some of the topics cannot be recorded and a warning is displayed, but when I use the command line tool rosbag, these topics can be recorded.
I am working under ubuntu16.04
[WARN] [1553769837.934367]: Error subscribing to /huace/nmea_sentence (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.267172]: Error subscribing to /lslidar_sweep (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.271660]: Error subscribing to /lslidar_packet0 (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.277671]: Error subscribing to /tong/nmea_sentence (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.285201]: Error subscribing to /lslidar_packet1 (ignoring): topic parameter 'data_class' is not initialized
I checked the corresponding code and found that the function could not get their correct type for the topic of the previous problem.
pytype = roslib.message.get_message_class(datatype)
Can you help me determine what is going on in the end, how to solve it, thank you very much.
From @trainman419 on June 6, 2014 1:3
Playing back a bag file with --clock doesn't work. The clock is only published 2 or 3 times per second, and doesn't appear to increase linearly.
I suspect the issue here is that rospy is using the clock it's publishing and creating some kind of feedback look.
The GUI is also unresponsive while playing back my bag files; this may or may not be related to timer issues caused by using --clock.
Copied from original issue: ros-visualization/rqt_common_plugins#244
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.