鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    运行驱动雷达时候报错

    已定时 已固定 已锁定 已移动
    FishBot二驱机器人
    二驱机器人 雷达驱动
    2
    5
    76
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • S
      shawn
      最后由 编辑

      1,背景
      运行以下命令时候出现的问题

      sk@sk-virtual-machine:~$ xhost + && sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd -e DISPLAY=unix$DISPLAY -p 8889:8888 registry.cn-hangzhou.aliyuncs.com/fishros/fishbot_laser
      access control disabled, clients can connect from any host
      欢迎鱼香ROS使用雷达驱动系统,注意当前版本为ROS2版本驱动哦~

      1. WIFI转串口测试
      2. 驱动雷达
      3. 建图测试
      4. 退出

      2,历史
      在此之前运行1:WIFI转串口测试时候一直等待TCP连接: 0.0.0.0:8888
      sk@sk-virtual-machine:~$ xhost + && sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd -e DISPLAY=unix$DISPLAY -p 8889:8888 registry.cn-hangzhou.aliyuncs.com/fishros/fishbot_laser
      access control disabled, clients can connect from any host
      欢迎鱼香ROS使用雷达驱动系统,注意当前版本为ROS2版本驱动哦~

      1. WIFI转串口测试
      2. 驱动雷达
      3. 建图测试
      4. 退出
        #? 1
        [INFO] [launch]: All log files can be found below /root/.ros/log/2025-05-21-04-34-59-859928-54f59d59956a-58
        [INFO] [launch]: Default logging verbosity is set to INFO
        [INFO] [ydlidar_tcp_node-1]: process started with pid [59]
        [ydlidar_tcp_node-1] [INFO] [1747802100.203626086] [ydlidar_node]: 等待激光雷达TCP连接: 0.0.0.0:8888

      和客服沟通后更换雷达和驱动板后,还是报如上错误。
      但是我发现,重启后不运行nc -l 8889 ,直接运行WIFI转串口测试时候激光雷达能够连接

      sk@sk-virtual-machine:~$ xhost + && sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd -e DISPLAY=unix$DISPLAY -p 8889:8888 registry.cn-hangzhou.aliyuncs.com/fishros/fishbot_laser
      access control disabled, clients can connect from any host
      欢迎鱼香ROS使用雷达驱动系统,注意当前版本为ROS2版本驱动哦~

      1. WIFI转串口测试
      2. 驱动雷达
      3. 建图测试
      4. 退出
        #? 1
        [INFO] [launch]: All log files can be found below /root/.ros/log/2025-05-21-04-37-37-024833-678890575e23-58
        [INFO] [launch]: Default logging verbosity is set to INFO
        [INFO] [ydlidar_tcp_node-1]: process started with pid [59]
        [ydlidar_tcp_node-1] [INFO] [1747802257.698494317] [ydlidar_node]: 等待激光雷达TCP连接: 0.0.0.0:8888
        [ydlidar_tcp_node-1] [INFO] [1747802258.099266293] [ydlidar_node]: 激光雷达已连接: ('192.168.1.102', 50711)
        随后,跟着课程,退出输入2时候出现问题,报如下错误
        #? 2
        [INFO] [launch]: All log files can be found below /root/.ros/log/2025-05-21-04-38-25-908601-678890575e23-86
        [INFO] [launch]: Default logging verbosity is set to INFO
        [INFO] [ydlidar_tcp_node-1]: process started with pid [87]
        [ydlidar_tcp_node-1] Traceback (most recent call last):
        [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/ydlidar/ydlidar_tcp_node", line 33, in <module>
        [ydlidar_tcp_node-1] sys.exit(load_entry_point('ydlidar==0.0.0', 'console_scripts', 'ydlidar_tcp_node')())
        [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 321, in main
        [ydlidar_tcp_node-1] node = YdlidarNode()
        [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 26, in init
        [ydlidar_tcp_node-1] self._init_tcp()
        [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 57, in _init_tcp
        [ydlidar_tcp_node-1] self.sock.bind((host, port))
        [ydlidar_tcp_node-1] OSError: [Errno 98] Address already in use
        [ERROR] [ydlidar_tcp_node-1]: process has died [pid 87, exit code 1, cmd '/workspace/install/ydlidar/lib/ydlidar/ydlidar_tcp_node --ros-args'].
      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @shawn
        最后由 编辑

        @shawn

        @shawn 在 运行驱动雷达时候报错 中说:

        [ydlidar_tcp_node-1] OSError: [Errno 98] Address already in use 端口占用,不要用nc 和驱动两者是冲突的,

        重启下电脑再测试一次

        新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

        S 2 条回复 最后回复 回复 引用 0
        • S
          shawn @小鱼
          最后由 编辑

          @小鱼 还是不行还是报错
          sk@sk-virtual-machine:~$ xhost + && sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd -e DISPLAY=unix$DISPLAY -p 8889:8888 registry.cn-hangzhou.aliyuncs.com/fishros/fishbot_laser
          access control disabled, clients can connect from any host
          欢迎鱼香ROS使用雷达驱动系统,注意当前版本为ROS2版本驱动哦~

          1. WIFI转串口测试
          2. 驱动雷达
          3. 建图测试
          4. 退出
            #? 1
            [INFO] [launch]: All log files can be found below /root/.ros/log/2025-05-21-05-11-45-756903-c29ca861fb21-58
            [INFO] [launch]: Default logging verbosity is set to INFO
            [INFO] [ydlidar_tcp_node-1]: process started with pid [59]
            [ydlidar_tcp_node-1] [INFO] [1747804306.055214187] [ydlidar_node]: 等待激光雷达TCP连接: 0.0.0.0:8888
            [ydlidar_tcp_node-1] [INFO] [1747804306.256195371] [ydlidar_node]: 激光雷达已连接: ('192.168.1.102', 53796)
            ^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
            [ydlidar_tcp_node-1] Traceback (most recent call last):
            [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/ydlidar/ydlidar_tcp_node", line 33, in <module>
            [ydlidar_tcp_node-1] sys.exit(load_entry_point('ydlidar==0.0.0', 'console_scripts', 'ydlidar_tcp_node')())
            [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 322, in main
            [ydlidar_tcp_node-1] rclpy.spin(node)
            [ydlidar_tcp_node-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/init.py", line 222, in spin
            [ydlidar_tcp_node-1] executor.spin_once()
            [ydlidar_tcp_node-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 704, in spin_once
            [ydlidar_tcp_node-1] handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
            [ydlidar_tcp_node-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 690, in wait_for_ready_callbacks
            [ydlidar_tcp_node-1] return next(self._cb_iter)
            [ydlidar_tcp_node-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 619, in _wait_for_ready_callbacks
            [ydlidar_tcp_node-1] if tmr.handle.pointer in timers_ready:
            [ydlidar_tcp_node-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/timer.py", line 36, in handle
            [ydlidar_tcp_node-1] @property
            [ydlidar_tcp_node-1] KeyboardInterrupt
            [ERROR] [ydlidar_tcp_node-1]: process has died [pid 59, exit code -2, cmd '/workspace/install/ydlidar/lib/ydlidar/ydlidar_tcp_node --ros-args'].
            #? 2
            [INFO] [launch]: All log files can be found below /root/.ros/log/2025-05-21-05-11-50-512720-c29ca861fb21-86
            [INFO] [launch]: Default logging verbosity is set to INFO
            [INFO] [ydlidar_tcp_node-1]: process started with pid [87]
            [ydlidar_tcp_node-1] Traceback (most recent call last):
            [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/ydlidar/ydlidar_tcp_node", line 33, in <module>
            [ydlidar_tcp_node-1] sys.exit(load_entry_point('ydlidar==0.0.0', 'console_scripts', 'ydlidar_tcp_node')())
            [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 321, in main
            [ydlidar_tcp_node-1] node = YdlidarNode()
            [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 26, in init
            [ydlidar_tcp_node-1] self._init_tcp()
            [ydlidar_tcp_node-1] File "/workspace/install/ydlidar/lib/python3.10/site-packages/ydlidar/ydlidar_tcp_node.py", line 57, in _init_tcp
            [ydlidar_tcp_node-1] self.sock.bind((host, port))
            [ydlidar_tcp_node-1] OSError: [Errno 98] Address already in use
            [ERROR] [ydlidar_tcp_node-1]: process has died [pid 87, exit code 1, cmd '/workspace/install/ydlidar/lib/ydlidar/ydlidar_tcp_node --ros-args'].
          小鱼小 1 条回复 最后回复 回复 引用 0
          • S
            shawn @小鱼
            最后由 编辑

            @小鱼 报错内容和上面的一样

            1 条回复 最后回复 回复 引用 0
            • 小鱼小
              小鱼 技术大佬 @shawn
              最后由 编辑

              @shawn 在 运行驱动雷达时候报错 中说:

              退出

              退出后再进来试试

              新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

              1 条回复 最后回复 回复 引用 0
              • 第一个帖子
                最后一个帖子
              皖ICP备16016415号-7
              Powered by NodeBB | 鱼香ROS