LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Hokuyo URG-04LX and example LabVIEW project

Hello everyone,

I have problem with Hokuyo URG-04LX lidar. I know that this model works with LabVIEW.  When I run a sample program, I get errors. I don't know how to configure that. I've followed instructions from tutorial in order to install drivers. I've tested this device with sample program provided by producer, so I know that it is not a problem. Please tell me how and where I should configure LabVIEW and sample VI. I can send you screenshots, but I don't know what would be useful for you.

 

Thanks for any response.

Best regards,

Michael

0 Kudos
Message 1 of 11
(6,986 Views)

Hi Michael,

 

Please take a look over this robot recipe that uses the URG-04LX lidar sensor: NIcholas.

I think the answer to your question is:

 

Additional Resources

To view the project files used for NIcholas, including LIDAR sensor driver, throttle steering and obstacle avoidance example VIs, view the NI Example Finder in your LabVIEW Robotics software, open the Robotics>>Sample Robots folder and double-click NIcholas.lvproj.

 

Success!

Patricia

0 Kudos
Message 2 of 11
(6,959 Views)

Can you more precisely describe the errors you are seeing?  Are you communicating through USB or Serial?  What versions of LabVIEW and NI-VISA are you using?

0 Kudos
Message 3 of 11
(6,951 Views)

PatriciaAD,

I don't know what you exactly mean. As I wrote before I tried to run sample program, which is provided with driver. It could be also find in NI Example Finder in LabVIEW Robotics software, when you choose Robotics >> Sensor Drivers >> Hokuyo URG Series

 

Brian Powell,

When I run a program I mentioned before I get two different errors. They depend on disabling/enabling ID Query. Sonar1.png

And the other one:

Sonar2.png

 

I use LabVIEW Robotics 2009 SP1 (32-bit), and VISA is 5.0.3

I'm communicating through virtual COM. I plug it to USB, but I set its values in Device Manager in Windows as Serial.

0 Kudos
Message 4 of 11
(6,939 Views)

There's a slight possibility that the USB to Serial device isn't properly supporting the Microsoft serial API (which VISA uses under the hood).  I doubt this is the issue, but it's something to rule out.

 

NI-VISA includes a utility (under Start -> Programs -> National Instruments, somewhere) called NI Spy.  This can trace all of the VISA calls, and show any errors that occur.  Coupled with the fact that we include LabVIEW source code to the Hokuyo driver, you should be able to debug this pretty quickly.  Basically, confirm whether we are getting errors opening/configuring the connection, or getting errors because the LIDAR isn't returning what we expected.

 

0 Kudos
Message 5 of 11
(6,931 Views)

Hello Brian Powell,

Thank you for your response. I've opened NI Spy and then I run sample VI. I didn't get any errors connected with VISA Calls.

I also tried to debug it using Highlight Execution, and it seams like it has problems with initialization, but I don't know how to configure it correctly.

Below I present my configuration and the Block Diagram.

 

error2.png            error.png

0 Kudos
Message 6 of 11
(6,922 Views)

Can you include the firmware version you are using?  Is the baud rate on the Initialize front panel the same as the baud rate in MAX?

Can you try stepping through Initialize to see where the error is being generated?

0 Kudos
Message 7 of 11
(6,913 Views)

Version of driver is 2.1 and I got it from here . Yes, I've checked it before, baud rates are the same, and I set also in VI this value (19200).

I solved problem with initialization, I just turned laser power.

 

laser turn off.png

I don't know if it still makes sense, but then I didn't get errors from other VIs.

 

property node.png

 

I still get 0 from Property Node - User Data, so I get Inf values after dividing and finally start step = end step = 0. Measured distance is 0 with Direction 0 degrees. I don't know exactly what for is here used this Property Node, may I replace it somehow ?

0 Kudos
Message 8 of 11
(6,903 Views)

Hi, i am now also currently using urg-04lx sensor too, i am seeking for advice to install the usb driver as i no idea how to install it ><

 

Are you available spare some moment explain how to connect to the Virtual COM with the USB connection? This is really urgent matter for me, Thank you=)

Message 9 of 11
(6,348 Views)

Hi LemonSkin,

 

I am not sure I understand your problem. Could you please write some more information?

Are you using a USB to serial interface? If so, what is the model?

Best regards,
Jano
0 Kudos
Message 10 of 11
(6,304 Views)