Livox-SDK / livox_ros_driver2

Livox device driver under Ros(Compatible with ros and ros2), support Lidar HAP and Mid-360.
Other
200 stars 161 forks source link

How to config two network interfaces #70

Open YCJin9 opened 10 months ago

YCJin9 commented 10 months ago

I have two MID360 devices connected to two network interfaces, but it seems that the driver can only use one host IP. How should I configure this?

georgflick commented 10 months ago

maybe start the driver two times with different configs? one for each interface?

YCJin9 commented 10 months ago

maybe start the driver two times with different configs? one for each interface?

when I run second driver, the first driver‘s pointcloud will stop,and second driver output "update lidar failed status:-4". when I run any launch separately, they are ok. I try to run two launch files in different docker container,ros only have the second lidar's topic.

apeoej333 commented 10 months ago

me too.

rviz_mixed launch file doesn't work.

rviz_MID360_A, rviz_MID360_B doesn't work(different host's port number or ip whatever...)

Call-Me-Jesse commented 10 months ago

I read the source code of the parse_cfg_file.cpp file in SDK2, and I think this config file should solve your problem.

{
  "MID360": {
    "lidar_net_info" : {
      "cmd_data_port"  : 56100,
      "push_msg_port"  : 56200,
      "point_data_port": 56300,
      "imu_data_port"  : 56400,
      "log_data_port"  : 56500
    },
    "host_net_info" : [
      {
    "lidar_ip"       : ["192.168.1.10"],
        "host_ip"        : "192.168.1.5",
        "multicast_ip"   : "224.1.1.5",
        "cmd_data_port"  : 56101,
        "push_msg_port"  : 56201,
        "point_data_port": 56301,
        "imu_data_port"  : 56401,
        "log_data_port"  : 56501
      },
      {
     "lidar_ip"       : ["192.168.1.11"],
        "host_ip"        : "192.168.1.6",
        "multicast_ip"   : "224.1.1.5",
        "cmd_data_port"  : 56101,
        "push_msg_port"  : 56201,
        "point_data_port": 56301,
        "imu_data_port"  : 56401,
        "log_data_port"  : 56501
      }
    ]
  }
}