Code Monkey home page Code Monkey logo

livox-sdk's Issues

关于雨雪雾的抗干扰能力

在Mid40的手册中看到有抗雨雾的功能,而Horizon中没有看到。请问下,Mid系列和Horizon哪个抗雨雪雾的抗干扰能力更好一些?

Error when run livox_ros_driver on 18.04

Hi, I am using MID-100, and I runing the livox_ros_driver on ubuntu 18.04, there is an error on Livox-SDK:
[console] [error] Receive Failed Socket operation on non-socket [device_discovery.cpp] [OnData] [87]
Any advice?
The pointcloud in rviz is just like below shape, is that OK? if not, is that related to above error?
image

livox mid-40 failed to start sampling

Hi, I just received the livox mid-40 lidar. I followed the instructions to connect the lidar and my laptop to the same router via ethernet. The lidar is powered by a power supply and the sync wire is not plugged in. However, there is no pointcloud data.

I tried both linux 16.04 and windows livox viewer, and they both failed. Screenshots are attached. How can I diagnose this issue?

img_8181
img_8182

Thanks.

raspberry

您好,在树莓派下cmake,有错误,请问需要改哪里

pi@raspberrypi:~/Livox-SDK $ cd build && cmake ..
CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake:174 (file):
file failed to open for writing (No such file or directory):

/home/pi/Livox-SDK/build/CMakeFiles/CMakeOutput.log

Call Stack (most recent call first):
CMakeLists.txt:3 (project)

CMake Error: Could not open file for write in copy operation /home/pi/Livox-SDK/build/CMakeFiles/3.13.4/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:3 (project)

mac环境下,执行make命令的时候发生以下错误

mac环境下,执行make命令的时候发生以下错误,只能ubuntu环境吗,不支持mac编译吗

[ 72%] Linking CXX executable lidar_lvx_sample
[ 72%] Built target lidar_lvx_sample
Scanning dependencies of target hub_sample_cc
[ 74%] Building CXX object sample_cc/hub/CMakeFiles/hub_sample_cc.dir/lds_hub.cpp.o
[ 76%] Building CXX object sample_cc/hub/CMakeFiles/hub_sample_cc.dir/main.cpp.o
[ 79%] Linking CXX executable hub_sample_cc
[ 79%] Built target hub_sample_cc
Scanning dependencies of target lidar_sample_cc
[ 81%] Building CXX object sample_cc/lidar/CMakeFiles/lidar_sample_cc.dir/main.cpp.o
[ 83%] Building CXX object sample_cc/lidar/CMakeFiles/lidar_sample_cc.dir/lds_lidar.cpp.o
[ 86%] Linking CXX executable lidar_sample_cc
[ 86%] Built target lidar_sample_cc
Scanning dependencies of target trouble_shooting
[ 88%] Building CXX object sample_cc/trouble_shooting/CMakeFiles/trouble_shooting.dir/main.cpp.o
[ 90%] Linking CXX executable trouble_shooting
[ 90%] Built target trouble_shooting
Scanning dependencies of target lidar_utc_sync
[ 93%] Building CXX object sample_cc/lidar_utc_sync/CMakeFiles/lidar_utc_sync.dir/main.cpp.o
[ 95%] Building CXX object sample_cc/lidar_utc_sync/CMakeFiles/lidar_utc_sync.dir/lds_lidar.cpp.o
[ 97%] Building CXX object sample_cc/lidar_utc_sync/CMakeFiles/lidar_utc_sync.dir/synchro.cpp.o
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:36: error: use of undeclared identifier 'B460800'; did you mean 'BR460800'?
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^~~~~~~
BR460800
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:59:3: note: 'BR460800' declared here
BR460800,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:45: error: use of undeclared identifier 'B500000'; did you mean 'BR500000'?
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^~~~~~~
BR500000
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:60:3: note: 'BR500000' declared here
BR500000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:54: error: use of undeclared identifier 'B576000'; did you mean 'BR576000'?
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^~~~~~~
BR576000
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:61:3: note: 'BR576000' declared here
BR576000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:62: error: use of undeclared identifier 'B921600'; did you mean 'BR921600'?
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^~~~~~~
BR921600
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:62:3: note: 'BR921600' declared here
BR921600,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:70: error: use of undeclared identifier 'B1152000'; did you mean 'BR1152000'?
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^~~~~~~~
BR1152000
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:63:3: note: 'BR1152000' declared here
BR1152000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:80: error: use of undeclared identifier 'B1500000'
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:273:90: error: use of undeclared identifier 'B2000000'; did you mean 'BR2000000'?
B460800, B500000, B576000,B921600,B1152000, B1500000, B2000000,
^~~~~~~~
BR2000000
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:65:3: note: 'BR2000000' declared here
BR2000000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:274:36: error: use of undeclared identifier 'B2500000'
B2500000, B3000000, B3500000, B4000000
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:274:46: error: use of undeclared identifier 'B3000000'; did you mean 'BR3000000'?
B2500000, B3000000, B3500000, B4000000
^~~~~~~~
BR3000000
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:67:3: note: 'BR3000000' declared here
BR3000000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:274:56: error: use of undeclared identifier 'B3500000'
B2500000, B3000000, B3500000, B4000000
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:274:66: error: use of undeclared identifier 'B4000000'; did you mean 'BR4000000'?
B2500000, B3000000, B3500000, B4000000
^~~~~~~~
BR4000000
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.h:69:3: note: 'BR4000000' declared here
BR4000000,
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:296:23: error: use of undeclared identifier 'CBAUD'
options.c_cflag &= ~CBAUD;
^
/Users/nyis/jemoo/Livox-SDK/sample_cc/lidar_utc_sync/synchro.cpp:299:41: warning: format specifies type 'int' but the argument has type 'tcflag_t' (aka 'unsigned long') [-Wformat]
printf("[Baudrate]: %d %d\r\n", baud, baudrate);
~~ ^~~~~~~~
%lu
1 warning and 12 errors generated.
make[2]: *** [sample_cc/lidar_utc_sync/CMakeFiles/lidar_utc_sync.dir/synchro.cpp.o] Error 1
make[1]: *** [sample_cc/lidar_utc_sync/CMakeFiles/lidar_utc_sync.dir/all] Error 2
make: *** [all] Error 2

Multiple livox devices connect compute

Two livox through two network connect one compute, only receive one livox's data.Livox and compute in the same network segment.
Multiple mode how to work?

Interferences between multiple sensors

I use 2 livox mid-40 sensors that scan at the same time. When I get the scanned output I see there are a lot of wrong measurements, e.g. very far values etc. When the sensors scan the environment one after another and not at the same time everything works fine. So I assume some reflections from one sensor go into into the other sensor leading to wrong measurements.

Am I doing something wrong? Is there a way to filter out these wrong measurement?

This is really a big issue. The sensors are supposed to work together...

Livox SDK on Win10

Hi,

I have followed instructions to compile the Livox SDK on Win10. After connecting my Mid-40 successfully, I run lidar_sample.exe following Step 4.2.2, and it shows the following figures. Is it normal? I dont know why the programme automatically stops.

image

How to read .lvx file

Hello, I have some .lvx files created by Mid-40, and I want to get its data in my code, so I wonder if there is any tools or SDK or some other methods that can do this, thanks!

Pi Builds failing

Compiling when outside the 64bit shell yields errors relating to apr1.h and off_64_t mentioned in the first post

Is it possible to compile 32bit version of the livox-sdk? Reason being that Pi3 camera is inaccessible in the ds64 shell

follow the guide for installation on ubuntu on my raspberry pi, but running the make command gives med the following error about unknown type name 'off64_t'

pi@raspberrypi:~/livox/Livox-SDK/build $ make
[ 84%] Built target livox_sdk_static
[ 88%] Building C object sample/hub/CMakeFiles/hub_sample.dir/main.c.o
In file included from /usr/include/apr-1.0/apr_general.h:28,
from /home/pi/livox/Livox-SDK/sample/hub/main.c:33:
/usr/include/apr-1.0/apr.h:358:10: error: unknown type name ‘off64_t’
typedef off64_t apr_off_t;
^~~~~~~
sample/hub/CMakeFiles/hub_sample.dir/build.make:62: recipe for target 'sample/hub/CMakeFiles/hub_sample.dir/main.c.o' failed
make[2]: *** [sample/hub/CMakeFiles/hub_sample.dir/main.c.o] Error 1
CMakeFiles/Makefile2:140: recipe for target 'sample/hub/CMakeFiles/hub_sample.dir/all' failed
make[1]: *** [sample/hub/CMakeFiles/hub_sample.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Is there a specific way for installation on a raspberry pi or what to do?

Build failed: could not find PkgConfig

I am trying to build the SDK from the latest release. When I run cmake .. the output is the following:

-- main project dir: /home/ubuntu/Livox-SDK
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/Livox-SDK/build

If I try to continue and run make, the build fails with

fatal error: apr_general.h: No such file or directory
  #include "apr_general.h"

However, I checked and the correct libraries are installed and the apr_general.h file exists in /usr/include/apr-1.0/

[request] Add export config.cmake file

Currently, Livox SDK doesn't export config.cmake files.
In general, libraries build with CMake provide config.cmake to find it.
It will be able to find the Livox SDK using find_package(livox_sdk) in CMakeLists.txt of user project.
It provides good experience for many developers.
Please consider to export config.cmake. Thanks,

关于Livox点云的覆盖范围和精度问题

    看官网上的宣传说基本能在1秒内接近100%的覆盖率,不知道这个覆盖率是如何定义的?个人感觉应该和视场范围、深度等因素都有联系。
    我目前遇到的问题是这样的,采用Mid-40、Horizon对一个固定的静态的场景进行扫描,如果按照官方标定的1秒左右就可以完成100%覆盖的话,那么我收集5秒的数据后,应该就可以完成背景初始化了,然后再接收实时点云数据,利用深度信息与原始背景进行比较,检测出遗落的其它物体或通过的运动物体。但实际情况是:背景初始化完成后,在实时点云数据与背景进行对比时却发现存在很多深度信息与背景不同的点(但实际情况是完全相同的场景),起初我猜测是不是我背景收集的数据还不够多,于是我把背景初始化的时长增大到30秒(收集30秒的数据,建立不同位置(x,y)的初始深度信息),然而实时对比时仍然存在很多深度信息有明显差异的点。
    我的程序逻辑是对监测区域初始化为一张网格,每个格子的大小是如果是5cm,深度信息对比就是拿实时与背景相对应的网格的深度进行对比。即使如此,对于相同的静态场景(室内),积累30秒背景,实时对比时也仍然有很多深度差异较大的格子。
    请问,这是什么原因?或者我应该如何调整我的程序逻辑?

False depth values on Object edges

I found that on object edges the depth values are extrapolated over the background. This happens where the background behind the edge lies in a shadowed region (the intensity here is zero), however, there, depth values are still given but falsely given by the object contour and not the background.

Why does this happen? And how can I fix this? It seems to me that this is due to the different position of the emitter and detector of the lidar. But why are the intensity values correct but not the depth values?

livox horizon和imu时间同步

您好,我在用livox horizon和xsens的imu录数据,请问我怎么样才能得到同步的时间戳呢,我想知道硬件上需要怎么连接,我用的驱动是livox_ros_driver.谢谢!

Heartbeat Packet Format

Hello,

I am a graduate student in geomatics at the University of Florida and I have just begun development of a Python3 driver for the Mid-40 sensor. I am using a Mac computer and hence don't have the ability to run the binaries that Livox provided and therefore I can not thoroughly packet sniff the valid UDP communications. I have been able to follow the SDK documentation and acquire and parse the broadcast message (coming in on port 55000). I have tested the CRC16 and CRC32 checks using the initial values stated in the SDK and everything in my code agrees with all the broadcast messages coming in over all 255 frame sequences.

This is the command (hex) that I send to the sensor as a connection/handshaking request, which sets my IP to 192.168.33.1 and the point cloud port to 1981 and command port to 65000:
AA 01 17 00 00 00 00 64 39 00 01 C0 A8 21 01 BD 07 E8 FD 1E 25 F9 12

Upon sending the connection request, I receive the following response message (coming in now on port 65000, as excepted):
AA 01 10 00 01 00 00 64 53 00 01 00 F1 34 3C 29

The content of this message is as expected and the 5th last hex char (00) indicates to me that the connection request was successful, as per the SDK. At this point in time I send a heartbeat request command. The following command is what I send:
AA 01 0F 00 00 00 00 04 D7 00 03 38 BA 8D 0C

I am under the assumption that the hex chars in this command will always remain the same every time a heartbeat request is sent? Unfortunately, after sending this heartbeat request command, I do not receive a response message. After the heartbeat timeout occurs I once again receive the broadcast message over port 55000.

My question is, are you certain that your documentation is correct for the heartbeat command format? I am hoping that you could examine my command messages and ensure that my understanding is correct and that they conform to your standards.

Thanks,

Ryan

P.S. You have a mistake in your SDK documentation in section 2.1, Frame Format. You state that the Size (bytes) of the crc_32 Whole Frame Checksum is 2 bytes when it should be 4 bytes (i.e., 32 bits).

Get information and Data from SDK with no static callbacks C functions

Hi.

I am developing a system with your Lidars. I have my applications in C++ and all code have Objects with their respective Classes.

I want a class for controlling the Lidar, but the SDK all the information has the Callbacks for Get information and data of Lidar and on C++ in a Class with not static functions I can't configure Callbacks.

I don't see any methods on SDK to connect lidar, get information or get data without Callbacks, It is correct??.

Do you have any plan for have a C++ Class of methods or methods to get information directly from a function returning the structures requested from a specific Lidar??

My system have one defined Lidar for device and have the specfied broadcast_code for connect and Static IP, and I want to connect directly without broadcasting and waiting packets for connect.

In a first approach my class looks like this and fails compiling on "SetDeviceStateUpdateCallback":

Lidar.h:


#include "livox_sdk.h"

typedef enum {
	kDeviceStateDisconnect = 0,
	kDeviceStateConnect = 1,
	kDeviceStateSampling = 2,
} DeviceState;

class Lidar
{
private: //Properties
	string sTAG = "Lidar";

	string sCode = "XXXXXX7006003XX";

	uint8_t uiHandle = 0;
	uint8_t uiDeviceState = kDeviceStateDisconnect;
	DeviceInfo xDeviceInfo;
public: //Properties

private: //Method
	void vOnDeviceChange(const DeviceInfo *info, DeviceEvent type);

public: //Method
	Lidar();
	~Lidar();
};

Lidar.cpp:

#include "Lidar.h"

void Lidar::vOnDeviceChange(const DeviceInfo * xDeviceInfo, DeviceEvent xDeviceEventType)
{
	try {
		if (xDeviceInfo != NULL) {
			if (uiHandle == xDeviceInfo->handle) {
				if (xDeviceEventType == kEventConnect) {
					//QueryDeviceInformation(this->uiHandle, Lidar::vOnDeviceInformation, NULL);
					this->uiDeviceState = kDeviceStateConnect;
					this->xDeviceInfo = *xDeviceInfo;
				}
				else if (xDeviceEventType == kEventDisconnect) {
					this->uiDeviceState = kDeviceStateDisconnect;
				}
				else if (xDeviceEventType == kEventStateChange) {
					this->xDeviceInfo = *xDeviceInfo;
				}

				if (this->uiDeviceState == kDeviceStateConnect) {
					if (this->xDeviceInfo.state == kLidarStateNormal) {
						this->uiDeviceState = kDeviceStateSampling;
					}
				}
			}
			else {
				
			}
		}else{
			
		}
	}
	catch (std::exception& e) {
		std::cout << e.what() << '\n' << std::endl;
	}
}

Lidar::Lidar()
{
	try {
		/** Initialize Livox-SDK. */
		if (Init()) {
			Constants::vShowLog(this->sTAG, "Livox SDK has been initialized.");
			LivoxSdkVersion xSDKVersion;
			GetLivoxSdkVersion(&xSDKVersion);

			//Constants::vShowLog(this->sTAG, "Livox SDK Version" + std::to_string(xSDKVersion.major) + "." + std::to_string(xSDKVersion.minor) + "." + std::to_string(xSDKVersion.patch));

			/** Set the callback function called when device state change,
			* which means connection/disconnection and changing of LiDAR state.
			*/
			//SetDeviceStateUpdateCallback(&Lidar::vOnDeviceChange);

			//SetDeviceStateUpdateCallback([this](const DeviceInfo * xDeviceInfo, DeviceEvent xDeviceEventType) {vOnDeviceChange(xDeviceInfo, xDeviceEventType); });

			auto vCallbackOnDeviceChange = std::bind(&Lidar::vOnDeviceChange, this);
			SetDeviceStateUpdateCallback(vCallbackOnDeviceChange);

			/** Start the device discovering routine. */
			if (!Start()) {
				Uninit();
			}
			else {
				usleep(1000000);

				bool bRes = false;
				bRes = AddLidarToConnect(sCode.c_str(), &uiHandle);
				if (bRes == kStatusSuccess) {
					/** Set the point cloud data for a specific Livox LiDAR. */
					//SetDataCallback(uiHandle, Lidar::vGetLidarData);
					this->uiHandle = uiHandle;
					this->uiDeviceState = kDeviceStateDisconnect;
				}
			}
		}
		else {

		}
	}
	catch (std::exception& e) {
		std::cout << e.what() << '\n' << std::endl;
	}
}

Lidar::~Lidar()
{
}

Best Regards.

Question: how to integrate the Livox-SDK into a OOP structure?.

Hi. I am trying to integrate the drivers into my own software and I am having some problems.

The use of global objects for the callbacks (i.e. SetDeviceStateUpdateCallback SetBroadcastCallback LidarStartSampling ...) is not viable in my case. I have to put all the global objects as non static members of a class. I have seen that some of the callbacks use a void pointer to pass generic data structures to the callbacks, however some of the others don't. I have tried std::bind (which would be perfect for this case) .
For instance:

void OnDeviceInfoChangeCustom(MyCustomClass* a, const DeviceInfo *info, DeviceEvent type) {
//...
}
//And then

SetDeviceStateUpdateCallback(std::function<...> (std::bind(OnDeviceInfoChangeCustom, this, _1, _2)

However this is not working either. Partially because SetDeviceStateUpdateCallback expects the type DeviceStateUpdateCallback only to cast it later into a more flexible std::function (just since today)/boost::function).

Do you have any recommendation for this situation?.
Thank you very much.

你好,请问下使用sample_cc的程序,如何实现程序启动和停止自由切换,谢谢!

你好,我使用的是MID-100,使用示例代码sample_cc的源码,我想通过一个按钮来控制lidar的采样和停止采样,代码流程修改如下:1、点击“开始”按钮,调用 int ret = read_lidar.InitLdsLidar(cmdline_broadcast_code); 2、将LivoxEthPacket *data中的数据拷贝出;3、调用 read_lidar.DeInitLdsLidar();关闭本次采集数据;4、点击“关闭”按钮,结束本次采集;5、再次执行1操作,发现cloud_ch[0]->points.size() = 0,没有采集到数据。请问我的操作是有什么问题?我该如何实现我自由控制采集数据开关的功能,谢谢!

关于Livox设备点云数据的坐标零点 ?

请问收到的Livox设备点云数据的坐标零点在什么位置?这个零点可以通过配置设置么?
另外,如何将收到的点云转化为用户的自定义坐标系中坐标点?谢谢

Erratum in Start/Stop Sampling SDK communication protocol command

Hello,

In section 4.1 of the General CMD Set section of your SDK documentation, you state that the Start/Stop Sampling command (0x04) uses the values of 0x00 to Start Sampling and 0x01 to Stop Sampling. After working (and ultimately wasting) over half a day on trying to simply get my Mid-40 to begin transmitting point cloud data packets, it turns out that your documentation is incorrect and these two commands are in fact reversed!!

I sure hope this helps someone else out and saves them the time and headaches.

Ryan

树莓派平台编译错误

/home/ubuntu/Livox-SDK/third_party/apr/include/apr-1/apr.h:359:10: error: unknown type name ‘off64_t’
359 | typedef off64_t apr_off_t;
| ^~~~~~~

Horizon的点云数据格式与Mid系统不一样??

Horizon与Mid系列的点云数据格式不一样么?我采用SDK中lidar_lvx_sample这个例子,将接受到的点云数据(x,y,z,r)保存到文本文件中(代码如下),采用其他工具打开该文本文件,可以收集并展示出更多更密集的点云视图。但是用相同的方法接受并保存Horizon的数据就不行,得到的图是个立方体(到处都是反射点,感觉乱掉了)如下图所示。请问,Horizon的点云数据格式是不是与Mid不同,该如何保存x、y、z、r 四个值呢?谢谢。
void LvxFileHandle::SaveTxtFile(std::list &point_list)
{
std::unique_ptr<char[]> buffer(new char[WRITE_BUFFER_LEN]);
uint64_t curpos = 0;
for (std::list::iterator iter = point_list.begin(); iter != point_list.end(); iter++)
{
for (size_t i = 0; i < 100; i++)
{
int x = ((LivoxRawPoint*)iter->raw_point)[i].x;
int y = ((LivoxRawPoint*)iter->raw_point)[i].y;
int z = ((LivoxRawPoint*)iter->raw_point)[i].z;
int r = ((LivoxRawPoint*)iter->raw_point)[i].reflectivity;
sprintf_s(line, "%d %d %d %d\r\n", x, y, z, r);
int len = std::strlen(line);
if (curpos + len >= WRITE_BUFFER_LEN)
{
txt_file.write(buffer.get(), curpos);
curpos = 0;
}
memcpy(buffer.get() + curpos, line, len);
curpos += len;
}
}
}
Horizon点云

PTP Sync

I can't get the Mid-40 to achieve a PTP sync. Is there any way to introspect what could be the problem? The device is on the same subnet as a PTP master. A pc on the same subnet is able to PTP sync using ptp4l (linuxptp) successfully. Do I need to do anything else to trigger the sync? All I ever get is no-sync timestamps (ns since power-on).

Adjusting the spin rate of the Livox Mid 40

Hi, I am interested in achieving a higher total coverage of the scan area in a given time while trading off against a lower resolution along the scan lines of the pattern.

Is it possible to adjust the spinning rate of the turning mirrors / prisms of the Livox Mid 40 as a parameter using the Livox-SDK ?

Setting Static IP

Hi Livox team,
I'm one of Chief specialists in JSC NIIAS. There was a need to change the default IP address for the Mid-40 and Horizon.
Relying on 4.1 General CMD Set 0x08 Configure Static/Dynamic IP can change only 4th block of IP such as: 192.168.150.. But we need to set up 192.168..***. How can I change it? Had tried to change in Livox Viewer but there is no such option. Sending the command package did not bring the desired results.
Ask for help in resolving this issue.

SDK release V2.0.0 not well suport for Mid40's UTC synchronization

It will be fixed in next release.
If you want to use the lidar_utc_sync sample with the Mid-40, a temporary solution is :

  1. Update Mid40's firmware to v03.07.0000 or above (through the Livox Viewer).
  2. Modify line 738 of command_impl.cpp from
if (device_manager().device_mode() != kDeviceModeLidar
      || device_manager().IsLidarMid40(handle)) {
    return kStatusNotSupported;
  }

to

 if (device_manager().device_mode() != kDeviceModeLidar)  {
    return kStatusNotSupported;
  }

and then rebuild Livox-SDK, it will be worked with Mid-40 to use the lidar_utc_sync sample.

设备接入后频繁打印出StateChange告警信息,何故?

在SDK-demo的基础上开发了个小功能,能够接受点云数据,但控制台上会频繁打印StateChange的告警信息,不知道为什么会出现这个告警?我需不需要处理,该如何处理?
连接的设备是Horizon,打印信息是:
[WARNING] Lidar sn: ... StateChange!!!
OnDeviceChange broadcast code ... update type 2

如何解决传输数据量过大的问题?

   我们的环境中部署了多个mid-100,使用了一个SDK去接收数据,因为传输过来的数据量很大,所以导致服务器负载压力很重,针对这个问题,我有两个方案:

1.减少数据量
2.将设备串行化,轮流接收数据
暂不考虑扩展服务器规模
针对第一个方案,我想要知道可以配置数据量的api
针对第二个方案,我想要知道有没有可以使设备轮流发送数据的api,还是说只能通过start,stop等api自行实现?

Compile error in release build type

Hi Livox team,
I'm one of members in Seoul Robotics.
I'm facing a compile error while building Livox-SDK with my script.
Below is error message.

Livox-SDK/sdk_core/src/base/io_loop.cpp:85:19: error: unused variable ‘thread_id’ [-Werror=unused-variable]
   apr_os_thread_t thread_id = apr_os_thread_current();

I'm thinking the problem occures because I'm using "cmake .. -DCMAKE_BUILD_TYPE=Release" in my script. This makes the compiler ignore assert() syntax.
Could you simply add (void)thread_id in IOLoop::RemoveDelegateSync to avoid compile error in case someone using Release build?

How to cut point cloud data

Is the coordinates obtained in "getlidardata" based on the radar itself? How to cut point cloud data by region. In the "getlidardata" example of "lidar_lvx_ sample", I filter the point cloud data through coordinates, and open it in the livox viewer, The resulting area is not the area I want to filter.

if (p_point_data->x < 2500 || p_point_data->x > 2700 || p_point_data->y < -400 || p_point_data->y > 400 || p_point_data->z < -600 || p_point_data->z > 600) return;

How often can I get a single UDP data package?

Hi,

I checked the Point Cloud {#data_type} of the Livox SDK Communication Protocol.
I'm using a Mid-40 and the Data Type is 0.
So I found out that single UDP data package contains 100 samples.

Also, from the documentation and tables
「Taking Mid-40 as an example, the sampling frequency is 100 KHz , and the interval of each point is 10μs」

Point Num Timestamp
1 T1
2 T1 + 10 μs
3 T1 + 20 μs
... ...
100 T1 + 990 μs

I found the following:
It was found that single UDP data package contains 1000μs (0.001s) worth of data (100 points).
I believe that the Data Frequency, 100,000 points/s, is achieved by collecting 1,000 UDP data packages.

How often can I get a single UDP data package?
I'm thinking data package/0.001s, is this correct?

Thanks!

rviz pointcloud 2

我在rviz中查看点云的显示情况,不知为何,livox反馈回来的点云每隔几秒会消失一次,请问这个问题是需要设置解决吗

cannot open file extrinsic.xml

when i excute command "./lidar_lvx_sample -l -t 10 -p" on ubuntu 16.04,the error information showed...
jsc@CQJSC1:/publish/livox/livox-sdk/build/sample/lidar_lvx_file$ ./lidar_lvx_sample -l -t 10 -p
Save the log file.
Time to save point cloud to the lvx file:10.
Get the extrinsic parameter from extrinsic.xml file.
Livox SDK initializing.
Livox SDK has been initialized.
Livox SDK version 2.0.0 .
Start discovering device.
[2020-01-15 10:27:08.022] [console] [info] Broadcast broadcast code: 1HDDGC500103091 [device_discovery.cpp] [OnBroadcast] [163]
Receive Broadcast Code 1HDDGC500103091
[2020-01-15 10:27:08.022] [console] [info] Broadcast code : 1HDDGC500103091 not add to connect [device_discovery.cpp] [OnBroadcast] [180]
[2020-01-15 10:27:09.030] [console] [info] Broadcast broadcast code: 1HDDGC500103091 [device_discovery.cpp] [OnBroadcast] [163]
Receive Broadcast Code 1HDDGC500103091
[2020-01-15 10:27:09.030] [console] [info] Broadcast code : 1HDDGC500103091 not add to connect [device_discovery.cpp] [OnBroadcast] [180]
[2020-01-15 10:27:10.038] [console] [info] Broadcast broadcast code: 1HDDGC500103091 [device_discovery.cpp] [OnBroadcast] [163]
Receive Broadcast Code 1HDDGC500103091
[2020-01-15 10:27:10.039] [console] [info] LocalIP: 192.168.31.101 [device_discovery.cpp] [OnBroadcast] [226]
[2020-01-15 10:27:10.039] [console] [info] Command Port: 55501 [device_discovery.cpp] [OnBroadcast] [227]
[2020-01-15 10:27:10.039] [console] [info] Data Port: 56001 [device_discovery.cpp] [OnBroadcast] [228]
[2020-01-15 10:27:10.062] [console] [info] New Device [device_discovery.cpp] [OnData] [110]
[2020-01-15 10:27:10.062] [console] [info] Handle: 0 [device_discovery.cpp] [OnData] [111]
[2020-01-15 10:27:10.062] [console] [info] Broadcast Code: 1HDDGC500103091 [device_discovery.cpp] [OnData] [112]
[2020-01-15 10:27:10.062] [console] [info] Type: 3 [device_discovery.cpp] [OnData] [113]
[2020-01-15 10:27:10.062] [console] [info] IP: 192.168.31.109 [device_discovery.cpp] [OnData] [114]
[2020-01-15 10:27:10.062] [console] [info] Command Port: 55501 [device_discovery.cpp] [OnData] [115]
[2020-01-15 10:27:10.062] [console] [info] Data Port: 56001 [device_discovery.cpp] [OnData] [116]
OnDeviceChange broadcast code 1HDDGC500103091 update type 0
[WARNING] Lidar sn: [1HDDGC500103091] Connect!!!
Device Working State 5
Device State Error Code 0X00000000
Device feature 0
[2020-01-15 10:27:10.062] [console] [info] Send Command: Set 0 Id 2 Seq 3 [command_channel.cpp] [Send] [241]
[2020-01-15 10:27:10.086] [console] [info] Recieve Ack: Set 0 Id 2 Seq 3 [command_handler.cpp] [OnCommand] [130]
firm ver: 6.7.0.0
[2020-01-15 10:27:10.110] [console] [info] Update State to 1, device connect true [device_manager.cpp] [UpdateDeviceState] [237]
OnDeviceChange broadcast code 1HDDGC500103091 update type 2
[WARNING] Lidar sn: [1HDDGC500103091] StateChange!!!
Device Working State 1
Device State Error Code 0X00000000
Device feature 0
terminate called after throwing an instance of 'std::runtime_error'
what(): cannot open file extrinsic.xml
Aborted (core dumped)
jsc@CQJSC1:
/publish/livox/livox-sdk/build/sample/lidar_lvx_file$

SDK 中关于whitelist的含义

在阅读SDK代码时,频繁遇到很多变量或者注释里面含有 whitelist,请问 whitelist有什么特殊含义吗?

如何获取正确的时间戳?

我用的是mid-40,我自己写了个脚本,抓取雷达数据,但是抓到的时间戳转换为日期格式是1970年的时间,请问如何获取正确的时间?

sample

您好,我想问一下sample和sample_cc有什么区别啊

How do I get the target reflectivity on the Mid-40?

Hi,

The reflectivity of 0~150 based on the Lambertian reflection model can be obtained.

However, I don't see any values from 151~255 based on the reflectivity of target objects.

Why is this? How do I do this?

Thanks!

"hour" missing in timestamp type 3 on MID 40

Hey LIVOX,
We are currently using the MID-40 and needed a UTC timestamp. After resolving the issue (Issue #31) regarding UTC on the mid40 including firmware upgrade we ran into further problems.

The main issue was that we couldn’t get anything else than 0 reading the byte 3 “hour” in the timestamp. Everything else looked fine including the microseconds. After looking through some of the source code we noticed that the {utc_time_req->hour} in {ParseRmcTime} was never set to anything (found in the command_impl.cpp).
We fixed the issue by adding the code underneath between line 213 and 214 in command_impl.cpp.

utc_time_reg->hour = hour;

I can't remove from SDK a device connected before on runtime

Hi all.

I have a library for my own projects to works with livox lidars based on your Livox-SDK. Now I am using Livox Horizon.

I am develop for connect and disconnect Lidars on runtime, and In my network I have 2 o 3 PCs that can connect to Lidars devices. Actually only one Lidar send data to one PC. This is OK, but I want in runtime (Without reset my software or Livox-SDK) connect and disconnect to any lidar.

The problem is the next:

  • In my software when I send code broadcast to connect to one device calls to Livox-SDK function of "AddLidarToConnect(...)". And the software make all the operations and it have the Lidar sampling perfectly.
  • When I send a command to my software I want to stop sampling device "LidarStopSampling(...)", disconnect device "DisconnectDevice(...)" and with this, I want to free the Lidar to connect from other PC, but the the SDK automatically connects to the device and the SDK doesn't free the Lidar to connect from other PC.

I thinks it is because I have the function "AddLidarToConnect(...)" to add the Lidar in a list on SDK but I don't call other function to remove from this list on SDK. I read the documentation and I don't see it in the documentation this type of function, Can you tell me what function I need to use to free the Lidar to connect to other PC without closing the SDK on runtime??.

If you don't understand or you need more information tell to me.

Best Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.