MATLAB R2015a ROS Initialization Problem
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 ...
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 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?
Gökhan, could you be able to solve this issue? If so, can you please share the solution?