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

Rosjava - could not instantiate node

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

tommyo gravatar image

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

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( 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( at java.lang.Class.newInstance0( at java.lang.Class.newInstance( at org.ros.internal.loader.CommandLineLoader.loadClass( at org.ros.RosRun.main(

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

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

damonkohler gravatar image

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

edit flag offensive delete link more

Question Tools


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

Seen: 661 times

Last updated: Jul 02 '12