Cannot open rosbags with multiarrays.

asked 2018-04-17 04:25:09 -0500

Iñigo moreno gravatar image

updated 2018-04-17 04:30:46 -0500

  • Distro: kinetic
    • OS: Ubuntu 16.04
    • Program: Matlab and python

Hello, I've encountered this problem in matlab R2018a (it works fine in R2017b) and in python. When trying to open a rosbag with any of these programs. I've attached the file I'm trying to open and the errors i get. (As i cannot attach files I've uploaded it here: https://we.tl/QvCoqIqhd1 )

Matlab R2018a

>>rosbag('10.bag')

No definition for MultiArrayLayout
Message def:
# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout  layout        # specification of data layout
float64[]         data          # array of data

Python 2.7

>>> import rosbag
>>> bag = rosbag.Bag('10.bag')
>>> for topic,msg,t in bag.read_messages():
...    print(msg)
File "<stdin>", line 1, in <module> (and another bunch of tracebacks)
genmsg.msg_loader.MsgNotFound: Cannot locate message [MultiArrayLayout]: unknown package [std_msgs] on search path [{}]

I've searched online and I can't find an answer.

edit retag flag offensive close merge delete

Comments

I get the same error as you even with rosbag check on both Indigo and Kinetic. Searching for this issue reveals multiple people with this problem specifically when using ROS Java. Is ROS Java involved in creating this Bag file in any way?

jarvisschultz gravatar image jarvisschultz  ( 2018-04-17 08:41:53 -0500 )edit
1

If it is (and with Matlab in the mix it's highly likely), see whether rosjava/rosjava_bootstrap#16 provides some more insight. And perhaps try the tool linked at the end of that issue.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-17 08:43:19 -0500 )edit

I should also mention that I do not have this issue when creating my own bag file that contains random 3x3 std_msgs/Float64MultiArray messages.

jarvisschultz gravatar image jarvisschultz  ( 2018-04-17 08:46:46 -0500 )edit

No, the rosbags are all generated with "rosbag record -e -q "/visualcom/(.*)" from console.

Iñigo moreno gravatar image Iñigo moreno  ( 2018-04-17 08:53:23 -0500 )edit
1

But do any of the publishers use rosjava? Note: the Matlab ROS integration uses rosjava under the hood.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-17 08:54:29 -0500 )edit