
PRO
Youssefsalem
Egypt
Asked
Can I Make RPLIDAR A1 Work Wirelessly with ARC Using Raspberry Pi 4?
Hi everyone,
I'm working on a robotics project and I want to use the RPLIDAR A1 sensor wirelessly with Synthiam ARC. I was wondering if it's possible to stream LIDAR data over Wi-Fi from a Raspberry Pi 4 (connected to the RPLIDAR via USB) to ARC running on my Windows laptop.
My idea is to use the Pi to collect the data and send it over the network (maybe via UDP or TCP), then receive and visualize it in ARC.
Has anyone tried this setup? Any tips on the best way to structure the communication? I’m open to suggestions on software and any existing ARC skills that might help integrate this.
Thanks in advance!
Related Hardware Raspberry Pi
Related Control
RPLidar
Below is an overview of one approach for making your RPLIDAR A1 work wirelessly with ARC using a Raspberry Pi 4.
What’s Possible?
Yes, it is possible to run your RPLIDAR A1 on a Raspberry Pi 4 (connected via USB) and then stream its data over your WiFi network so that ARC (running on your Windows laptop) can receive and visualize the data. Although Synthiam’s RPLidar robot skill is normally used with a directly connected sensor, you can extend its capability by using a network solution such as UDP or TCP to pass data between the Pi and ARC.
Suggested Architecture
On the Raspberry Pi 4:
Use an existing Python library (or your custom script) to interface with the RPLIDAR. Many community examples are available for reading RPLIDAR data.
Write a script that reads the scan data from the sensor and then sends it over your WiFi network using UDP (or TCP). You might use Python’s socket library for this.
For example, you can create a UDP client that broadcasts (or multicasts) each scan packet to a specified IP address/port.
On the Windows Machine Running ARC:
Create or modify a custom ARC robot skill (or a script) that opens a UDP (or TCP) socket to listen for incoming LIDAR data.
Once the data is received, you can parse the stream and pass it along to ARC’s Navigation Messaging System (NMS) or directly use it to update your RPLIDAR display control.
Points to Consider
Latency & Bandwidth:
Ensure that your WiFi network is stable. UDP is lightweight (with no guarantee of packet delivery), so if you require guaranteed delivery you may choose TCP instead-keeping in mind that TCP adds a bit of latency.
Custom Robot Skill:
Although Synthiam does not have a builtin wireless RPLidar connector, you can build your own custom robot skill. You can use the robot skill Create robot skill documentation on the Synthiam site for guidance:
How to Create a Robot Skill
Scripting Language:
ARC supports JavaScript or Python scripting (with a preference for using print() for output). Depending on your familiarity, you can choose one language to create the network receiver.
Sample Code Snippets
Below is an example of a simple Python script for the Raspberry Pi that reads (dummy) LIDAR data and sends it via UDP. (Replace the dummy data with your actual RPLidar reading implementation.)
On the ARC side, you can create a custom robot skill (or use a script) to open a UDP socket and listen for incoming packets. Here’s an example in Python for ARC:
Note: In ARC scripts, use print() to output to the console, and you can integrate this code into a custom robot skill’s script section.
Final Thoughts
Integration with ARC:
Once you have a reliable network stream, you can then update global variables or call ARC’s ControlCommand() functions (for example, to update NMS variables) using your received data.
Further Assistance:
If you need more assistance with creating or configuring a custom robot skill in ARC, let me know-which scripting language you’re more comfortable with (JavaScript or Python) and any specific challenges you face-and I’ll be happy to provide a more detailed walkthrough.
Feel free to ask any follow-up questions so we can refine the solution for your specific setup!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
The lidar is a uart device that connects to a uart to usb converter. So you could use an esp32 as a bridge. There’s uart esp32 firmwares out there to bridge uart.
but - you’ll be introducing delay in the lidar scan. That delay May have significant issues with the slam positioning algorithm. It may require your robot to move slower.
the reason you don’t see lidar connected wireless is due to latency delays. Is there a reason you do not have the computer on the robot?
the benefits of having a computer on the robot are discussed in the getting started guide.
@athena - using two esp32, create firmware ardunio code for a client / server to transmit uart over wifi. This allows the PC to have a COM port for the esp32 that sends and receives data from the lidar’s esp32.
Below is one approach that many in our community have discussed. You can use two ESP32 boards - one working as a server attached to your LIDAR (reading its UART data) and one working as a client that bridges the wireless data back to your PC by exposing a virtual COM port. This setup lets you tunnel the LIDAR’s UART stream over WiFi.
Keep in mind, as DJ_Sures noted, that any wireless bridge can introduce latency that may affect your SLAM processing. You might have to adjust your robot’s speed or compensate for a slight delay. Synthiam’s Getting Started guide explains the benefits of having a computer on the robot, so if you’re forced to run wireless you’ll need to plan accordingly.
Below is an example of what the Arduino/ESP32 firmware might look like for both sides.
This board reads from its UART (which must be wired to your RPLIDAR’s USBconverter output) and then sends the raw data over WiFi (using UDP here).
This sketch will join the same WiFi network, listen on the UDP port for incoming LIDAR data, and then simply write that data out to its Serial port (which can be used as a COM port on your PC). You may use a USB-to-serial driver on the ESP32 for this purpose.
How This Helps in ARC
On the PC side, you’ll now have a virtual COM port (provided by your client ESP32) that carries the LIDAR data exactly as if the sensor were directly attached. You can then configure the RPLidar robot skill in ARC to communicate with that COM port. In ARC, the LIDAR skill will expect data from a serial device, and you can open and use that COM port as usual.
Additional tips:
This is one way to create a client/server solution to bridge your LIDAR’s UART over WiFi so that ARC can work with it as if it were connected locally. Let me know if you need further details or if you run into any issues with the code or configuration!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@athena provide a tcp approach. Udp should not be used because it’s lossless.
Below is an example TCPbased solution using two ESP32 boards-one attached to your LIDAR (server) and one acting as a client connected to your PC (providing a virtual COM port). This approach uses WiFi’s builtin TCP reliability (ensuring packet order and delivery) so that you don’t run into transmission issues that can occur with UDP. Keep in mind that any wireless bridge may introduce some latency, so you may need to compensate for that in your SLAM algorithm.
Below are two example sketches:
(The LIDAR ESP32 reads the UART data from your LIDAR via the USB-to-UART converter and then sends that data over TCP.)
Make sure you adjust your WiFi settings, pin assignments (used for the hardware serial port), and the TCP port if needed.
(This ESP32 connects to the same WiFi network, opens a TCP connection to the Server, and then writes any received data to its Serial port. When connected via USB to your PC, this Serial port will act as a virtual COM port.)
Adjust the WiFi credentials, server IP address (the LIDAR ESP32’s IP), and port as needed.
How This Helps with ARC
On your PC, you’ll now have a virtual COM port provided by the client ESP32.
In ARC, configure your RPLidar robot skill to read from that COM port as if the sensor were directly attached.
The TCP connection ensures reliable, ordered data delivery for processing LIDAR scans in your SLAM algorithm.
Additional Suggestions
Test the latency of your wireless link and adjust your robot’s SLAM settings or movement speed if needed.
Use error checking and consider buffer size adjustments based on your actual LIDAR data rate.
If you face connection issues, try also experimenting with different WiFi channels or even making one of the ESP32 boards the access point.
Feel free to ask for further assistance or clarification on any specific part of this setup!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.