Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/common/ydlidar_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ typedef enum {
LidarPropDeviceType,/**< lidar connection type code */
LidarPropSampleRate,/**< lidar sample rate */
LidarPropAbnormalCheckCount,/**< abnormal maximum check times */
LidarPropIntenstiyBit,/**< lidar intensity bit count */
LidarPropIntensityBit,/**< lidar intensity bit count */
/* float properties */
LidarPropMaxRange = 20,/**< lidar maximum range */
LidarPropMinRange,/**< lidar minimum range */
Expand All @@ -79,7 +79,7 @@ typedef enum {
LidarPropInverted,/**< lidar inverted flag */
LidarPropAutoReconnect,/**< lidar hot plug flag */
LidarPropSingleChannel,/**< lidar single-channel flag */
LidarPropIntenstiy,/**< lidar intensity flag */
LidarPropIntensity,/**< lidar intensity flag */
LidarPropSupportMotorDtrCtrl,/**< lidar support motor Dtr ctrl flag */
LidarPropSupportHeartBeat,/**< lidar support heartbeat flag */
} LidarProperty;
Expand Down
2 changes: 1 addition & 1 deletion doc/Dataset.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# YDLIDAR DATASET
|LIDAR | Model | Baudrate | SampleRate(K) | Range(m) | Frequency(HZ) | Intenstiy(bit) | SingleChannel | voltage(V)|
|LIDAR | Model | Baudrate | SampleRate(K) | Range(m) | Frequency(HZ) | Intensity(bit) | SingleChannel | voltage(V)|
| :-------- |:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| F4 | 1 | 115200 | 4 | 0.12~12 | 5~12 | false | false | 4.8~5.2 |
| S4 | 4 | 115200 | 4 | 0.10~8.0 | 5~12 (PWM) | false | false | 4.8~5.2 |
Expand Down
24 changes: 12 additions & 12 deletions doc/YDLIDAR_SDK_API_for_Developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This document provides an extensive technical deep dive into how to create, mani

The first part of demonstrating YDLIDAR SDK API is to understand the ydlidar_test/tof_test/etlidar_Test example. Following are one optinal concepts: `ydlidar::os_init()` (basic unit) of the example.

### Create A System State
### Create A System State

In the YDLIDAR SDK, the `ydlidar::os_init()` is optinal unit, If you need to accept `Ctrl + C` or other system abnormal signals. you can use it to create a system state, and check whether the system is normal by `ydlidar::os_isOk()`.
The system signal creation interface is as follows:
Expand Down Expand Up @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) {
laser.setlidaropt(LidarPropSingleChannel, &b_optvalue, sizeof(bool));
/// intensity
b_optvalue = false;
laser.setlidaropt(LidarPropIntenstiy, &b_optvalue, sizeof(bool));
laser.setlidaropt(LidarPropIntensity, &b_optvalue, sizeof(bool));
/// Motor DTR
b_optvalue = false;
laser.setlidaropt(LidarPropSupportMotorDtrCtrl, &b_optvalue, sizeof(bool));
Expand Down Expand Up @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) {
fflush(stderr);
}

// Turn On success and loop
// Turn On success and loop
while (ret && ydlidar::os_isOk()) {
LaserScan scan;
if (laser.doProcessSimple(scan)) {
Expand Down Expand Up @@ -210,7 +210,7 @@ int main(int argc, char *argv[]) {
laser.setlidaropt(LidarPropSingleChannel, &b_optvalue, sizeof(bool));
/// intensity
b_optvalue = false;
laser.setlidaropt(LidarPropIntenstiy, &b_optvalue, sizeof(bool));
laser.setlidaropt(LidarPropIntensity, &b_optvalue, sizeof(bool));
/// Motor DTR
b_optvalue = false;
laser.setlidaropt(LidarPropSupportMotorDtrCtrl, &b_optvalue, sizeof(bool));
Expand Down Expand Up @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) {
fflush(stderr);
}

// Turn On success and loop
// Turn On success and loop
while (ret && ydlidar::os_isOk()) {
LaserScan scan;
if (laser.doProcessSimple(scan)) {
Expand Down Expand Up @@ -338,7 +338,7 @@ There are two ways to integrate YDLIDAR SDK into your project.
* [Add source code to the Project](#add-source-code-to-the-project).
- [Copy YDLIDAR SDK to your project](#copy-ydlidar-sdk-to-your-project)
- [Add YDLIDAR SDK project to the CMakeLists file of your project](#add-ydlidar-sdk-project-to-the-cmakelists-file-of-your-project)


### Calling a compliled library
The implementation of the demo mainly includes the following steps.
Expand Down Expand Up @@ -410,7 +410,7 @@ target_link_libraries(${PROJECT_NAME} ydlidar_sdk)

############## YDLIDAR SDK END#####################################
```
Note:
Note:
* If you do not want to generate samples in YDLidar-SDK, Add the following options when compiling:
```shell
$cmake -DBUILD_EXAMPLES=OFF ../ && make
Expand Down Expand Up @@ -472,7 +472,7 @@ For additional information and examples, refer to [CYDLidar](#cydlidar)
* - @ref LidarPropInverted
* - @ref LidarPropAutoReconnect
* - @ref LidarPropSingleChannel
* - @ref LidarPropIntenstiy
* - @ref LidarPropIntensity
* - @ref LidarPropSupportMotorDtrCtrl
* - @ref LidarPropSupportHeartBeat
* @note set bool property example
Expand Down Expand Up @@ -534,7 +534,7 @@ bool setlidaropt(int optname, const void *optval, int optlen);
* - @ref LidarPropInverted
* - @ref LidarPropAutoReconnect
* - @ref LidarPropSingleChannel
* - @ref LidarPropIntenstiy
* - @ref LidarPropIntensity
* - @ref LidarPropSupportMotorDtrCtrl
* - @ref LidarPropSupportHeartBeat
* @note get bool property example
Expand Down Expand Up @@ -652,7 +652,7 @@ void lidarDestroy(YDLidar **lidar);
* - @ref LidarPropInverted
* - @ref LidarPropAutoReconnect
* - @ref LidarPropSingleChannel
* - @ref LidarPropIntenstiy
* - @ref LidarPropIntensity
* - @ref LidarPropSupportMotorDtrCtrl
* - @ref LidarPropSupportHeartBeat
* @note set bool property example
Expand Down Expand Up @@ -715,7 +715,7 @@ bool setlidaropt(YDLidar *lidar, int optname, const void *optval, int optlen);
* - @ref LidarPropInverted
* - @ref LidarPropAutoReconnect
* - @ref LidarPropSingleChannel
* - @ref LidarPropIntenstiy
* - @ref LidarPropIntensity
* - @ref LidarPropSupportMotorDtrCtrl
* - @ref LidarPropSupportHeartBeat
* @note get bool property example
Expand Down Expand Up @@ -1340,7 +1340,7 @@ The Table that the user uses to perform parameter related operations:
For additional information and examples, refer to [Parameter](#code-example)

### Table List - Models
|LIDAR | Model | Baudrate | SampleRate(K) | Range(m) | Frequency(HZ) | Intenstiy(bit) | SingleChannel | voltage(V)|
|LIDAR | Model | Baudrate | SampleRate(K) | Range(m) | Frequency(HZ) | Intensity(bit) | SingleChannel | voltage(V)|
| :-------- |:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| F4 | 1 | 115200 | 4 | 0.12~12 | 5~12 | false | false | 4.8~5.2 |
| S4 | 4 | 115200 | 4 | 0.10~8.0 | 5~12 (PWM) | false | false | 4.8~5.2 |
Expand Down
24 changes: 12 additions & 12 deletions doc/tutorials/writing_lidar_network_adapter_tutorial_c++.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Tutorial Level: BEGINNER
mkdir beginner_tutorials
cd beginner_tutorials
```
### Create the lidar_tutorial.cpp file within the beginner_tutorials project and paste the following inside it:
### Create the lidar_tutorial.cpp file within the beginner_tutorials project and paste the following inside it:
[https://github.com/YDLIDAR/ydlidar_tutorials/blob/master/cpp_tutorials/lidar_tutorial/lidar_tutorial.cpp](https://github.com/YDLIDAR/ydlidar_tutorials/blob/master/cpp_tutorials/lidar_tutorial/lidar_tutorial.cpp)

```c++
Expand Down Expand Up @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) {
laser.setlidaropt(LidarPropSingleChannel, &b_optvalue, sizeof(bool));
/// intensity
b_optvalue = false;
laser.setlidaropt(LidarPropIntenstiy, &b_optvalue, sizeof(bool));
laser.setlidaropt(LidarPropIntensity, &b_optvalue, sizeof(bool));
/// Motor DTR
b_optvalue = false;
laser.setlidaropt(LidarPropSupportMotorDtrCtrl, &b_optvalue, sizeof(bool));
Expand Down Expand Up @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) {
fflush(stderr);
}

// Turn On success and loop
// Turn On success and loop
while (ret && ydlidar::os_isOk()) {
LaserScan scan;
if (laser.doProcessSimple(scan)) {
Expand Down Expand Up @@ -140,11 +140,11 @@ The device type `LidarPropDeviceType` value is changed from the `YDLIDAR_TYPE_SE


### The Code Explained
Now, let's break the code down.
Now, let's break the code down.
```c++
#include "CYdLidar.h"
```
CYdLidar.h is a convenience include that includes all the headers necessary to use the most common public pieces of the YDLIDAR SDK.
CYdLidar.h is a convenience include that includes all the headers necessary to use the most common public pieces of the YDLIDAR SDK.

```c++
ydlidar::os_init();
Expand All @@ -154,7 +154,7 @@ Initialize system signal. install a SIGINT handler which provides Ctrl-C handlin
```c++
CYdLidar laser;
```
Create a handle to this Lidar.
Create a handle to this Lidar.

```c++
//////////////////////string property/////////////////
Expand Down Expand Up @@ -213,7 +213,7 @@ Set Lidar string int paramters.
laser.setlidaropt(LidarPropSingleChannel, &b_optvalue, sizeof(bool));
/// intensity
b_optvalue = false;
laser.setlidaropt(LidarPropIntenstiy, &b_optvalue, sizeof(bool));
laser.setlidaropt(LidarPropIntensity, &b_optvalue, sizeof(bool));
/// Motor DTR
b_optvalue = false;
laser.setlidaropt(LidarPropSupportMotorDtrCtrl, &b_optvalue, sizeof(bool));
Expand Down Expand Up @@ -269,7 +269,7 @@ Start the device scanning routine which runs on a separate thread and enable mot


```c++
// Turn On success and loop
// Turn On success and loop
while (ret && ydlidar::os_isOk()) {
```
By `ydlidar::os_init()` will install a SIGINT handler which provides Ctrl-C handling which will cause `ydlidar::os_isOk()` to return false if that happens.
Expand Down Expand Up @@ -349,17 +349,17 @@ Linux:
you need to put `YDLIDAR_SDK_LIBRARIES` at the end.


you can use the following variable to depend on all necessary targets:
you can use the following variable to depend on all necessary targets:

```cmake
target_link_libraries(${PROJECT_NAME} ${YDLIDAR_SDK_LIBRARIES})
```
Now run cmake:
Now run cmake:
```cmake
# In your project directory
mkdir build
cd build
cmake ..
make j4
make j4
```
Now that you have written a simple lidar tutorial, let's [examine the simple lidar tutorial](examine_the_simple_lidar_tutorial.md).
Now that you have written a simple lidar tutorial, let's [examine the simple lidar tutorial](examine_the_simple_lidar_tutorial.md).
24 changes: 12 additions & 12 deletions doc/tutorials/writing_lidar_tutorial_c++.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Tutorial Level: BEGINNER
mkdir beginner_tutorials
cd beginner_tutorials
```
### Create the lidar_tutorial.cpp file within the beginner_tutorials project and paste the following inside it:
### Create the lidar_tutorial.cpp file within the beginner_tutorials project and paste the following inside it:
[https://github.com/YDLIDAR/ydlidar_tutorials/blob/master/cpp_tutorials/lidar_tutorial/lidar_tutorial.cpp](https://github.com/YDLIDAR/ydlidar_tutorials/blob/master/cpp_tutorials/lidar_tutorial/lidar_tutorial.cpp)

```c++
Expand Down Expand Up @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) {
laser.setlidaropt(LidarPropSingleChannel, &b_optvalue, sizeof(bool));
/// intensity
b_optvalue = false;
laser.setlidaropt(LidarPropIntenstiy, &b_optvalue, sizeof(bool));
laser.setlidaropt(LidarPropIntensity, &b_optvalue, sizeof(bool));
/// Motor DTR
b_optvalue = false;
laser.setlidaropt(LidarPropSupportMotorDtrCtrl, &b_optvalue, sizeof(bool));
Expand Down Expand Up @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) {
fflush(stderr);
}

// Turn On success and loop
// Turn On success and loop
while (ret && ydlidar::os_isOk()) {
LaserScan scan;
if (laser.doProcessSimple(scan)) {
Expand All @@ -140,11 +140,11 @@ int main(int argc, char *argv[]) {
```

### The Code Explained
Now, let's break the code down.
Now, let's break the code down.
```c++
#include "CYdLidar.h"
```
CYdLidar.h is a convenience include that includes all the headers necessary to use the most common public pieces of the YDLIDAR SDK.
CYdLidar.h is a convenience include that includes all the headers necessary to use the most common public pieces of the YDLIDAR SDK.

```c++
ydlidar::os_init();
Expand All @@ -154,7 +154,7 @@ Initialize system signal. install a SIGINT handler which provides Ctrl-C handlin
```c++
CYdLidar laser;
```
Create a handle to this Lidar.
Create a handle to this Lidar.

```c++
//////////////////////string property/////////////////
Expand Down Expand Up @@ -217,7 +217,7 @@ Set Lidar string int paramters.
laser.setlidaropt(LidarPropSingleChannel, &b_optvalue, sizeof(bool));
/// intensity
b_optvalue = false;
laser.setlidaropt(LidarPropIntenstiy, &b_optvalue, sizeof(bool));
laser.setlidaropt(LidarPropIntensity, &b_optvalue, sizeof(bool));
/// Motor DTR
b_optvalue = false;
laser.setlidaropt(LidarPropSupportMotorDtrCtrl, &b_optvalue, sizeof(bool));
Expand Down Expand Up @@ -273,7 +273,7 @@ Start the device scanning routine which runs on a separate thread and enable mot


```c++
// Turn On success and loop
// Turn On success and loop
while (ret && ydlidar::os_isOk()) {
```
By `ydlidar::os_init()` will install a SIGINT handler which provides Ctrl-C handling which will cause `ydlidar::os_isOk()` to return false if that happens.
Expand Down Expand Up @@ -353,17 +353,17 @@ Linux:
you need to put `YDLIDAR_SDK_LIBRARIES` at the end.


you can use the following variable to depend on all necessary targets:
you can use the following variable to depend on all necessary targets:

```cmake
target_link_libraries(${PROJECT_NAME} ${YDLIDAR_SDK_LIBRARIES})
```
Now run cmake:
Now run cmake:
```cmake
# In your project directory
mkdir build
cd build
cmake ..
make j4
make j4
```
Now that you have written a simple lidar tutorial, let's [examine the simple lidar tutorial](examine_the_simple_lidar_tutorial.md).
Now that you have written a simple lidar tutorial, let's [examine the simple lidar tutorial](examine_the_simple_lidar_tutorial.md).
Loading