简体   繁体   English

两个 Lslidar(Leishen)与一个嵌入式板(Jetson Xavier)连接可能吗?

[英]Two Lslidar(Leishen) connected with One Embedded Board(Jetson Xavier)`s possible?

Running one of the Lslidar(16 Channels) on the Embeded board(ROS development environments) is not a problem.在嵌入式板(ROS 开发环境)上运行其中一个 Lslidar(16 通道)不是问题。 This is because you can use the default IP and ports.这是因为您可以使用默认的 IP 和端口。 But I plan to run two at the same time, and I want to use values other than the default values of ports and IP..但是我打算同时运行两个,并且我想使用端口和 IP 的默认值以外的值。

For example, you can use ports like 2368 and 2369. I need a reference to refer to how to change the port value and IP value... Help Plz...例如,您可以使用 2368 和 2369 之类的端口。我需要一个参考来参考如何更改端口值和 IP 值......请帮助...

Here is code from lsLidar driver from ROS Wiki:这是来自 ROS Wiki 的 lsLidar 驱动程序的代码:

bool LslidarC16Driver::loadParameters() {
  //pnh.param("frame_id", frame_id, std::string("lslidar"));
  pnh.param("lidar_ip", lidar_ip_string, std::string("192.168.1.222"));
  pnh.param<int>("device_port", UDP_PORT_NUMBER,2368);
  pnh.param<bool>("add_multicast", add_multicast, false);
  pnh.param("group_ip", group_ip_string, std::string("234.2.3.2"));
  inet_aton(lidar_ip_string.c_str(), &lidar_ip);
  ROS_INFO_STREAM("Opening UDP socket: address " << lidar_ip_string);
  if(add_multicast) ROS_INFO_STREAM("Opening UDP socket: group_address " << group_ip_string);
  ROS_INFO_STREAM("Opening UDP socket: port " << UDP_PORT_NUMBER);
  return true;
}

As you can see there is a place where you can change port and IP.如您所见,有一个地方可以更改端口和 IP。 For two devices I'd advise you to modify the original driver.对于两个设备,我建议您修改原始驱动程序。 All source code is available on https://github.com/tongsky723/lslidar_C16 Clone it to you workspace and create additional functionality for two LiDARs. https://github.com/tongsky723/lslidar_C16上提供了所有源代码,将其克隆到您的工作区并为两个 LiDAR 创建附加功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM