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

MATLAB R2015a ROS Initialization Problem

asked 2015-04-21 07:33:36 -0500

Gokhan ALCAN gravatar image

updated 2015-04-24 01:38:38 -0500

gvdhoorn gravatar image

Hello Everyone,

Iam trying to use newest version of MATLAB R2015a with Robotics System Toolbox. My computer has 64-bit Windows 7 Professional operating system. When I start with Getting Started with ROS tutorial and type the first command

rosinit

I got the error below and I tried many things and could not manage to solve it

Initializing ROS master on http://10.36.54.243:11311/ . Exception in thread "ROS Executor Thread" org.ros.exception.RosMessageRuntimeException: java.lang.ClassNotFoundException: std_msgs.uint32 at org.ros.internal.message.definition.MessageDefinitionReflectionProvider.get(MessageDefinitionReflectionProvider.java:66) at org.ros.internal.message.Md5Generator.generate(Md5Generator.java:44) at org.ros.internal.message.Md5Generator$1.variableValue(Md5Generator.java:61) at org.ros.internal.message.definition.MessageDefinitionParser.parseField(MessageDefinitionParser.java:172) at org.ros.internal.message.definition.MessageDefinitionParser.parse(MessageDefinitionParser.java:107) at org.ros.internal.message.Md5Generator.generateText(Md5Generator.java:86) at org.ros.internal.message.Md5Generator.generate(Md5Generator.java:49) at org.ros.internal.message.Md5Generator$1.variableValue(Md5Generator.java:61) at org.ros.internal.message.definition.MessageDefinitionParser.parseField(MessageDefinitionParser.java:172) at org.ros.internal.message.definition.MessageDefinitionParser.parse(MessageDefinitionParser.java:107) at org.ros.internal.message.Md5Generator.generateText(Md5Generator.java:86) at org.ros.internal.message.Md5Generator.generate(Md5Generator.java:49) at org.ros.internal.message.topic.TopicDescriptionFactory.newFromType(TopicDescriptionFactory.java:36) at org.ros.internal.node.DefaultNode.newPublisher(DefaultNode.java:280) at org.ros.internal.node.RosoutLogger. (RosoutLogger.java:41) at org.ros.internal.node.DefaultNode.start(DefaultNode.java:195) at org.ros.internal.node.DefaultNode.access$000(DefaultNode.java:90) at org.ros.internal.node.DefaultNode$1.run(DefaultNode.java:182) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: std_msgs.uint32 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) ... 20 more Error creating the node /matlab_global_node_87034.

I also tried to reinstall the program in different computers with different operating systems (34-bit 64-bit Win7, 64-bit Win8).

Do you have any suggestions? How can I solve this initialization problem?


Edit:

Thank you for your answer. I tried to create rosmessages before calling rosinit as:

rosmessage('std_msgs/String')

and no error occured.

ans =

ROS String message with properties:

MessageType: 'std_msgs/String'

Use showdetails to show the contents of the message

It is also valid for rosmessage('std_msgs/UInt32'). I see that I can create rosmessages without any error.

I also checked the "javaclasspath" and "rosjava_messages.jar" is listed as "C:\Program Files\MATLAB\MATLAB Production Server\R2015a\java\jarext\rosjava\rosjava_messages.jar". I also checked this file in my computer and verified that it really exists there.

Do ...

(more)
edit retag flag offensive close merge delete

Comments

1

Gokhan, the behavior that you are seeing is very strange. The String message should have an additional "Data" property, so something is amiss there. Could you post the output of running "version" and "version -java" in your MATLAB session?

By the way, are you running this on ML Production Server?

rpillat gravatar image rpillat  ( 2015-04-25 19:49:05 -0500 )edit

@rpillat Iam running C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\matlab.exe. Output of "version" is "8.5.0.197613 (R2015a)" and output of "version -java" is "Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode". Do you see anything missing here?

Gokhan ALCAN gravatar image Gokhan ALCAN  ( 2015-04-26 02:06:18 -0500 )edit

Gökhan, could you be able to solve this issue? If so, can you please share the solution?

kolormatik gravatar image kolormatik  ( 2016-12-12 12:39:59 -0500 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2015-04-30 10:31:13 -0500

rpillat gravatar image

@Gokhan, I am a bit confused by your setup, since it seems that you have a MATLAB executable as part of the MATLAB Production Server (MPS) installation. MPS only works with compiled applications. It would be best if you contact MathWorks Technical Support. Mention that you talked to Remo Pillat. Thx

edit flag offensive delete link more
0

answered 2015-04-22 06:35:24 -0500

rpillat gravatar image

Hi Gokhan,

It looks like there is some problem with creating ROS messages in your MATLAB installation.

To confirm this, try to create messages before calling rosinit:

rosmessage('std_msgs/String')

rosmessage('std_msgs/UInt32')

Does this work for you?

If it does not work, please check if "rosjava_messages.jar" is listed as one of the files in the output of "javaclasspath".

Thanks, Remo

edit flag offensive delete link more
0

answered 2016-12-20 06:11:37 -0500

yucelokan gravatar image

updated 2016-12-20 08:04:37 -0500

I GOT İT. The language of my computer was Turkish. I solved the problem when I made this English (United States). :) :) You must change the language of your computer..

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2015-04-21 07:33:36 -0500

Seen: 1,881 times

Last updated: Dec 20 '16