[ros-users] Recording multiple topics with rosbag python API

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: ros-users
題目: [ros-users] Recording multiple topics with rosbag python API
I try to record multiple topics using a python script and the rosbag
python API. I have two callback methods, writing to the same bag file:

bag = rosbag.Bag('filename', 'w')

def callback1(data):
     bag.write('topic_name',data)

def callback2(data):
     bag.write('topic_name',data)


However, the bag file is corrupted after recording. Even reindexing 
doesn't fix it. It looks like the callbacks are not called sequentially. 
Could you please tell me how to record multiple topics using a script?

Best regards,
Georg

-- 
Dipl.-Ing. Georg Arbeiter, Fraunhofer IPA
Robotersysteme
Nobelstrasse 12, 70569 Stuttgart
Telefon 0711-970-1299, Fax 0711-970-1008
mailto:georg.arbeiter@ipa.fraunhofer.de
http://ipa.fraunhofer.de