Thumbnail

Hitachi-LG LDS Lidar

by Hitachi

NMS Driver for the Hitachi-LG LDS 360 degree lidar.

How to add the Hitachi-LG LDS Lidar robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Navigation category tab.
  5. 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. To understand how this skill can be used, reference the NMS manual page.

Screenshot

User-inserted image

Configuration

User-inserted image

1) BaudRate value The baud rate for communication to the USB serial adapter or Arduino. By default, the baud rate for the lidar should be 230400. However, some USB serial converters use different baud rates between the PC's USB port. The baud rate between the lidar and USB adapter must be 230400.

2) Offset Degrees value Correct the angle that the lidar is mounted

3) Advanced communication parsing checkbox 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 checkbox If you're not using the NMS, check this option. The global variables will be created for the scan data if this checkbox is checked.

5) Fake NMS Pose hint event checkbox 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.

6) RTS Enabled checkbox RTS (Ready To Send) is an optional signal line for UART communication. Some USB adapters, specifically some Arduinos, may require this to be enabled. If your USB Serial adapter is not responding, you may need to enable or disable this option.

7) DTR Enabled checkbox DTR (Data Terminal Ready) is an optional signal line for UART communication. Some USB adapters, specifically some Arduinos, may require this to be enabled. If your USB Serial adapter is not responding, you may need to enable or disable this option.

NMS (Navigation Messaging System)

This skill operates in Level #3 Group #1 and publishes obstacle detection to the NMS. While some SLAM systems will attempt to determine the robot's cartesian position without telemetry, it is best to combine this skill with a Group #2 sensor. 

User-inserted image

A recommended navigation robot skill is The Better Navigator, which uses the NMS data.

Program the LIDAR in Blockly Like all Synthiam controls, the Blockly programming language can be used. In the 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.

User-inserted image

Variables You can view the variables this skill creates in the configuration menu of this control. The variables hold the most recent values of the lidar's minimum/maximum distance, degrees, and running status. Here is a list showing the variables using the Variable Watcher robot skill.

User-inserted image

Arduino Sketch

There are two ways to connect to this lidar. You can use a standard USB<->UART converter, such as those 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 because they support emulating USB HID devices, such as serial devices.

Here is a simple sketch that can be used on a 32u4-based board...


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


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#41   — Edited

I found a commercial retailer who seems to have them in stock, but it is the 1.0 version for $179 US, not the 1.5.   https://dabit.industries/products/360-laser-distance-sensor-lds-01-lidar

I am willing to go around $100 for something guaranteed to work for object avoidence in NMS, but $179 for what might not be the right one seems a little rich.  Hitachi now has a 2.0, but I can't find them for sale anywhere.  Probably just selling to vacuum manufacturers.

I guess I am stuck with ultrasonic object avoidence for now.  It is OK, but misses soft surfaces like curtains.  May need to rig up a bump sensor, or get some more Sharp IR to augment. (I use a Sharp for cliff detection because there is a step down into my family room, but I don't think I'll need it using way point nav with the Real sense, So I might repurpose it).

PRO
Synthiam
#42  

If you guys can find another lidar (say from robotshop or somewhere accessible in stock) then we can can add support to that.

Alan, you could use a simple ultrasonic distance sensor for obstacle avoidance with the NMS. The Navigator will pause navigation and launch a script when obstacle has been detected. That's configurable in the config menu.

#43   — Edited

Robot shop has 2 sub $100 devices in stock.

https://www.robotshop.com/en/rplidar-a1m8-360-degree-laser-scanner-development-kit.html

Although a review I read in the reviews that  the SDK was written by a drunken lobster, and https://www.robotshop.com/en/ydlidar-x2-360-laser-scanner.html which I believe is a brand you complained about the SDK in another thread, although I could be mis remembering.

For my initial experiments, I am fine using Ultrasonic because it should work well enough in my basement, but if I don't get something much more precise, I won't ever be able to run it on the main floor, because if I dent the maple dining set, my wife will first destroy the robots, and then kick me out of the house:)

PRO
Synthiam
#44  

Ha that’s funny. I usually say drunken sailer but a drunken lobster is pretty good!

PRO
Synthiam
#45  

Added options in the config menu for Baud Rate and Offset Degrees.

@PTP, this will work with the robotis USB <-> UART converter. You'll need to install the CP210x Windows Driver though. Because they're using a chipset that doesn't have a default windows driver. Get it from the manual link above

PRO
USA
#46   — Edited

This is a follow up from the thread: https://synthiam.com/Community/Questions/Distance-detection-for-NMS-20392 post: #31

I got a new Lidar Hitachi lidar from ebay: https://www.ebay.com/itm/360-degree-LiDAR-sensor-ranging-distance-scanning-module-ROS/313448191749

The lidar has 2 connectors:

User-inserted image

Pinout:

User-inserted image

You need to connect:

LDS 6 Pin: BLACK <--->  Arduino or USB/UART - GND RED <--->  Arduino or USB/UART - 5V GREEN <---> Arduino or USB/UART - TX BROWN <---> Arduino or USB/UART - RX ORANGE <--> MOTOR Black wire BLUE - free

LDS 2 Pin: BLACK <---> LDS 6 Pin ORANGE RED <---> Arduino or USB/UART - 5V

Connecting the Lidar to an USB/UART CP2104

User-inserted image

Note: As you can see above there is Y connection for the 5V connection.

CP2104 USB/UART: https://www.adafruit.com/product/3309

  • the above board as an extra 5V pad (no need for a Y connection).

And It works with DJ plugin.

PRO
USA
#47   — Edited

Love to see a video with this working in the navigation plug in!!!

Edit: Ordered!

PRO
Portugal
#48  

Nice tut ptp. U.S only... damm