Skip to content

Commit 2ab72b7

Browse files
authored
Merge pull request ApolloAuto#29 from fengqikai1414/master
fix AttributeError when writing a new pb msg to rosbag
2 parents e3749ed + 7a69512 commit 2ab72b7

File tree

1 file changed

+1
-0
lines changed
  • ros/ros_comm/rosbag/src/rosbag

1 file changed

+1
-0
lines changed

ros/ros_comm/rosbag/src/rosbag/bag.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ def write(self, topic, msg, t=None, raw=False):
349349
header = { 'topic' : topic, 'type' : msg_type, 'md5sum' : md5sum, 'message_definition' : pytype._full_text }
350350
else:
351351
if issubclass(msg.__class__, google.protobuf.message.Message):
352+
roslib.message.add_rosmsg_interface_for_protobuf(msgsg.__class__)
352353
header = { 'topic' : topic, 'type' : msg.__class__._type, 'md5sum' : msg.__class__._md5sum, 'message_definition' : 'protobuf' }
353354
else:
354355
header = { 'topic' : topic, 'type' : msg.__class__._type, 'md5sum' : msg.__class__._md5sum, 'message_definition' : msg._full_text }

0 commit comments

Comments
 (0)