ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

suzuki tarou's profile - activity

2017-06-14 09:49:16 -0500 received badge  Good Question (source)
2017-03-14 11:07:38 -0500 received badge  Nice Question (source)
2015-05-27 05:00:41 -0500 received badge  Student (source)
2012-10-09 18:26:44 -0500 received badge  Notable Question (source)
2012-10-09 18:26:44 -0500 received badge  Famous Question (source)
2012-07-30 21:58:48 -0500 received badge  Popular Question (source)
2011-12-11 14:36:13 -0500 asked a question "No module named rosbag" error

I followed guide at http://www.ros.org/doc/api/rosbag/html/c++/ I runned the example usage read bag file by Python,

import rosbag
bag = rosbag.Bag('test.bag')
for topic, msg, t in bag.read_messages('numbers'):
   print msg.data
bag.close();

when i run the code it tells me "ImportError: No module named rosbag"

Traceback (most recent call last): File "/home/user/ros_workspace/beginner_tutorials/nodes/read_bag.py", line 4, in <module> import rosbag ImportError: No module named rosbag

please tell me how to fix this!

2011-12-10 02:02:14 -0500 received badge  Editor (source)
2011-12-10 02:01:28 -0500 answered a question How to extract data from *.bag?

I followed guide at http://www.ros.org/doc/api/rosbag/html/c++/ when i run the code it tells me "ImportError: No module named rosbag"

Traceback (most recent call last): File "/home/user/ros_workspace/beginner_tutorials/nodes/read_bag.py", line 4, in <module> import rosbag ImportError: No module named rosbag

please tell me how to fix this!