Ask Your Question
0

problem with nxt_lejos_lcp_proxy

asked 2012-07-19 23:31:22 -0500

camilla gravatar image

updated 2012-07-20 01:50:28 -0500

Hi everybody! I'm a researcher, I'm working with ROSJava and a NXT. I'm trying to run LCPProxy.java but I have a problem. After launching the node I get this output:

* Configurate ROS Node

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

ROS Node Path: /home/camilla/my_workspace/nxt_lejos/nxt_lejos_lcp_proxy/
* Reading property file
Path: /home/camilla/my_workspace/nxt_lejos/nxt_lejos_lcp_proxy/nxt_lejos_ros/lcp_proxy.properties
BRICK-NAME: OKAY
CONNECTION: USB
YAML: NXT.yaml
Differential navigation features enabled
WHEEL_DIAMETER: 5.6
TRACK_WIDTH: 16.0
REVERSE: true
* Connecting with a NXT brick
Log.listener: Protocols = 1
Log.listener: Search Param = null
Log.listener: Searching for any NXT using USB
Found NXT: Unknown 001653079D95
ROS Node connected with a NXT brick
* Bind NXT brick with ROS
* Processing YAML file
YAML Path: /home/camilla/my_workspace/nxt_lejos/nxt_lejos_lcp_proxy/NXT.yaml
list size2
Type is ultrasonic
I found an ultrasonic  sensor description
ultrasonic_sensor
PORT_1
10.0
point1
Found NXT: Unknown 001653079D95
Failed to open connection to the NXT

It seems that the configurate and the connect steps succeed, but there is a problem in the bind() one. In particular in during the first iteration of the for loop in processYAML(). Infact debbuging the code I saw that the last instruction called is:

us = new UltrasonicSensor(node, port);

But I can't figure out why and where there is a new attempt to connect to the brick which produces the last two lines of the output:

Found NXT: Unknown 001653079D95
Failed to open connection to the NXT

can you help me find a solution?or at least to understand where in the code and why there is the new attempt of connection?

I'm using a NXT with the traditional Lego firmware and a usb connection.

my YAML file is:

nxt_robot:
  - type: ultrasonic
    name: ultrasonic_sensor
    port: PORT_1
    min_range: 0.01
    max_range: 2.5
    desired_frequency: 10.0
  - type: differential_navigation_system
    name: pilot
    port: PORT_AC
    desired_frequency: 10.0
    track_width: 16.0
    wheel_diameter: 5.6
    reverse: true

(specifing another sensor or actuator as first element of the yaml file I get the same error, so the problem isn't specific of the ultrasonic sensor).

my lcp_proxy.properties file is:

NXT-BRICK: OKAY
CONNECTION-TYPE: USB
YAML-ROBOT-DESCRIPTOR: NXT.yaml
DIFFERENTIAL_NAVIGATION_FEATURES: true
WHEEL_DIAMETER: 5.6
TRACK_WIDTH: 16.0
REVERSE: true

Looking forward to hearing from you. :)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-07-20 07:28:33 -0500

allenh1 gravatar image

updated 2012-07-20 07:30:46 -0500

My guess is that you have not flashed your NXT with the lejos firmware. Install lejos and flash the usb. See if the error is still there. I have arrived at this conclusion based on the fact that it is detecting it, but not getting information from it.


Instructions for flashing firmware can be found here.

edit flag offensive delete link more
0

answered 2012-07-24 22:28:09 -0500

camilla gravatar image

Thank you Allen, you're right I didn't flash the firmware. But the roswiki ( http://www.ros.org/wiki/nxt_lejos_lcp_proxy ) states that:

"LCP is the protocol used by the standard LEGO Mindstorms firmware, so this package(nxt_lejos_lcp_proxy) should also work with NXT robots running the standard firmware."

Therefore the fact that I didn't flash the firmware shouldn't cause any problem.

edit flag offensive delete link more

Comments

Please use a comment on @allenh1's answer next time ('post a comment'), instead of using an answer. Answers have no chronological order (they can be rearranged, via voting, etc), which can become confusing for future readers. In other cases, just update your original question.

ipso gravatar image ipso  ( 2012-07-24 23:12:01 -0500 )edit

I am simply suggesting that you might try to flash to lejos firmware. It it doesn't work, then go back to the normal firmware.

allenh1 gravatar image allenh1  ( 2012-07-25 05:46:22 -0500 )edit

I just tried to run the program after flashing the firmware, but still get the same error. Probably the problem is that i should run the ROSResponder on the nxt brick, can someone tell me how to do it?

camilla gravatar image camilla  ( 2012-07-25 22:54:50 -0500 )edit
0

answered 2012-07-27 01:58:57 -0500

LawrieGriffiths gravatar image

It is best to use nxt_lejos_proxy (with ROSResponder on the NXT brick), as nxt_lejos_lcp_proxy is not currently being developed and nxt_lejos_proxy is much faster. If you do use nxt_lejos_lcp_proxy, it should work with the standard Lego firmware, but this has not tested, so there could be a problem.

It looks as if there is a problem with your USB connection to the NXT. I always use Bluetooth, so USB has not been tested much. The error you are getting sometimes occurs when there is already an active connection to the NXT. Have you successfully used the USB connection to the NXT? Did you try rebooting the NXT?

I suggest that you use nxt_lejos_proxy and ROSResponder if you can. The tutorial for this has now been updated, and works for me.

If you can use Bluetooth rather than USB it is better as you do not need a USB cable attached to the robot. It works fast enough with nxt_lejos_proxy. It is very easy to use. All you should need to do is plug in a USB Bluetooth dongle (if your PC does not have Bluetooth), and pair the NXT with the default 1234 pin.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-19 23:31:22 -0500

Seen: 216 times

Last updated: Jul 27 '12