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

Problem running lcp_proxy in nxt-lejos-pkg

asked 2012-03-14 07:17:49 -0500

Alexandr Buyval gravatar image

updated 2014-01-28 17:11:38 -0500

ngrennan gravatar image

I try use lcp_proxy for bind PC and Lego NXT. I got source:

svn co https://lejos.svn.sourceforge.net/svnroot/lejos lejos

I compiled lcp_proxy normal. I created file lcp_proxy.properties:

NXT-BRICK: NXT
CONNECTION-TYPE: USB_CONNECTION
YAML-ROBOT-DESCRIPTOR: /home/alex/.ros/NXT2.yaml

I created file NXT2.yaml:

nxt_robot:
  - type: ultrasonic
    name: ultrasonic_sensor
    port: PORT_4
    spread_angle: 0.2
    min_range: 0.01
    max_range: 2.5
    desired_frequency: 10.0

I ran node lcp_proxy:

roslaunch lcp_proxy lcp_proxy.launch

and got error:

Loading node class: org.lejos.ros.nodes.LCPProxy
* Configurate ROS Node

*********************
* Running LCPProxy *
*********************

ROS Node Path: /home/alex/.ros/
* Reading property file
Path: /home/alex/.ros/lcp_proxy.properties
BRICK-NAME: NXT
CONNECTION: USB_CONNECTION
YAML: /home/alex/.ros/NXT2.yaml
* Connecting with a NXT brick
Exception in thread "pool-1-thread-7" java.lang.NoClassDefFoundError: lejos/nxt/remote/NXTCommRequest
    at org.lejos.ros.nodes.LCPProxy.connect(Unknown Source)
    at org.lejos.ros.nodes.LCPProxy.onStart(Unknown Source)
    at org.ros.internal.node.DefaultNode$1.run(DefaultNode.java:424)
    at org.ros.internal.node.DefaultNode$1.run(DefaultNode.java:421)
    at org.ros.concurrent.ListenerCollection$1.run(ListenerCollection.java:108)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: lejos.nxt.remote.NXTCommRequest
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 8 more
Mar 14, 2012 7:59:18 PM org.ros.internal.node.topic.DefaultPublisher$1 onMasterRegistrationSuccess
INFO: Publisher registered: Publisher<PublisherDefinition<PublisherIdentifier<NodeSlaveIdentifier</lcp_proxy, http://127.0.0.1:54634>, TopicIdentifier</rosout>>, TopicDefinition<TopicIdentifier</rosout>, MessageDefinition<rosgraph_msgs/Log, acffd30cd6b6de30f120938c17c593fb>>>>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-03-17 14:09:57 -0500

LawrieGriffiths gravatar image

nxt_lejos is at any early stage of development, and has not yet been used by anyone other than the developers.

Your problem is probably that pccomm.jar does not exist in the expected directory. You may need to edit the export section of manifest.xml and build.xml to change the paths to those used on your system, and then run rosmake. You will probably also need to build leJOS or install a Linux version of leJOS 0.9.1 on your system. To build from source, you can run the ant build.xml file in the snapshot directory.

There is a better replacement for lcp_proxy now - nxt_lejos_proxy, but that will probably have the same problems. There are installation instructions and a tutorial for nxt_lejos_proxy, but they have not yet been tested and will need improvement. nxt_lejos_proxy uses the parameter server and does not need the properties file.

edit flag offensive delete link more

Comments

Thank you! I have solved problem. I changed paths in manifest.xml

Alexandr Buyval gravatar image Alexandr Buyval  ( 2012-03-17 17:17:40 -0500 )edit

@Alexandr Buyval please accept this answer or make one of your own and accept it to show that it's been answered and others shouldn't try to help you.

tfoote gravatar image tfoote  ( 2012-03-18 19:39:20 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-03-14 07:17:49 -0500

Seen: 426 times

Last updated: Mar 17 '12