紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
驱动雷达报错
-
@小鱼 实体机,16G内存,256G硬盘,电脑通过网线连接路由器,可以PING通雷达。
输入~$ ros2 topic list
反馈:/parameter_events
/rosout
/scan
这一步都是正常的再输入ros2 topic hz /scan
雷达驱动的终端就报错了 -
@小鱼 换了两台电脑都这样
-
@763141425 报什么错呢
-
@小鱼 terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc -
完整的代码:
- 驱动雷达
- 建图测试
- 退出
#? 1
UART2SOCKET:8888->/tmp/fishbot_laser
Prepare to Accept connect!
3 <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.3', 8888), raddr=('192.168.0.105', 55719)> 4
PTY: Opened /dev/pts/6 for 0.0.0.0:8888
[YDLIDAR INFO] Current ROS Driver Version: 1.4.5
[YDLIDAR]:SDK Version: 1.4.5
[YDLIDAR]:Lidar running correctly ! The health status: good
[YDLIDAR] Connection established in [/tmp/fishbot_laser][115200]:
Firmware version: 1.5
Hardware version: 1
Model: S4
Serial: 2021031700000035
[YDLIDAR]:Fixed Size: 330
[YDLIDAR]:Sample Rate: 3K
[YDLIDAR INFO] Current Sampling Rate : 3K
[YDLIDAR INFO] Now YDLIDAR is scanning ......
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
^CTraceback (most recent call last):
File "/workspace/install/fishbot_laser_driver/lib/fishbot_laser_driver/laser_x2", line 33, in <module>
sys.exit(load_entry_point('fishbot-laser-driver==0.0.0', 'console_scripts', 'laser_x2')())
File "/workspace/install/fishbot_laser_driver/lib/python3.10/site-packages/fishbot_laser_driver/fishbot_laser_x2.py", line 83, in main
SocketServer()
File "/workspace/install/fishbot_laser_driver/lib/python3.10/site-packages/fishbot_laser_driver/fishbot_laser_x2.py", line 35, in init
self.main()
File "/workspace/install/fishbot_laser_driver/lib/python3.10/site-packages/fishbot_laser_driver/fishbot_laser_x2.py", line 68, in main
os.write(write_fd, data)
KeyboardInterrupt
[ros2run]: Interrupt
-
-
系统是Ubuntu 24.04,ros2是jazzy。
-
@763141425 请使用humble
-
-
@763141425 是的,换22