From 4f40f4a508db74a5985134a39b4bb925aa7da252 Mon Sep 17 00:00:00 2001 From: Adrian Krzeminski Date: Mon, 30 Mar 2026 15:57:11 +0200 Subject: [PATCH 1/9] Update the RPlidar S3 tutorial to match latest template --- .../lidars/slamtec-rplidar-s3.mdx | 103 +++++++++++------- 1 file changed, 65 insertions(+), 38 deletions(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index 2f975b2b..58edc2b3 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -13,27 +13,19 @@ keywords: description: >- Learn how to connect an RPLiDAR S3 sensor to your Leo Rover for 2D mapping and more. Detailed tutorial mechanical and software integration. +# TODO: Replace with a proper image of Leo Rover with mounted RPLIDAR S3 image: /img/robots/leo/integrations/rplidar-s3/rplidar-s3.webp --- -# SLAMTEC RPLIDAR S3 Integration - -import Product from '@site/src/products/powerbox.mdx'; +import Product from '@site/src/products/slamtec-rplidar-s3.mdx'; +import Powerbox from '@site/src/products/powerbox.mdx'; import LiteYouTubeEmbed from 'react-lite-youtube-embed'; -This tutorial will guide you through the process of connecting a LiDAR sensor to -your Leo Rover. - -Light Detection and Ranging devices, or lidars for short, are mechanisms used -for mapping the environment, object detection, tracking the speed of vehicles -and in a wide range of other applications. In robotics 2D lidars, like A2M8 / -A2M12, are used for things such as indoor SLAM -([Simultaneous localization and mapping](https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping)) -or safety systems. - +{/* TODO: Replace with a proper image of Leo Rover with mounted RPLIDAR S3 */} +# SLAMTEC RPLIDAR S3 Integration + +This tutorial will guide you through the process of connecting a LiDAR sensor to +your Leo Rover. + +Light Detection and Ranging devices, or lidars for short, are mechanisms used +for mapping the environment, object detection, tracking the speed of vehicles +and in a wide range of other applications. In robotics 2D lidars, like A2M8 / +A2M12, are used for things such as indoor SLAM +([Simultaneous localization and mapping](https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping)) +or safety systems. + ## What to expect? After finishing the tutorial you should be able to both gather the lidar data @@ -49,15 +53,23 @@ and visualize it using RViz. Just like in the image below: +The robot will publish +[LaserScan messages](https://docs.ros2.org/latest/api/sensor_msgs/msg/LaserScan.html) +on the `/scan` topic. + ## Prerequisites +Below is the list of all necessary tutorials and hardware components required to +complete the integration. + @@ -68,15 +80,13 @@ and visualize it using RViz. Just like in the image below: additional functionalities, building ROS packages and more." /> -## List of components +### Referenced products -- RPLidar S3 -- RPLidar S3 adapter plate (can be found here: - [Addon adapters](../addon-adapters#rplidar-s3-adapter)) -- M5x10 Allen head screw x4 -- M2.5x6 Allen head screw x4 + + +## Hardware integration -## Mechanical integration +### Mounting We developed 3D printable models of mechanical interfaces that allow you to mount the aforementioned sensor to the mounting plate of the rover. Locating the @@ -84,19 +94,30 @@ sensor at the top of the robot provides a wide field of view with not many obstacles for the laser beam to get caught on. Get the files from here: [Addon Adapters](../addon-adapters/). +Required components: + +- RPLidar S3 +- RPLidar S3 adapter plate (can be found here: + [Addon adapters](../addon-adapters#rplidar-s3-adapter)) +- M5x10 Allen head screws x4 +- M2.5x6 Allen head screws x4 + +Steps: + - With 4 x M2.5x6 Allen screws, connect the sensor to the printed interface plate. - Use 4 x M5x10 Allen screws to fasten the sensor to the Leo Rover. -## Wiring and electronics connection +### Wiring The sensor can be connected to the robot's main computer via the USB socket positioned at the top of the rover. If your USB cable is long it might get into -lidars field of view if it sticks up too much. try to hide it in the empty space -inside Leo Rovers back frame. Just like on the photo below: +the lidar's field of view if it sticks up too much. Try to hide it in the empty +space inside Leo Rover's back frame. Just like on the photo below: + With everything connected, you are ready to try out your new sensor. @@ -169,6 +190,14 @@ In `/etc/ros/robot.launch.xml`: ``` +The last step is to either reboot the robot or restart the nodes. + +```bash +ros-nodes-restart +``` + +### Modifying the URDF model + Your robot should be aware of where the sensor is located and what space it occupies. You can ensure it does that by creating a URDF model of the sensor. @@ -241,7 +270,7 @@ occupies. You can ensure it does that by creating a URDF model of the sensor. ``` -And including it in the description that is uploaded at boot. +And include it in the description that is uploaded at boot. ```xml title="/etc/ros/urdf/robot.urdf.xacro" @@ -255,13 +284,7 @@ STL or COLLADA format. ::: -The last step is to either reboot the robot or restart the nodes. - -```bash -ros-nodes-restart -``` - -## Examples +## Example usage ### Reading and visualizing the data @@ -308,6 +331,7 @@ topic. Choose the **LaserScan** display and click **Ok**. @@ -322,6 +346,7 @@ which you can use to change the displayed laser. @@ -336,6 +361,7 @@ display. @@ -344,6 +370,7 @@ Be sure to select `/camera/image_color` as the Image Topic. @@ -360,13 +387,13 @@ Here's an example end result: /> -## What next? +## What's next? Lidars are commonly used in projects involving [autonomous navigation](/leo-rover/advanced-guides/autonomous-navigation), you might be interested in a tutorial about it. -They are however, not the only way of teaching a Leo Rover how to move on it's +They are however, not the only way of teaching a Leo Rover how to move on its own. Check out our [line follower](/leo-rover/1.8/leo-examples/line-follower) tutorial if you want to learn more. You can also check our [Integrations page](/integrations) for more instructions. From 4e3fc4009a83e58e3f7f1201fe16f35f90d0d10c Mon Sep 17 00:00:00 2001 From: Adrian Krzeminski Date: Mon, 30 Mar 2026 15:57:25 +0200 Subject: [PATCH 2/9] Add SLAMTEC RPLIDAR S3 product preview component --- src/products/slamtec-rplidar-s3.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/products/slamtec-rplidar-s3.mdx diff --git a/src/products/slamtec-rplidar-s3.mdx b/src/products/slamtec-rplidar-s3.mdx new file mode 100644 index 00000000..75b077df --- /dev/null +++ b/src/products/slamtec-rplidar-s3.mdx @@ -0,0 +1,11 @@ +import ProductPreview from '@site/src/components/ProductPreview'; + +{/* TODO: Replace imageSrc with a proper product image when available */} + From 0f5557a39a6129be88f4b2d73f17ddf363cf3de6 Mon Sep 17 00:00:00 2001 From: Adrian Krzeminski Date: Mon, 30 Mar 2026 16:10:10 +0200 Subject: [PATCH 3/9] Add step by step mounting --- .../lidars/slamtec-rplidar-s3.mdx | 51 ++++++++++++------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index 58edc2b3..b7b69817 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -88,25 +88,47 @@ complete the integration. ### Mounting -We developed 3D printable models of mechanical interfaces that allow you to -mount the aforementioned sensor to the mounting plate of the rover. Locating the -sensor at the top of the robot provides a wide field of view with not many -obstacles for the laser beam to get caught on. Get the files from here: -[Addon Adapters](../addon-adapters/). +If you bought the integration kit, you can use the mounting adapter included in +the kit. It is designed to mount the sensor on top of the rover's mounting plate, +providing a wide field of view with minimal obstructions. Required components: - RPLidar S3 -- RPLidar S3 adapter plate (can be found here: - [Addon adapters](../addon-adapters#rplidar-s3-adapter)) +- RPLidar S3 adapter plate (included in the integration kit) - M5x10 Allen head screws x4 - M2.5x6 Allen head screws x4 -Steps: +To mount the sensor: -- With 4 x M2.5x6 Allen screws, connect the sensor to the printed interface - plate. -- Use 4 x M5x10 Allen screws to fasten the sensor to the Leo Rover. +1. Align the RPLIDAR S3 with the adapter plate and secure it using 4 x M2.5x6 + Allen head screws — one in each corner of the sensor base. +2. Place the assembled sensor on the top of the Leo Rover's mounting plate. +3. Fasten the adapter plate to the rover using 4 x M5x10 Allen head screws. + +:::tip + +If you don't have the integration kit, you can also 3D print the adapter plate +yourself. Get the files from the [Addon Adapters](../addon-adapters#rplidar-s3-adapter) page. + +::: + +:::note + +The URDF model provided in this guide assumes the sensor is mounted using our +adapter plate in the default position on top of the rover. If you mount the +sensor in a different position, you will need to adjust the origin values in the +URDF file accordingly so that the sensor is correctly positioned in the robot +model. + +::: + +:::info + +When positioning the sensor, make sure the laser beam's 360° field of view is +not obstructed by cables, antennas, or other parts of the rover. + +::: ### Wiring @@ -125,13 +147,6 @@ space inside Leo Rover's back frame. Just like on the photo below: }} /> -:::info - -When mounting the sensor, you should be particularly careful not to obstruct the -field of view by other parts of the Rover. - -::: - USB connection provides power to the sensor and allows the data transfer. This means that no external power sources are necessary. However, if you want a cleaner and more reliable power and data connection, we recommend using the From 22c58506c8506a6130f4032c1421fdcacf9c6001 Mon Sep 17 00:00:00 2001 From: Adrian Krzeminski Date: Mon, 30 Mar 2026 16:15:51 +0200 Subject: [PATCH 4/9] Update the wiring section --- .../lidars/slamtec-rplidar-s3.mdx | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index b7b69817..a4c771e0 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -132,10 +132,15 @@ not obstructed by cables, antennas, or other parts of the rover. ### Wiring -The sensor can be connected to the robot's main computer via the USB socket -positioned at the top of the rover. If your USB cable is long it might get into -the lidar's field of view if it sticks up too much. Try to hide it in the empty -space inside Leo Rover's back frame. Just like on the photo below: +The RPLIDAR S3 uses a TTL interface and comes with a TTL-to-USB adapter. To +connect it to Leo Rover 1.9, use the following chain: + +1. Plug the TTL cable from the sensor into the **TTL-to-USB adapter** (included + with the lidar). +2. Connect the **micro USB to USB-A cable** (included with the lidar) to the + micro USB port on the adapter. +3. Use the **USB-A to USB-C adapter** (included with Leo Rover) to connect the + cable to the **USB-C port** on top of the rover. -USB connection provides power to the sensor and allows the data transfer. This -means that no external power sources are necessary. However, if you want a -cleaner and more reliable power and data connection, we recommend using the -Powerbox addon: +If the cable is long, try to tuck it into the empty space inside Leo Rover's +back frame to keep it away from the lidar's field of view. + +This connection provides both power and data transfer to the sensor, so no +external power source is necessary. However, if you want a cleaner and more +reliable connection, we recommend using the Powerbox addon: From 072d6c1915f3410cd744689be8805aea28c4ccd2 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Thu, 7 May 2026 11:00:34 +0200 Subject: [PATCH 5/9] Format RPLIDAR S3 product --- src/products/slamtec-rplidar-s3.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/products/slamtec-rplidar-s3.mdx b/src/products/slamtec-rplidar-s3.mdx index 75b077df..6b298135 100644 --- a/src/products/slamtec-rplidar-s3.mdx +++ b/src/products/slamtec-rplidar-s3.mdx @@ -1,6 +1,7 @@ import ProductPreview from '@site/src/components/ProductPreview'; {/* TODO: Replace imageSrc with a proper product image when available */} + Date: Thu, 7 May 2026 11:01:33 +0200 Subject: [PATCH 6/9] Update and format mechanical integration --- .../lidars/slamtec-rplidar-s3.mdx | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index a4c771e0..5c3094a8 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -22,6 +22,7 @@ import Powerbox from '@site/src/products/powerbox.mdx'; import LiteYouTubeEmbed from 'react-lite-youtube-embed'; {/* TODO: Replace with a proper image of Leo Rover with mounted RPLIDAR S3 */} + + ### Referenced products @@ -89,8 +95,8 @@ complete the integration. ### Mounting If you bought the integration kit, you can use the mounting adapter included in -the kit. It is designed to mount the sensor on top of the rover's mounting plate, -providing a wide field of view with minimal obstructions. +the kit. It is designed to mount the sensor on top of the rover's mounting +plate, providing a wide field of view with minimal obstructions. Required components: @@ -109,17 +115,8 @@ To mount the sensor: :::tip If you don't have the integration kit, you can also 3D print the adapter plate -yourself. Get the files from the [Addon Adapters](../addon-adapters#rplidar-s3-adapter) page. - -::: - -:::note - -The URDF model provided in this guide assumes the sensor is mounted using our -adapter plate in the default position on top of the rover. If you mount the -sensor in a different position, you will need to adjust the origin values in the -URDF file accordingly so that the sensor is correctly positioned in the robot -model. +yourself. Get the files from the +[Addon Adapters](../addon-adapters#rplidar-s3-adapter) page. ::: @@ -142,6 +139,15 @@ connect it to Leo Rover 1.9, use the following chain: 3. Use the **USB-A to USB-C adapter** (included with Leo Rover) to connect the cable to the **USB-C port** on top of the rover. +:::tip + +To avoid the cable getting in the way of the sensor's field of view, you can use +a right-angle adapter for the USB-C port or use the +[easy access cover for the main electronics box](/leo-rover/addons/additional-meb-covers#00188_dev---easy-access-cover) +and wire the cables without using the USB-C port on top of the rover. + +::: + Date: Thu, 7 May 2026 11:02:26 +0200 Subject: [PATCH 7/9] Update software integration --- .../lidars/slamtec-rplidar-s3.mdx | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index 5c3094a8..1c3c8657 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -171,16 +171,22 @@ With everything connected, you are ready to try out your new sensor. ## Software integration +:::info + +Perform these steps on the Leo Rover computer. + +::: + The first thing you can do is to make sure your device has the correct permissions and is available at the fixed path on your system. To do this, you -can add the following rule to the udev service: +can add the following rule to the udev service by creating a file named +`lidar.rules` in the `/etc/udev/rules.d/` directory with the following content: ```xml title="/etc/udev/rules.d/lidar.rules" KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0666", GROUP="dialout", SYMLINK+="lidar" ``` -Paste these lines to `/etc/udev/rules.d/lidar.rules` file and reload udev rules -by typing: +After creating the file, reload udev rules by typing: ```bash sudo udevadm control --reload-rules && sudo udevadm trigger @@ -188,12 +194,10 @@ sudo udevadm control --reload-rules && sudo udevadm trigger Your device should now be available at the `/dev/lidar` path. -We want the sensor functionality to be available in the ROS ecosystem, so you -should install a ROS package that provides a node for the sensor you are trying -to integrate. +Next, install a ROS package that provides a node for the sensor: ```bash -sudo apt install ros-${ROS_DISTRO}-rplidar-ros +sudo apt update && sudo apt install ros-${ROS_DISTRO}-rplidar-ros ``` Now, create a launch file that would start the node with a fitting @@ -209,16 +213,16 @@ configuration. ``` -Include your launch file in the `robot.launch.xml` file, so that your node will -start at boot. +Include your launch file in the `/etc/ros/robot.launch.xml` file, so that your +node will start at boot. -In `/etc/ros/robot.launch.xml`: +Insert the following line between the `` tags of the file: -```xml +```xml title="/etc/ros/robot.launch.xml" ``` -The last step is to either reboot the robot or restart the nodes. +The last step is to either reboot the robot or restart the nodes with: ```bash ros-nodes-restart @@ -229,6 +233,16 @@ ros-nodes-restart Your robot should be aware of where the sensor is located and what space it occupies. You can ensure it does that by creating a URDF model of the sensor. +:::note + +The URDF model provided in this guide assumes the sensor is mounted using our +adapter plate in the default position on top of the rover. If you mount the +sensor in a different position, you will need to adjust the origin values in the +URDF file accordingly so that the sensor is correctly positioned in the robot +model. + +::: + ```xml title="/etc/ros/urdf/laser.urdf" @@ -298,7 +312,8 @@ occupies. You can ensure it does that by creating a URDF model of the sensor. ``` -And include it in the description that is uploaded at boot. +And include it in the description that is uploaded at boot in between the +`` tags. ```xml title="/etc/ros/urdf/robot.urdf.xacro" @@ -312,6 +327,12 @@ STL or COLLADA format. ::: +To apply the changes, restart the nodes again. + +```bash +ros-nodes-restart +``` + ## Example usage ### Reading and visualizing the data From bf5f9c37c35f4aae4b3dd018eb7c952aed311653 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Thu, 7 May 2026 11:02:44 +0200 Subject: [PATCH 8/9] Update example usage --- .../lidars/slamtec-rplidar-s3.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index 1c3c8657..a035ee9d 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -356,23 +356,23 @@ guide: Step-by-step guide for beginners." /> -Now, open RViz by typing `rviz2` in the terminal, or, if you have the `leo_viz` -package installed, type: +To open RViz, type: ```bash -ros2 launch leo_viz rviz.launch +rviz2 ``` -This will start RViz with visualization of the current robot model. - -:::info +:::note -You can easily install the `leo_viz` package with this command +Make sure that ROS is sourced on your computer, if not you can do it by typing: ```bash -sudo apt install ros-${ROS_DISTRO}-leo-desktop +source /opt/ros//setup.bash ``` +and replacing `` with the name of your ROS distribution, for +example `jazzy`. + ::: On the Displays panel click **Add** -> **By topic** and search for the `/scan` @@ -387,7 +387,7 @@ topic. Choose the **LaserScan** display and click **Ok**. :::info -Sometimes the scan data might not be visible as it will melt with the +Sometimes the scan data might not be visible as it will blend in with the background. To fix this you need to change the color of the displayed laser. To do so, use the drop down arrow option from added **LaserScan** and set **Color Transformer** to **FlatColor**. As you do so, there will appear **Color** option @@ -431,7 +431,7 @@ Here's an example end result: id="oD5Sp7T0Ki0" params="autoplay=0&autohide=1&showinfo=0&rel=0" poster="hqdefault" - title="Leo Rover Unboxing and Getting Started" + title="Leo Rover with RPLIDAR S3" webp /> @@ -443,6 +443,6 @@ Lidars are commonly used in projects involving might be interested in a tutorial about it. They are however, not the only way of teaching a Leo Rover how to move on its -own. Check out our [line follower](/leo-rover/1.8/leo-examples/line-follower) +own. Check out our [line follower](/leo-rover/leo-examples/line-follower) tutorial if you want to learn more. You can also check our [Integrations page](/integrations) for more instructions. From 545bb9191aef58011108aa74b87de695b2bd8924 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Thu, 7 May 2026 11:06:39 +0200 Subject: [PATCH 9/9] Clarify integration page redirect --- docs/integrations/lidars/slamtec-rplidar-s3.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/integrations/lidars/slamtec-rplidar-s3.mdx b/docs/integrations/lidars/slamtec-rplidar-s3.mdx index a035ee9d..7fb47e02 100644 --- a/docs/integrations/lidars/slamtec-rplidar-s3.mdx +++ b/docs/integrations/lidars/slamtec-rplidar-s3.mdx @@ -445,4 +445,5 @@ might be interested in a tutorial about it. They are however, not the only way of teaching a Leo Rover how to move on its own. Check out our [line follower](/leo-rover/leo-examples/line-follower) tutorial if you want to learn more. You can also check our -[Integrations page](/integrations) for more instructions. +[Integrations page](/integrations) for other sensors that might complete your +setup.