jmscslgroup / bagpy Goto Github PK
View Code? Open in Web Editor NEWPython package for reading, and extracting data from rosbag files and performing any analysis on it.
Home Page: https://jmscslgroup.github.io/bagpy/
License: Other
Python package for reading, and extracting data from rosbag files and performing any analysis on it.
Home Page: https://jmscslgroup.github.io/bagpy/
License: Other
Hi,
I'm trying out your bagreader, I wanted to request a feature in that: I would like some simple way to scan the bag and get a list of topics, without having to create clutter in the filesystem and do unnecessary processing. Is this possible? Maybe with an instantiation option like "list_topics_only" ?
I'm reading values published to the tf topic and opening up the CSV file. It's split into two columns, Time & transforms but the transforms are stored in what I'm guessing is a YAML format
I'm attempting to parse the yaml and store it like this
tf = pd.read_csv(f+"/tf.csv")
for token in tf['transforms']:
t = token.strip("[]")
tok_yaml[i] = yaml.load(t, Loader=SafeLoader)
i+=1
but in the CSV that bagpy generates the transforms are stored like this
header:
seq: 0
stamp:
secs: 1630512225
nsecs: 303961038
frame_id: ""gordon/suspension_link""
child_frame_id: ""gordon/back_left_wheel""
transform:
translation:
x: 0.0979184741812847
y: 0.0453701778595707
z: 0.0234999999999999
rotation:
x: 0.0009206402794789245
y: 0.7071061818577727
z: -0.0009206402794789279
w: 0.7071061818577702, header:
seq: 0
stamp:
secs: 1630512225
nsecs: 303961038
frame_id: ""gordon/suspension_link""
child_frame_id: ""gordon/back_right_wheel""
...
where w: 0.7071061818577702, header:
appears to create a malformed mapping that leads to this
ScannerError: mapping values are not allowed here
in "<unicode string>", line 17, column 34:
w: 0.7071061818577702, header:
I've banged my head against this for way too long, is this an issue with how bagpy is reading the tf format considering how seemingly unconvential everything is stored?
Windows 10
python 3.7.7
code:
from bagpy import bagreader
import bagpy
b = bagreader(r'C:\Users\Dustin\Documents\20210226_142402.bag')
image_data = b.message_by_topic(r'/device_0/sensor_0/Depth_0/image/data')
output:
[INFO] Data folder C:\Users\Dustin\Documents\20210226_142402 already exists. Not creating. Traceback (most recent call last): File "src\utils\bag\load_bag.py", line 5, in <module> image_data = b.message_by_topic(r'/device_0/sensor_0/Depth_0/image/data') File "C:\Users\Dustin\miniconda3\envs\x-ray\lib\site-packages\bagpy\bagreader.py", line 266, in message_by_topic for topic, msg, t in self.reader.read_messages(topics=topic, start_time=tstart, end_time=tend): File "C:\Users\Dustin\miniconda3\envs\x-ray\lib\site-packages\rosbag\bag.py", line 2699, in read_messages yield self.seek_and_read_message_data_record((entry.chunk_pos, entry.offset), raw, return_connection_header) File "C:\Users\Dustin\miniconda3\envs\x-ray\lib\site-packages\rosbag\bag.py", line 2833, in seek_and_read_message_data_record raise ROSBagException('unsupported compression type: %s' % chunk_header.compression) rosbag.bag.ROSBagException: unsupported compression type: lz4
relevant lines from pip list
:
bagpy 0.4.4
lz4 3.1.3
Any tips would be appreciated.
ImportError Traceback (most recent call last)
in
----> 1 import bagpy
---> 49 from .client import spin, myargv, init_node,
50 get_published_topics,
51 wait_for_message, \
~//lib/python3.7/site-packages/rospy/client.py in
52 import roslib
53
---> 54 import rospy.core
55 from rospy.core import logwarn, loginfo, logerr, logdebug
56 import rospy.exceptions
~//lib/python3.7/site-packages/rospy/core.py in
73 from rospy.impl.validators import ParameterInvalid
74
---> 75 from rosgraph_msgs.msg import Log
76 from functools import partial
77
ImportError: cannot import name 'Log' from 'rosgraph_msgs.msg' (/opt/ros/dashing/lib/python3.6/site-packages/rosgraph_msgs/msg/init.py)
Currently, pip search
command in bagreader.py
will cause the below error:
ERROR: Exception:
Traceback (most recent call last):
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 224, in _main
status = self.run(options, args)
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/site-packages/pip/_internal/commands/search.py", line 62, in run
pypi_hits = self.search(query, options)
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/site-packages/pip/_internal/commands/search.py", line 82, in search
hits = pypi.search({'name': query, 'summary': query}, 'or')
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/xmlrpc/client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/xmlrpc/client.py", line 1452, in __request
verbose=self.__verbose
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/site-packages/pip/_internal/network/xmlrpc.py", line 46, in request
return self.parse_response(response.raw)
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/xmlrpc/client.py", line 1342, in parse_response
return u.close()
File "/home/robotmws/anaconda3/envs/robot_py3/lib/python3.7/xmlrpc/client.py", line 656, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI's XMLRPC API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.">
According to pypa/pip issues 5216,
The pip search command queries PyPI's servers, and PyPI's maintainers have explained that the API endpoint that the pip search command queries is very resource intensive and too expensive for them to always keep open to the public. Consequently they sometimes throttle access and are actually planning to remove it completely soon.
It'd better to use pip install pip-search
according to this post.
after running the command pip install bagpy , I am getting this error.
Collecting bagpy
Using cached bagpy-0.4.7-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.8/dist-packages (from bagpy) (6.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from bagpy) (1.21.4)
Collecting matplotlib==3.2.1
Using cached matplotlib-3.2.1-cp38-cp38-manylinux1_x86_64.whl (12.4 MB)
Collecting sphinx-rtd-theme
Using cached sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl (2.8 MB)
Collecting sphinx-autodoc-typehints==1.4.0
Using cached sphinx_autodoc_typehints-1.4.0-py3-none-any.whl (6.0 kB)
Collecting bitstring
Using cached bitstring-3.1.9-py3-none-any.whl (38 kB)
Collecting ytsphinx
Using cached ytsphinx-1.2.1.dev20200430-py2.py3-none-any.whl (3.7 kB)
Requirement already satisfied: pycryptodomex in /usr/lib/python3/dist-packages (from bagpy) (3.6.1)
Collecting seaborn>=0.9.0
Using cached seaborn-0.11.2-py3-none-any.whl (292 kB)
Collecting pyserial>=3.4
Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting mkdocs
Using cached mkdocs-1.2.3-py3-none-any.whl (6.4 MB)
Requirement already satisfied: rospkg in /usr/lib/python3/dist-packages (from bagpy) (1.3.0)
Requirement already satisfied: ipython in /usr/local/lib/python3.8/dist-packages (from bagpy) (7.30.1)
Collecting Sphinx==3.2.1
Using cached Sphinx-3.2.1-py3-none-any.whl (2.9 MB)
Collecting py3rosmsgs
Using cached py3rosmsgs-1.18.1-py2.py3-none-any.whl (1.1 MB)
Collecting sphinx-bootstrap-theme
Using cached sphinx_bootstrap_theme-0.8.0-py2.py3-none-any.whl (1.2 MB)
Collecting sphinx-markdown-parser
Using cached sphinx_markdown_parser-0.2.4-py2.py3-none-any.whl (19 kB)
Collecting pymdown-extensions
Using cached pymdown_extensions-9.1-py3-none-any.whl (215 kB)
Collecting recommonmark
Using cached recommonmark-0.7.1-py2.py3-none-any.whl (10 kB)
Collecting pathlib
Using cached pathlib-1.0.1.tar.gz (49 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-drfu_uh_/pathlib/setup.py'"'"'; file='"'"'/tmp/pip-install-drfu_uh_/pathlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-drfu_uh_/pathlib/pip-egg-info
cwd: /tmp/pip-install-drfu_uh_/pathlib/
Complete output (39 lines):
running egg_info
creating /tmp/pip-install-drfu_uh_/pathlib/pip-egg-info/pathlib.egg-info
writing /tmp/pip-install-drfu_uh_/pathlib/pip-egg-info/pathlib.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-drfu_uh_/pathlib/pip-egg-info/pathlib.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-drfu_uh_/pathlib/pip-egg-info/pathlib.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-drfu_uh_/pathlib/pip-egg-info/pathlib.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-drfu_uh_/pathlib/setup.py", line 6, in
setup(
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 297, in run
self.find_sources()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 304, in find_sources
mm.run()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 535, in run
self.add_defaults()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 575, in add_defaults
rcfiles = list(walk_revctrl())
File "/usr/lib/python3/dist-packages/setuptools/command/sdist.py", line 20, in walk_revctrl
for item in ep.load()(dirname):
File "/usr/local/lib/python3.8/dist-packages/setuptools_scm/integration.py", line 69, in find_files
for ep in iter_entry_points("setuptools_scm.files_command"):
File "/usr/local/lib/python3.8/dist-packages/setuptools_scm/utils.py", line 147, in iter_entry_points
all_eps = entry_points()
File "/usr/lib/python3.8/importlib/metadata.py", line 541, in entry_points
ordered = sorted(eps, key=by_group)
File "/usr/lib/python3.8/importlib/metadata.py", line 539, in
dist.entry_points for dist in distributions())
File "/usr/lib/python3.8/importlib/metadata.py", line 240, in entry_points
return EntryPoint._from_text(self.read_text('entry_points.txt'))
File "/usr/lib/python3.8/importlib/metadata.py", line 490, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
AttributeError: 'PosixPath' object has no attribute 'read_text'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
There is no example to read image data,any suggestions
Hello,
I'm installing bagpy on my laptop (Ubuntu 18.04 LTS with Python 2.7.17), but during the installation process the following error occurs:
Collecting Sphinx==3.2.1 (from bagpy)
Could not find a version that satisfies the requirement Sphinx==3.2.1 (from bagpy) (from versions: 0.1.61611, 0.1.61798, 0.1.61843, 0.1.61945, 0.1.61950, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.5, 0.5.1, 0.5.2b1, 0.5.2, 0.6b1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 1.0b1, 1.0b2, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.2b1, 1.2b2, 1.2b3, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3b1, 1.3b2, 1.3b3, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.4a1, 1.4b1, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.5a1, 1.5a2, 1.5b1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.6b1, 1.6b2, 1.6b3, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.7.0b1, 1.7.0b2, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.8.0b1, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5)
No matching distribution found for Sphinx==3.2.1 (from bagpy)
How can I solve the problem?
Thank you
I have a .bag file with image frames, from which I have to get the images. Is there a way bagpy could achieve this?
Hi, This library saved me hundreds of lines of code and infrastructure setup, so thanks for publishing! I was just wondering if it's also possible to use this for extracting image topics as PNGs for example, and if so would you have a code snippet or notebook for this? Thanks in advance, Kevin
Hi,
I plan to read a bunch of bagfiles from a folder via bagreader()
in a loop.
Question No1: Is this possible?
I also want to read a specific topic with message_by_topic
from a created .csv
file and process this topic.
I've seen that bagpy already creates an own folder with a special named .csv
file.
Question No2: How can I create such a folder just once for all my unique .csv
files
Question No2: How can I name these .csv
file with a custom name which changes in the loop sequence .. file1.csv, file2.csv etc.
In short:
I want to loop over a bunch of .bag files in a folder.
I just want to create one folder for my .csv
files
There I want to save all the .csv files with self given names.
Any tipps would be appreciated
Hello sir, I used script "python3 bagpy_example.py", script is erro. I modify script is :
b = bagreader('/opt/module/data/HMB_4.bag'). Error information is :
root@scnqtwprkzbrwe6t:/opt/software/bagpy-master/notebook# python3 bagpy_example.py
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(bagpy_example.py:240255): Gdk-CRITICAL **: 18:29:50.317: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
[INFO] Data folder /opt/module/data/HMB_4 already exists. Not creating.
Traceback (most recent call last):
File "bagpy_example.py", line 16, in
df = pd.read_csv(csv[0])
IndexError: list index out of range
Everything is working well, I just with to be able to pass datafolder as a parameter as well, so we can decide where the .csv will be saved. What do you say?
Hello,
I'm using ubuntu 18.04 and ROS Melodic.I installed lz4 support by pip install lz4
or pip install roslz4 --extra-index-url https://rospypi.github.io/simple/
. Basicially I installed every way that I have found. And when I check if there is an extension for lz4, I can see that my requirements satisfied. For example, for pip install lz4
I get info message that says _Requirement already satisfied: lz4 in /home/pc/.local/lib/python3.9/site-packages (4.3.2)
_
But when I type command that needs to lz4 compression, I get the same error message. What should I do?
Hi
When I read a rosbag containing images I get a string sequence in the csv file that looks like this:
"b'\x10\x10\x0f\x10\x10\x10........'"
I tried to using encode/decode and struct.unpack but with no success.
Do you have any examples of how to decode images byte streams?
OS: Windows 10
Python 3.9.11
Is this a problem related with the file properties?
The call I've done is the following: b = bagreader('C:/Users/XXX/Desktop/XXXX/rosbag.bag')
I want to know how are the time values in "Time" column calculated? It seems that the time values in "Time" column aren't equal to (header.stamp.secs + header.stamp..nsecs*1e-9).
Once message_by_topic
is called, a .csv
is generated. This .csv
is comma-separated. Unfortunately, this separator is not adjustable via the message_by_topic
call. Hence, if any message contains a string, which contains commas, things will become ugly. It would be really neat to be able to set the delimiter for the generated .csv
.
The requirements.txt and setup.py do not contain the same version dependencies.
The matplotlib==3.2.1
requirement breaks installation for python 3.9.
I cannot make a pull request, because i don't know which matplotlib requirement there is.
python-dev-tools 2020.9.10 requires Sphinx<3.0.0,>=2.4.0, but you have sphinx 3.0.0 which is incompatible.
bagpy 0.4.6 requires Sphinx==3.2.1, but you have sphinx 3.0.0 which is incompatible.
I get following conflicts during installation
Importing "bagpy" throws the following message:
"Failed to load Python extension for LZ4 support. LZ4 compression will not be available."
This results in the following error when trying to read messages/topics from rosbag file:
"rosbag.bag.ROSBagException: unsupported compression type: lz4"
System OS: Windows 10
Python Version: 3.8.3
As the title says, I would like to move a bag file once I process it, but my 'bag' object is keeping the file open. I tried looking into your bagreader
class and found that you were saving the rosbag.Bag
object in a self.reader
variable. Running bag.reader.close()
does run, but the file still remains active.
Good morning everyone,
I'm trying to read the goal topic of type control_msgs/FollowJointTrajectoryActionGoal from a bag file recording with:
rosbag record /rostube/hardware_interface/arm/controller/trajectory/follow_joint_trajectory/goal
My python analyzer file is:
#!/usr/bin/env python
# coding: utf-8
from bagpy import bagreader
import bagpy
import pandas as pd
import seaborn as sea
import matplotlib.pyplot as plt
b = bagreader('/home/mattia/awtube_ws/src/rostube/test_break/src/test.bag')
print(b.topic_table)
msg = b.message_by_topic(topic='/rostube/hardware_interface/arm/controller/trajectory/follow_joint_trajectory/goal')
ms = pd.read_csv(msg)
points = ms['goal.trajectory.points']
print(points)
and the output is
mattia@mattia-Latitude-5510:~/awtube_ws$ /usr/bin/python3 /home/mattia/awtube_ws/src/rostube/test_break/src/test_bagpy.py
Failed to load Python extension for LZ4 support. LZ4 compression will not be available.
Python older than 3.7 detected.
[INFO] Data folder /home/mattia/awtube_ws/src/rostube/test_break/src/Traiettoria_COPAM already exists. Not creating.
Topics Types Message Count Frequency
0 /rostube/hardware_interface/arm/controller/tra... control_msgs/FollowJointTrajectoryActionGoal 19 0.185207
0 [positions: [0.110583, 0.549845, -1.625471, -1...
1 [positions: [1.77559, 0.460749, -1.747762, 0.0...
2 [positions: [1.815776, 1.186726, -1.698984, -0...
3 [positions: [1.815709, 0.457675, -1.778519, -0...
4 [positions: [0.140909, 0.618534, -1.539522, -0...
5 [positions: [0.110448, 0.968881, -1.659338, 0....
6 [positions: [0.110667, 0.549835, -1.625477, 7....
7 [positions: [1.770433, 0.463771, -1.831951, 0....
8 [positions: [1.815761, 1.186492, -1.699127, -0...
9 [positions: [1.815729, 0.457711, -1.778525, -0...
10 [positions: [0.124557, 0.49432, -1.725759, -0....
11 [positions: [0.110495, 0.968923, -1.659319, 0....
12 [positions: [0.110667, 0.54985, -1.625471, 0.0...
13 [positions: [1.783088, 0.472053, -1.809947, -0...
14 [positions: [1.815781, 1.186596, -1.699083, -0...
15 [positions: [1.815735, 0.45769, -1.778525, -0....
16 [positions: [0.133291, 0.529293, -1.713771, -0...
17 [positions: [0.110474, 0.968887, -1.659338, 0....
18 [positions: [0.110667, 0.549835, -1.625471, 4....
Name: goal.trajectory.points, dtype: object
The csv file doesnt' seem well formatted. And i don't understand why.
rostube-hardware_interface-arm-controller-trajectory-follow_joint_trajectory-goal.csv
My bag file is
test.zip
Could you help me to export a csv file weel formatted / use bagpy.bagreader adequately to extrapolate the data that I want to analyze?
Just curious
Hi,
I install bagpy using conda for my docker using
RUN pip install bagpy
The current behavior is such the installation doesn't proceed, and then after a long time it exits with an out of memory error. I didn't have this with 0.4.8 version.
Traceback (most recent call last):
File "/home/sharyat/training_data/trial.py", line 1, in
import bagpy
File "/home/sharyat/.local/lib/python3.8/site-packages/bagpy/init.py", line 6, in
from .bagreader import bagreader
File "/home/sharyat/.local/lib/python3.8/site-packages/bagpy/bagreader.py", line 42, in
from geometry_msgs.msg import Twist, Pose, PoseStamped
ModuleNotFoundError: No module named 'geometry_msgs'
While installing bagpy: pip install -U bagpy
I encounter an issue on multiple devices, be those WSL or docker image, when the bagpy reaches installing pathlib and the error looks like the following:
...
Is this an issue of bagpy, an issue of pathlib, and is there any way to orchestrate a solution from bagpy?
OS: ubuntu 18.04
Hello guys,
i tried to execute the bagpy_example.py script but i have the following error.
(myenv) geo@geo:/media/geo/d057a6b6-f590-4870-a4f8-13b392d0f9eb/geo/bagpy/notebook$ python bagpy_example.py
Failed to load Python extension for LZ4 support. LZ4 compression will not be available.
[INFO] Data folder /media/geo/d057a6b6-f590-4870-a4f8-13b392d0f9eb/geo/ws_livox/AFYTOS/FROM_VIEWER/afutos_26 already exists. Not creating.
Traceback (most recent call last):
File "/media/geo/d057a6b6-f590-4870-a4f8-13b392d0f9eb/geo/bagpy/notebook/bagpy_example.py", line 16, in <module>
df = pd.read_csv(csv[0])
IndexError: list index out of range
i tried the solutions which mentioned on issue #2 but still have the same error.
Thanks in afvance
code :
data = b.message_by_topic('/status/objects')
error:
Traceback (most recent call last):
File "/home/xxx/PycharmProjects/pythonProject/readRosbag.py", line 9, in
data = b.message_by_topic('/perception/objects')
File "/home/xxx/.local/lib/python3.7/site-packages/bagpy/bagreader.py", line 266, in message_by_topic
for topic, msg, t in self.reader.read_messages(topics=topic, start_time=tstart, end_time=tend):
File "/home/xxx/.local/lib/python3.7/site-packages/rosbag/bag.py", line 2699, in read_messages
yield self.seek_and_read_message_data_record((entry.chunk_pos, entry.offset), raw, return_connection_header)
File "/home/xxx/.local/lib/python3.7/site-packages/rosbag/bag.py", line 2874, in seek_and_read_message_data_record
msg.deserialize(data)
File "/tmp/genpy_0ui5frqm/tmpl21yqz9x.py", line 74, in deserialize
self.data = str[start:end].decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 1: invalid continuation byte
Greetings,
Absolutely love this package.
I come to notice that the odometry_data
method under bagreader
class doesn't parse twist.angular into the csv.
I believe that the bug can be found here in this line.
The rows omit msg.twist.twist.angular variables.
Hope this gets fixed soon.
Can I use this package for custom message?
Hello,
I would like a package that I am maintaining to depend on a good rosbag reader such as bagpy. I was wondering if it was possible to relax the dependency on a specific matplotlib version in order to prevent headache further downstream?
Line 29 in 9750956
Hi
I'm not sure if this is an issue or something I have missed in the docs.
Extract all the topics from a bag into csv files using this method:
import bagpy
from bagpy import bagreader
b = bagreader('bagfile.bag')
csvfiles = []
for t in b.topics:
data = b.message_by_topic(t)
csvfiles.append(data)
Everything goes well, however when I open the csv the rosbag timestamps some number such as 1.6...e+9, whereas if I extract a topic on the command line rostopic echo -b bagfile.bag -p \topic > topic.csv
the time stamps are 1.6...e+18.
Is there something to specify in the script to see 1.6...e+18 timestamps?
Bagpy version bagpy-0.4.7 from pypi
Ubuntu 18.04 (Python 3.6) and 20.04 (Python 3.8)
I was reading a bag file
import bagpy
from bagpy import bagreader
b = bagreader('C:\Users\xxxxxx\PycharmProjects\pythonProject1\Data\bagfile.bag')
and got this error...
Traceback (most recent call last):
File "C:\Users\xxxxx\PycharmProjects\pythonProject1\rosbag.py", line 1, in
import bagpy
File "C:\Users\xxxxx\PycharmProjects\pythonProject1\venv\lib\site-packages\bagpy_init_.py", line 6, in
from .bagreader import bagreader
File "C:\Users\xxxx\PycharmProjects\pythonProject1\venv\lib\site-packages\bagpy\bagreader.py", line 43, in
import rosbag
File "C:\Users\xxxx\PycharmProjects\pythonProject1\rosbag.py", line 7, in
b = bagreader('C:\Users\xxxx\PycharmProjects\pythonProject1\Data\bagfile.bag')
TypeError: 'module' object is not callable
I just installed bagpy and I was impressed by the amount of dependencies. I noted there are dependencies with Sphinx, wich is for documentation. I think there is a way to reduce dependencies and separate those that are for dev
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.