jmscslgroup / bagpy

Python package for reading, and extracting data from rosbag files and performing any analysis on it.
https://jmscslgroup.github.io/bagpy/
Other
201 stars 39 forks source link

ImportError: cannot import name 'Log' from 'rosgraph_msgs.msg' #36

Open zkailinzhang opened 1 year ago

zkailinzhang commented 1 year ago

import bagpy

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)
rahulbhadani commented 1 year ago

Please provide more details on what version of Ubuntu you have, and what version of ROS you are using. ROS 2 and beyond Ubuntu 20.04 is not supported. You seem to have ROS dashing which is ROS 2. bagpy is meant for ROS 1.