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

Rosjava - could not instantiate node

asked 2012-06-18 01:25:03 -0600

tommyo gravatar image

updated 2012-06-18 04:39:55 -0600

Can anybody shine some light on this error?

Exception in thread "main" org.ros.exception.RosRuntimeException: Unable to instantiate node: TestNode at org.ros.RosRun.main(RosRun.java:60) Caused by: java.lang.IllegalAccessException: Class org.ros.internal.loader.CommandLineLoader can not access a member of class TestNode with modifiers "" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95) at java.lang.Class.newInstance0(Class.java:366) at java.lang.Class.newInstance(Class.java:325) at org.ros.internal.loader.CommandLineLoader.loadClass(CommandLineLoader.java:240) at org.ros.RosRun.main(RosRun.java:54)

Edit: Apparently roslaunch needs the class(es) to have public visibility.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-07-02 23:16:01 -0600

damonkohler gravatar image

As you said, the RosRun class expects NodeMains to be public.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-18 01:25:03 -0600

Seen: 674 times

Last updated: Jul 02 '12