NMS Driver for the Hitachi-LG LDS 360 degree lidar.
How to add the Hitachi-LG LDS Lidar robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Navigation category tab.
- Press the Hitachi-LG LDS Lidar icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Hitachi-LG LDS Lidar robot skill.
How to use the Hitachi-LG LDS Lidar robot skill
NMS Driver for the Hitachi-LG LDS 360 degree lidar. This robot skill connects to the Lidar and pushes the data into ARC's NMS (navigation messaging system) to be used with level 1 navigation viewers. Read the NMS manual page to understand how this skill can be used.Screenshot

Configuration

1) BaudRate
The baud rate for the communication.
2) Offset Degrees
Correct the angle that the lidar is mounted
3) Advanced communication parsing
Include debug information in the log window. This is only recommended if asked by Synthiam to help debug a communication issue. Otherwise, this will use a lot of resources.
4) Set variables with location data
If you're not using the NMS, check this, and global variables will be created for the scan data.
5) Fake NMS Pose hint event
The Better Navigator can use the Hector SLAM pose hint, which will not require a pose sensor. You can enable this option if you have The Better Navigator configured to use Hector as the pose hint. This will send a "fake" pose hint of 0,0 to the NMS so that the pose event will run after every lidar scan.
NMS (Navigation Messaging System)
This skill operates in Level #3 Group #1. It publishes obstacle detection to the NMS. While some SLAM systems will attempt to determine the cartesian position of the robot without telemetry, it is best to combine this skill with a Group #2 sensor.

How to Use EZ-LIDAR SLAM
Program the LIDAR in Blockly
Like all Synthiam controls, the Blockly programming language can be used. In this example below, the robot will speak when an object has come close to it. It will also speak the degrees of where the object was. To see this program in action, click HERE.

Variables
In the configuration menu of this control, you can view the variables that this skill creates. The variables hold the most recent values of minimum/maximum distance, degrees, and running status of the lidar.

Arduino Sketch
There are two ways to connect to this lidar. You can either use a standard USB<->UART convertor, such as those found on amazon or eBay. Or you can use a 32u4 based Arduino board (i.e. Micro) to make your own USB<->UART converter. The 32u4 based boards are necessary Arduino versions to use because they support emulating USB HID devices, such as a Serial device.
Here is a simple sketch that can be used on a 32u4 based board...
Code:
void setup() {
Serial1.begin(230400); // Init Hardware Serial port on pins 0 and 1
Serial.begin(230400); // Init Serial Port
}
void loop() {
if (Serial.available())
Serial1.write(Serial.read());
if (Serial1.available())
Serial.write(Serial1.read());
}
Wiring
GREY - Ground
RED - +5
GREEN - RX (connects to TX on Arduino or USB Converter)
BROWN - TX (connects to RX on Arduino or USB converter)
Robotis USB <-> UART Converter
The Robotis version of this sensor may include their USB UART converter, which uses a CP210x chipset. The driver for windows can be found by clicking here: CP210x_Windows_Drivers.zip
Videos
Real-time SLAM mapping
Room Mapping
Near Object Detection
Resources
The source files for the hardware can be found here: github.com/synthiam/E-41_LIDAR
I was hoping for the parts you used. I see many different parts and would like to use the same as you, please.
I jurat don't want to get the wrong ones,
Thanks in advance.
Cheers
Can you give any details on your new faster computer, like RAM, etc.
Noticed them on Amazon with different options.
Sounds like you are getting good results with navigation.
Thanks,
Steve S
Note, the whole bottom half is a dock that can have a laptop sized SATA hard drive or SSD installed, so if you don't need the extra storage space the computer is only half as tall without the dock. (the latest pictures in my Long Life Roli thread show it sitting on top of a large power bank. The computer runs on 12v.
https://synthiam.com/Community/Robots/Long-lasting-Roli-20253
Alan
Hitachi-LG LDS Lidar. I keep getting Parser: Packet failed CRC check errors. Does anyone no way? see below...
System.Exception: Lidar service parse error: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Hitachi_LG_LDS_Lidar.LidarSensorParser.ParseRawSensorPacket(Byte[] data) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarSensorParser.cs:line 44
at Hitachi_LG_LDS_Lidar.MainForm._lidarService_OnLidarDataReady1(Object sender, Byte[] lidarData) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\MainForm.cs:line 201
at Hitachi_LG_LDS_Lidar.LidarServiceUART.imageThreadWorker(EZTaskScheduler sender, Int32 taskId, Object o) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarServiceUART.cs:line 176
at Hitachi_LG_LDS_Lidar.LidarServiceUART.imageThreadWorker(EZTaskScheduler sender, Int32 taskId, Object o) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarServiceUART.cs:line 182
at EZ_B.EZTaskScheduler.jn1guWLfLhdrbRwRngL(Object , Object , Int32 taskId, Object )
at EZ_B.EZTaskScheduler.tLuXrWNGK5()
System.Exception: Lidar service parse error: System.NullReferenceException: Object reference not set to an instance of an object.
at Hitachi_LG_LDS_Lidar.MainForm._lidarService_OnLidarDataReady1(Object sender, Byte[] lidarData) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\MainForm.cs:line 221
at Hitachi_LG_LDS_Lidar.LidarServiceUART.imageThreadWorker(EZTaskScheduler sender, Int32 taskId, Object o) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarServiceUART.cs:line 176
at Hitachi_LG_LDS_Lidar.LidarServiceUART.imageThreadWorker(EZTaskScheduler sender, Int32 taskId, Object o) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarServiceUART.cs:line 182
at EZ_B.EZTaskScheduler.jn1guWLfLhdrbRwRngL(Object , Object , Int32 taskId, Object )
at EZ_B.EZTaskScheduler.tLuXrWNGK5()
System.Exception: Lidar service parse error: System.NullReferenceException: Object reference not set to an instance of an object.
at Hitachi_LG_LDS_Lidar.MainForm._lidarService_OnLidarDataReady1(Object sender, Byte[] lidarData) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\MainForm.cs:line 221
at Hitachi_LG_LDS_Lidar.LidarServiceUART.imageThreadWorker(EZTaskScheduler sender, Int32 taskId, Object o) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarServiceUART.cs:line 176
at Hitachi_LG_LDS_Lidar.LidarServiceUART.imageThreadWorker(EZTaskScheduler sender, Int32 taskId, Object o) in C:\My Documents\SVN\Developer - Controls\In Production\Hitachi-LG LDS Lidar\MY_PROJECT_NAME\LidarServiceUART.cs:line 182
at EZ_B.EZTaskScheduler.jn1guWLfLhdrbRwRngL(Object , Object , Int32 taskId, Object )
at EZ_B.EZTaskScheduler.tLuXrWNGK5()
Thanks in advance.
The error occurs when the data is corrupt. This can be due to the USB port being too busy and can't process the data quick enough. Or the sensor isn't getting enough power. Or the sensor is faulty and while spinning, it isn't making a good connection to send the correct amount of data.
Things to check are
- The wire isn't surrounded or wrapped in power lines or other signal lines
- The wire isn't connected securely to the usb uart adapter or sensor
- The sensor isn't getting enough power
- The sensor contacts is dusty and needs to be cleaned
- The usb port is busy with other devices. Try another usb port or disconnect some items on the usb line
Does the robot skill stop when it receives that error?
Hitachi-LG LDS Lidar. stop.
it does render and variable smart watch and on the scale itself maybe it’s my PC or my usb hub. Not sure but if it’s rendering the variables it should work OK I believe.
thanks for your help DJ.
- it includes an option to fake the NMS pose hint event so you can use this 360 lidar without a pose sensor with The Better Navigator. Read manual above for more information
Upright or upside down?
I assume it doesn't matter to the Lidar ... lol ... but would the software have a problem with it?
Asking before mounting.
Thanks
Rotation is fine but upside down is never allowed for lidars. It’s the mechanics of how it spins and the bearings and such. They can’t mount upside down