https://github.com/ar-ray-code/tmini_plus_emulator
Serial LiDAR emulator (T-mini Plus)
https://github.com/ar-ray-code/tmini_plus_emulator
Last synced: 4 months ago
JSON representation
Serial LiDAR emulator (T-mini Plus)
- Host: GitHub
- URL: https://github.com/ar-ray-code/tmini_plus_emulator
- Owner: Ar-Ray-code
- License: apache-2.0
- Created: 2025-09-13T18:04:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-09-16T15:35:39.000Z (5 months ago)
- Last Synced: 2025-09-16T17:59:19.219Z (5 months ago)
- Language: C++
- Size: 35.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tmini_plus_emulator
Serial LiDAR emulator (T-mini Plus)
## Requirements
- CMake >= 3.10 and a C++ compiler
- socat (for virtual serial port)
- ydlidar_ros2_driver (for ROS2 node)
## Build
```bash
git clone https://github.com/Ar-Ray-code/tmini_plus_emulator.git
mkdir -p tmini_plus_emulator/linux/build
cd tmini_plus_emulator/linux/build
cmake ..
make -j$(nproc)
./tmini_plus_emulator
```
## Usage
### Terminal 1
Setup a virtual serial port pair
```bash
socat -d -d pty,raw,echo=0,link=/tmp/ttyEMUL pty,raw,echo=0,link=/tmp/ttyROS
```
### Terminal 2 (Emulator side)
Run the emulator ([example_data.txt](data/example_data.txt) is provided)
```bash
cd
./tmini_plus_emulator /tmp/ttyEMUL ../../data/example_data.txt
## If you want to stream the data repeatedly, use the --stream option
# ./tmini_plus_emulator /tmp/ttyEMUL ./tmini_plus_emulator/data/example_data.txt --stream
```
### Terminal 3 (YDLidar ROS side)
Setup the [ydlidar_ros](https://github.com/YDLIDAR/ydlidar_ros2_driver) repo and run the ROS2 node
[lidar_params.yaml](config/lidar_params.yaml) is provided, make sure to set the `port` parameter to `/tmp/ttyROS`
```bash
source /install/setup.bash
ros2 launch ydlidar_ros2_driver ydlidar_launch.py params_file:=
```
### Terminal 4 (View the data)
Open RViz2 and add a LaserScan display, setting the topic to `/scan`
```bash
source /opt/ros//setup.bash
rviz2
```

## References
[YDLDIAR T-MINI PLUS DEVELOPMENT MANUAL](https://cdn.soselectronic.com/productdata/1f/ec/c83edf83/t-mini-plus.pdf)