I’m trying to get started with my LiDAR kit, but I’m a bit confused with the lidar API. Specifically, I would like to know:
-
What does OnRenew()
do and when is its parameter f()
called? In the lidar API example, the function f()
is used to report lidar data, but I want to know when this is done and what this data is.
-
How can I fix the following error when calling OneScan()
: “errno: 44, errstr: start one scan cmd of radar is error”? My code is as follows:
lidar.Start()
lidar.StartWork()
data, err := lidar.OneScan()
if err != nil {
log.Error.Println(err)
}
log.Info.Println(data)
lidar.StopWork()
lidar.Close()
-
When should SwitchModel()
be used? It is not clear what this method does.