Ask Your Question
0

Unable to access some topics in Matlab

asked 2017-03-13 12:59:34 -0600

fadiak gravatar image

I am completely new to ROSbag. I have a bag file and would like to work with it in MATLAB.

I canview the messages for one of my topics using:

>> bag = rosbag('HMB_1.bag');
>> bagselect_c = select(bag, 'Topic', '/center_camera/image_color/compressed');
>> msgs_c = readMessages(bagselect_c);

when I try to do the same for another topic, I get an error:

>> bagselect= select(bag, 'Topic', '/vehicle/steering_report');
>> msgstemp = readMessages(bagselect);
Error using robotics.ros.BagSelection/deserializeMessages (line 445)
Java exception occurred:
org.ros.exception.RosMessageRuntimeException: java.lang.ClassNotFoundException: dbw_mkz_msgs.SteeringReport

    at org.ros.internal.message.definition.MessageDefinitionReflectionProvider.get(MessageDefinitionReflectionProvider.java:66)

    at org.ros.internal.message.DefaultMessageFactory.newFromType(DefaultMessageFactory.java:42)

    at org.ros.internal.message.DefaultMessageDeserializer.deserialize(DefaultMessageDeserializer.java:42)

Caused by: java.lang.ClassNotFoundException: dbw_mkz_msgs.SteeringReport

    at java.net.URLClassLoader$1.run(Unknown Source)

    at java.net.URLClassLoader$1.run(Unknown Source)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at org.ros.internal.message.definition.MessageDefinitionReflectionProvider.get(MessageDefinitionReflectionProvider.java:62)

    ... 2 more


Error in robotics.ros.BagSelection/readMessages (line 195)
            msgs = obj.deserializeMessages(obj.MessageList, rows);

I'm not sure how to troubleshoot

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-25 18:40:12 -0600

snehesh gravatar image

You need to use custom ros message support. You have to use rosgenmsg. https://www.mathworks.com/help/roboti...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-13 12:59:34 -0600

Seen: 393 times

Last updated: Jul 25 '17