file-type

bus-log-sdk-js: JavaScript SDK for 36node's bus-log service

ZIP文件

下载需积分: 9 | 241KB | 更新于2024-11-27 | 119 浏览量 | 6 评论 | 0 下载量 举报 收藏
download 立即下载
该SDK使用JavaScript编写,旨在方便开发者快速集成bus-log服务,实现日志记录、分析等功能。本文档将详细介绍该SDK的安装方法、用法以及如何参与贡献开发的过程。" 知识点一:SDK概念 SDK(Software Development Kit)意为软件开发工具包,是一些为特定平台或编程语言编写的开发工具的集合。开发者通过使用SDK可以更快地开发出针对该平台或语言的应用程序。SDK中通常会包含各种API(应用程序编程接口)、文档、代码示例、库文件等。 知识点二:bus-log服务介绍 bus-log服务是指一种日志记录服务,它通常用于收集、存储和分析应用运行时产生的日志数据。开发者可以利用bus-log服务来监控应用状态,追踪错误,进行性能监控等。bus-log服务的作用是帮助开发者更好地了解应用程序的运行情况,从而进行有效的维护和优化。 知识点三:npm与yarn的包管理工具 npm(Node Package Manager)和yarn都是JavaScript的包管理工具,用于Node.js的包管理和依赖管理。npm是随Node.js一起安装的,而yarn是一个替代npm的管理工具,它引入了锁文件(yarn.lock)来处理依赖项版本,以解决依赖冲突并确保依赖项的一致性。在这个场景中,我们使用yarn来安装bus-log-sdk-js。 知识点四:JavaScript模块化开发 JavaScript模块化开发是指通过将代码拆分成独立的模块,以实现代码的复用和组织的合理性。require语句用于在JavaScript中引入Node.js模块,它允许开发者导入所需的模块来增强程序的功能。在本SDK中使用了require语句来引入bus-log-sdk,使得开发者能够利用SDK提供的方法来操作bus-log服务。 知识点五:JavaScript面向对象编程 在描述中提到的“const sdk = new SDK ({ base : 'xxxxx' }) ;”体现了JavaScript的面向对象编程(OOP)思想。这里通过new操作符创建了SDK类的一个新实例,并给这个实例的属性(base)赋值为'xxxxx'。new操作符会创建一个空对象,并将该对象的上下文绑定到构造函数上,然后执行构造函数,最终返回该对象。 知识点六:版本控制与代码贡献 描述中提到了如何参与bus-log-sdk-js模块的代码贡献,包括创建功能分支、提交更改、推送分支以及提交拉取请求。这些都是现代软件开发中进行协作开发的常见步骤。开发者通过版本控制系统(如git)进行代码的版本控制,git是一个分布式版本控制工具,帮助开发者管理代码的历史记录,并且可以方便地与其他开发者协作。GitHub是一个基于git的在线代码托管平台,它提供了一个协作社区,使得开发者可以在此提交代码、讨论项目、管理项目等。 知识点七:许可证与著作权 文档中提到了“模块:copyright:,根据许可证发行”,这表明bus-log-sdk-js模块遵循特定的许可证协议。许可证是决定如何使用软件的法律文档,它规定了在法律上允许用户对软件进行何种操作。开源许可证允许用户自由地使用、修改和分发软件,但需要遵守许可证的具体规定。著作权则是指作者对其创作的作品所拥有的权利,包括发表权、署名权、修改权等,通常作者通过许可证来授予其他人使用其作品的权利。 知识点八:JavaScript异步编程 描述中并未直接体现,但是SDK提供的vehicle.listRecords方法可能涉及到网络请求操作。在JavaScript中,网络请求通常是异步执行的,这意味着代码会在不阻塞主线程的情况下执行。JavaScript提供了多种异步编程的机制,例如Promise、async/await等,这允许开发者更加优雅地处理异步操作,同时保持代码的可读性和可维护性。 知识点九:GitHub贡献指南 最后,文档中提到了“提交拉取请求:D”,这通常意味着开发者需要遵循GitHub上的贡献指南。贡献指南(Contributing Guidelines)是开源项目维护者为了规范社区贡献行为而提供的文档,它详细描述了如何提交问题、如何进行代码贡献、如何测试代码以及如何与项目维护者合作等。开发者在准备向GitHub项目贡献代码前,应该仔细阅读并遵守这些指南,以便更有效地参与社区协作。

相关推荐

filetype

INSERT INTO sys_api (id, handle, title, path, type, action, created_at, updated_at, deleted_at, create_by, update_by)VALUES (5, 'go-admin/app/admin/apis.SysLoginLog.Get-fm', '登录日志通过id获取', '/api/v1/sys-login-log/:id', 'BUS', 'GET', '2021-05-13 19:59:00.728', '2021-06-17 11:37:12.331', NULL, 0, 0), (6, 'go-admin/app/admin/apis.SysOperaLog.GetPage-fm', '操作日志列表', '/api/v1/sys-opera-log', 'BUS', 'GET', '2021-05-13 19:59:00.778', '2021-06-17 11:48:40.732', NULL, 0, 0), (7, 'go-admin/app/admin/apis.SysOperaLog.Get-fm', '操作日志通过id获取', '/api/v1/sys-opera-log/:id', 'BUS', 'GET', '2021-05-13 19:59:00.821', '2021-06-16 21:49:48.598', NULL, 0, 0), (8, 'go-admin/common/actions.IndexAction.func1', '分类列表', '/api/v1/syscategory', 'BUS', 'GET', '2021-05-13 19:59:00.870', '2021-06-13 20:53:47.883', NULL, 0, 0), (9, 'go-admin/common/actions.ViewAction.func1', '分类通过id获取', '/api/v1/syscategory/:id', 'BUS', 'GET', '2021-05-13 19:59:00.945', '2021-06-13 20:53:47.926', NULL, 0, 0), (10, 'go-admin/common/actions.IndexAction.func1', '内容列表', '/api/v1/syscontent', 'BUS', 'GET', '2021-05-13 19:59:01.005', '2021-06-13 20:53:47.966', NULL, 0, 0), (11, 'go-admin/common/actions.ViewAction.func1', '内容通过id获取', '/api/v1/syscontent/:id', 'BUS', 'GET', '2021-05-13 19:59:01.056', '2021-06-13 20:53:48.005', NULL, 0, 0), (15, 'go-admin/common/actions.IndexAction.func1', 'job列表', '/api/v1/sysjob', 'BUS', 'GET', '2021-05-13 19:59:01.248', '2021-06-13 20:53:48.169', NULL, 0, 0), (16, 'go-admin/common/actions.ViewAction.func1', 'job通过id获取', '/api/v1/sysjob/:id', 'BUS', 'GET', '2021-05-13 19:59:01.298', '2021-06-13 20:53:48.214', NULL, 0, 0), (21, 'go-admin/app/admin/apis.SysDictType.GetPage-fm', '字典类型列表', '/api/v1/dict/type', 'BUS', 'GET', '2021-05-13 19:59:01.525', '2021-06-17 11:48:40.732', NULL, 0, 0), (22, 'go-admin/app/admin/apis.SysDictType.GetAll-fm', '字典类型查询【代码生成】', '/api/v1/dict/type-option-select', 'SYS', 'GET', '2021-05-13 19:59:01.582', '2021-06-13 20:53:48.388', NULL, 0, 0), (23, 'go-admin/app/admin/apis.SysDictType.Get-fm', '字典类型通过id获取', '/api/v1/dict/type/:id', 'BUS', 'GET', '2021-05-13 19:59:01.632', '2021-06-17 11:48:40.732', NULL, 0, 0), (24, 'go-admin/app/admin/apis.SysDictData.GetPage-fm', '字典数据列表', '/api/v1/dict/data', 'BUS', 'GET', '2021-05-13 19:59:01.684', '2021-06-17 11:48:40.732', NULL, 0, 0), (25, 'go-admin/app/admin/apis.SysDictData.Get-fm', '字典数据通过code获取', '/api/v1/dict/data/:dictCode', 'BUS', 'GET', '2021-05-13 19:59:01.732', '2021-06-17 11:48:40.732', NULL, 0, 0), (26, 'go-admin/app/admin/apis.SysDictData.GetSysDictDataAll-fm', '数据字典根据key获取', '/api/v1/dict-data/option-select', 'SYS', 'GET', '2021-05-13 19:59:01.832', '2021-06-17 11:48:40.732', NULL, 0, 0), (27, 'go-admin/app/admin/apis.SysDept.GetPage-fm', '部门列表', '/api/v1/dept', 'BUS', 'GET', '2021-05-13 19:59:01.940', '2021-06-17 11:48:40.732', NULL, 0, 0), (28, 'go-admin/app/admin/apis.SysDept.Get-fm', '部门通过id获取', '/api/v1/dept/:id', 'BUS', 'GET', '2021-05-13 19:59:02.009', '2021-06-17 11:48:40.732', NULL, 0, 0), (29, 'go-admin/app/admin/apis.SysDept.Get2Tree-fm', '查询部门下拉树【角色权限-自定权限】', '/api/v1/deptTree', 'SYS', 'GET', '2021-05-13 19:59:02.050', '2021-06-17 11:48:40.732', NULL, 0, 0), (30, 'go-admin/app/admin/apis/tools.(*Gen).GetDBTableList-fm', '数据库表列表', '/api/v1/db/tables/page', 'SYS', 'GET', '2021-05-13 19:59:02.098', '2021-06-13 20:53:48.730', NULL, 0, 0), (31, 'go-admin/app/admin/apis/tools.(*Gen).GetDBColumnList-fm', '数据表列列表', '/api/v1/db/columns/page', 'SYS', 'GET', '2021-05-13 19:59:02.140', '2021-06-13 20:53:48.771', NULL, 0, 0), (32, 'go-admin/app/admin/apis/tools.Gen.GenCode-fm', '数据库表生成到项目', '/api/v1/gen/toproject/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.183', '2021-06-13 20:53:48.812', NULL, 0, 0), (33, 'go-admin/app/admin/apis/tools.Gen.GenMenuAndApi-fm', '数据库表生成到DB', '/api/v1/gen/todb/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.227', '2021-06-13 20:53:48.853', NULL, 0, 0), (34, 'go-admin/app/admin/apis/tools.(*SysTable).GetSysTablesTree-fm', '关系表数据【代码生成】', '/api/v1/gen/tabletree', 'SYS', 'GET', '2021-05-13 19:59:02.271', '2021-06-13 20:53:48.893', NULL, 0, 0), (35, 'go-admin/app/admin/apis/tools.Gen.Preview-fm', '生成预览通过id获取', '/api/v1/gen/preview/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.315', '2021-06-13 20:53:48.935', NULL, 0, 0), (36, 'go-admin/app/admin/apis/tools.Gen.GenApiToFile-fm', '生成api带文件', '/api/v1/gen/apitofile/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.357', '2021-06-13 20:53:48.977', NULL, 0, 0), (37, 'go-admin/app/admin/apis.System.GenerateCaptchaHandler-fm', '验证码获取', '/api/v1/getCaptcha', 'SYS', 'GET', '2021-05-13 19:59:02.405', '2021-06-13 20:53:49.020', NULL, 0, 0), (38, 'go-admin/app/admin/apis.SysUser.GetInfo-fm', '用户信息获取', '/api/v1/getinfo', 'SYS', 'GET', '2021-05-13 19:59:02.447', '2021-06-13 20:53:49.065', NULL, 0, 0), (39, 'go-admin/app/admin/apis.SysMenu.GetPage-fm', '菜单列表', '/api/v1/menu', 'BUS', 'GET', '2021-05-13 19:59:02.497', '2021-06-17 11:48:40.732', NULL, 0, 0), (40, 'go-admin/app/admin/apis.SysMenu.GetMenuTreeSelect-fm', '查询菜单下拉树结构【废弃】', '/api/v1/menuTreeselect', 'SYS', 'GET', '2021-05-13 19:59:02.542', '2021-06-03 22:37:21.857', NULL, 0, 0), (41, 'go-admin/app/admin/apis.SysMenu.Get-fm', '菜单通过id获取', '/api/v1/menu/:id', 'BUS', 'GET', '2021-05-13 19:59:02.584', '2021-06-17 11:48:40.732', NULL, 0, 0), (42, 'go-admin/app/admin/apis.SysMenu.GetMenuRole-fm', '角色菜单【顶部左侧菜单】', '/api/v1/menurole', 'SYS', 'GET', '2021-05-13 19:59:02.630', '2021-06-13 20:53:49.574', NULL, 0, 0), (43, 'go-admin/app/admin/apis.SysMenu.GetMenuIDS-fm', '获取角色对应的菜单id数组【废弃】', '/api/v1/menuids', 'SYS', 'GET', '2021-05-13 19:59:02.675', '2021-06-03 22:39:52.500', NULL, 0, 0), (44, 'go-admin/app/admin/apis.SysRole.GetPage-fm', '角色列表', '/api/v1/role', 'BUS', 'GET', '2021-05-13 19:59:02.720', '2021-06-17 11:48:40.732', NULL, 0, 0), (45, 'go-admin/app/admin/apis.SysMenu.GetMenuTreeSelect-fm', '菜单权限列表【角色配菜单使用】', '/api/v1/roleMenuTreeselect/:roleId', 'SYS', 'GET', '2021-05-13 19:59:02.762', '2021-06-17 11:48:40.732', NULL, 0, 0), (46, 'go-admin/app/admin/apis.SysDept.GetDeptTreeRoleSelect-fm', '角色部门结构树【自定义数据权限】', '/api/v1/roleDeptTreeselect/:roleId', 'SYS', 'GET', '2021-05-13 19:59:02.809', '2021-06-17 11:48:40.732', NULL, 0, 0), (47, 'go-admin/app/admin/apis.SysRole.Get-fm', '角色通过id获取', '/api/v1/role/:id', 'BUS', 'GET', '2021-05-13 19:59:02.850', '2021-06-17 11:48:40.732', NULL, 0, 0), (48, 'github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth.(*GinJWTMiddleware).RefreshHandler-fm', '刷新token', '/api/v1/refresh_token', 'SYS', 'GET', '2021-05-13 19:59:02.892', '2021-06-13 20:53:49.278', NULL, 0, 0), (53, 'go-admin/app/admin/apis.SysConfig.GetPage-fm', '参数列表', '/api/v1/config', 'BUS', 'GET', '2021-05-13 19:59:03.116', '2021-06-17 11:48:40.732', NULL, 0, 0), (54, 'go-admin/app/admin/apis.SysConfig.Get-fm', '参数通过id获取', '/api/v1/config/:id', 'BUS', 'GET', '2021-05-13 19:59:03.157', '2021-06-17 11:48:40.732', NULL, 0, 0), (55, 'go-admin/app/admin/apis.SysConfig.GetSysConfigByKEYForService-fm', '参数通过键名搜索【基础默认配置】', '/api/v1/configKey/:configKey', 'SYS', 'GET', '2021-05-13 19:59:03.198', '2021-06-13 20:53:49.745', NULL, 0, 0), (57, 'go-admin/app/jobs/apis.SysJob.RemoveJobForService-fm', 'job移除', '/api/v1/job/remove/:id', 'BUS', 'GET', '2021-05-13 19:59:03.295', '2021-06-13 20:53:49.786', NULL, 0, 0), (58, 'go-admin/app/jobs/apis.SysJob.StartJobForService-fm', 'job启动', '/api/v1/job/start/:id', 'BUS', 'GET', '2021-05-13 19:59:03.339', '2021-06-13 20:53:49.829', NULL, 0, 0), (59, 'go-admin/app/admin/apis.SysPost.GetPage-fm', '岗位列表', '/api/v1/post', 'BUS', 'GET', '2021-05-13 19:59:03.381', '2021-06-17 11:48:40.732', NULL, 0, 0), (60, 'go-admin/app/admin/apis.SysPost.Get-fm', '岗位通过id获取', '/api/v1/post/:id', 'BUS', 'GET', '2021-05-13 19:59:03.433', '2021-06-17 11:48:40.732', NULL, 0, 0), (62, 'go-admin/app/admin/apis.SysConfig.GetSysConfigBySysApp-fm', '系统前端参数', '/api/v1/app-config', 'SYS', 'GET', '2021-05-13 19:59:03.526', '2021-06-13 20:53:49.994', NULL, 0, 0), (63, 'go-admin/app/admin/apis.SysUser.GetProfile-fm', '*用户信息获取', '/api/v1/user/profile', 'SYS', 'GET', '2021-05-13 19:59:03.567', '2021-06-13 20:53:50.038', NULL, 0, 0), (66, 'github.com/go-admin-team/go-admin-core/sdk/pkg/ws.(*Manager).WsClient-fm', '链接ws【定时任务log】', '/ws/:id/:channel', 'BUS', 'GET', '2021-05-13 19:59:03.705', '2021-06-13 20:53:50.167', NULL, 0, 0), (67, 'github.com/go-admin-team/go-admin-core/sdk/pkg/ws.(*Manager).UnWsClient-fm', '退出ws【定时任务log】', '/wslogout/:id/:channel', 'BUS', 'GET', '2021-05-13 19:59:03.756', '2021-06-13 20:53:50.209', NULL, 0, 0), (68, 'go-admin/common/middleware/handler.Ping', '*用户基本信息', '/info', 'SYS', 'GET', '2021-05-13 19:59:03.800', '2021-06-13 20:53:50.251', NULL, 0, 0), (72, 'go-admin/common/actions.CreateAction.func1', '分类创建', '/api/v1/syscategory', 'BUS', 'POST', '2021-05-13 19:59:03.982', '2021-06-13 20:53:50.336', NULL, 0, 0), (73, 'go-admin/common/actions.CreateAction.func1', '内容创建', '/api/v1/syscontent', 'BUS', 'POST', '2021-05-13 19:59:04.027', '2021-06-13 20:53:50.375', NULL, 0, 0), (76, 'go-admin/common/actions.CreateAction.func1', 'job创建', '/api/v1/sysjob', 'BUS', 'POST', '2021-05-13 19:59:04.164', '2021-06-13 20:53:50.500', NULL, 0, 0), (80, 'go-admin/app/admin/apis.SysDictData.Insert-fm', '字典数据创建', '/api/v1/dict/data', 'BUS', 'POST', '2021-05-13 19:59:04.347', '2021-06-17 11:48:40.732', NULL, 0, 0), (81, 'go-admin/app/admin/apis.SysDictType.Insert-fm', '字典类型创建', '/api/v1/dict/type', 'BUS', 'POST', '2021-05-13 19:59:04.391', '2021-06-17 11:48:40.732', NULL, 0, 0), (82, 'go-admin/app/admin/apis.SysDept.Insert-fm', '部门创建', '/api/v1/dept', 'BUS', 'POST', '2021-05-13 19:59:04.435', '2021-06-17 11:48:40.732', NULL, 0, 0), (85, 'github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth.(*GinJWTMiddleware).LoginHandler-fm', '*登录', '/api/v1/login', 'SYS', 'POST', '2021-05-13 19:59:04.597', '2021-06-13 20:53:50.784', NULL, 0, 0), (86, 'go-admin/common/middleware/handler.LogOut', '*退出', '/api/v1/logout', 'SYS', 'POST', '2021-05-13 19:59:04.642', '2021-06-13 20:53:50.824', NULL, 0, 0), (87, 'go-admin/app/admin/apis.SysConfig.Insert-fm', '参数创建', '/api/v1/config', 'BUS', 'POST', '2021-05-13 19:59:04.685', '2021-06-17 11:48:40.732', NULL, 0, 0), (88, 'go-admin/app/admin/apis.SysMenu.Insert-fm', '菜单创建', '/api/v1/menu', 'BUS', 'POST', '2021-05-13 19:59:04.777', '2021-06-17 11:48:40.732', NULL, 0, 0), (89, 'go-admin/app/admin/apis.SysPost.Insert-fm', '岗位创建', '/api/v1/post', 'BUS', 'POST', '2021-05-13 19:59:04.886', '2021-06-17 11:48:40.732', NULL, 0, 0), (90, 'go-admin/app/admin/apis.SysRole.Insert-fm', '角色创建', '/api/v1/role', 'BUS', 'POST', '2021-05-13 19:59:04.975', '2021-06-17 11:48:40.732', NULL, 0, 0), (91, 'go-admin/app/admin/apis.SysUser.InsetAvatar-fm', '*用户头像编辑', '/api/v1/user/avatar', 'SYS', 'POST', '2021-05-13 19:59:05.058', '2021-06-13 20:53:51.079', NULL, 0, 0), (92, 'go-admin/app/admin/apis.SysApi.Update-fm', '接口编辑', '/api/v1/sys-api/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.122', '2021-06-17 11:48:40.732', NULL, 0, 0), (95, 'go-admin/common/actions.UpdateAction.func1', '分类编辑', '/api/v1/syscategory/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.255', '2021-06-13 20:53:51.247', NULL, 0, 0), (96, 'go-admin/common/actions.UpdateAction.func1', '内容编辑', '/api/v1/syscontent/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.299', '2021-06-13 20:53:51.289', NULL, 0, 0), (97, 'go-admin/common/actions.UpdateAction.func1', 'job编辑', '/api/v1/sysjob', 'BUS', 'PUT', '2021-05-13 19:59:05.343', '2021-06-13 20:53:51.331', NULL, 0, 0), (101, 'go-admin/app/admin/apis.SysDictData.Update-fm', '字典数据编辑', '/api/v1/dict/data/:dictCode', 'BUS', 'PUT', '2021-05-13 19:59:05.519', '2021-06-17 11:48:40.732', NULL, 0, 0), (102, 'go-admin/app/admin/apis.SysDictType.Update-fm', '字典类型编辑', '/api/v1/dict/type/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.569', '2021-06-17 11:48:40.732', NULL, 0, 0), (103, 'go-admin/app/admin/apis.SysDept.Update-fm', '部门编辑', '/api/v1/dept/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.613', '2021-06-17 11:48:40.732', NULL, 0, 0), (104, 'go-admin/app/other/apis.SysFileDir.Update-fm', '文件夹编辑', '/api/v1/file-dir/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.662', '2021-06-13 20:53:51.847', NULL, 0, 0), (105, 'go-admin/app/other/apis.SysFileInfo.Update-fm', '文件编辑', '/api/v1/file-info/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.709', '2021-06-13 20:53:51.892', NULL, 0, 0), (106, 'go-admin/app/admin/apis.SysRole.Update-fm', '角色编辑', '/api/v1/role/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.752', '2021-06-17 11:48:40.732', NULL, 0, 0), (107, 'go-admin/app/admin/apis.SysRole.Update2DataScope-fm', '角色数据权限修改', '/api/v1/roledatascope', 'BUS', 'PUT', '2021-05-13 19:59:05.803', '2021-06-17 11:48:40.732', NULL, 0, 0), (108, 'go-admin/app/admin/apis.SysConfig.Update-fm', '参数编辑', '/api/v1/config/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.848', '2021-06-17 11:48:40.732', NULL, 0, 0), (109, 'go-admin/app/admin/apis.SysMenu.Update-fm', '编辑菜单', '/api/v1/menu/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.891', '2021-06-17 11:48:40.732', NULL, 0, 0), (110, 'go-admin/app/admin/apis.SysPost.Update-fm', '岗位编辑', '/api/v1/post/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.934', '2021-06-17 11:48:40.732', NULL, 0, 0), (111, 'go-admin/app/admin/apis.SysUser.UpdatePwd-fm', '*用户修改密码', '/api/v1/user/pwd', 'SYS', 'PUT', '2021-05-13 19:59:05.987', '2021-06-13 20:53:51.724', NULL, 0, 0), (112, 'go-admin/common/actions.DeleteAction.func1', '分类删除', '/api/v1/syscategory', 'BUS', 'DELETE', '2021-05-13 19:59:06.030', '2021-06-13 20:53:52.237', NULL, 0, 0), (113, 'go-admin/common/actions.DeleteAction.func1', '内容删除', '/api/v1/syscontent', 'BUS', 'DELETE', '2021-05-13 19:59:06.076', '2021-06-13 20:53:52.278', NULL, 0, 0), (114, 'go-admin/app/admin/apis.SysLoginLog.Delete-fm', '登录日志删除', '/api/v1/sys-login-log', 'BUS', 'DELETE', '2021-05-13 19:59:06.118', '2021-06-17 11:48:40.732', NULL, 0, 0), (115, 'go-admin/app/admin/apis.SysOperaLog.Delete-fm', '操作日志删除', '/api/v1/sys-opera-log', 'BUS', 'DELETE', '2021-05-13 19:59:06.162', '2021-06-17 11:48:40.732', NULL, 0, 0), (116, 'go-admin/common/actions.DeleteAction.func1', 'job删除', '/api/v1/sysjob', 'BUS', 'DELETE', '2021-05-13 19:59:06.206', '2021-06-13 20:53:52.323', NULL, 0, 0), (117, 'go-admin/app/other/apis.SysChinaAreaData.Delete-fm', '行政区删除', '/api/v1/sys-area-data', 'BUS', 'DELETE', '2021-05-13 19:59:06.249', '2021-06-13 20:53:52.061', NULL, 0, 0), (120, 'go-admin/app/admin/apis.SysDictData.Delete-fm', '字典数据删除', '/api/v1/dict/data', 'BUS', 'DELETE', '2021-05-13 19:59:06.387', '2021-06-17 11:48:40.732', NULL, 0, 0), (121, 'go-admin/app/admin/apis.SysDictType.Delete-fm', '字典类型删除', '/api/v1/dict/type', 'BUS', 'DELETE', '2021-05-13 19:59:06.432', '2021-06-17 11:48:40.732', NULL, 0, 0), (122, 'go-admin/app/admin/apis.SysDept.Delete-fm', '部门删除', '/api/v1/dept/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.475', '2021-06-17 11:48:40.732', NULL, 0, 0), (123, 'go-admin/app/other/apis.SysFileDir.Delete-fm', '文件夹删除', '/api/v1/file-dir/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.520', '2021-06-13 20:53:52.539', NULL, 0, 0), (124, 'go-admin/app/other/apis.SysFileInfo.Delete-fm', '文件删除', '/api/v1/file-info/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.566', '2021-06-13 20:53:52.580', NULL, 0, 0), (125, 'go-admin/app/admin/apis.SysConfig.Delete-fm', '参数删除', '/api/v1/config', 'BUS', 'DELETE', '2021-05-13 19:59:06.612', '2021-06-17 11:48:40.732', NULL, 0, 0), (126, 'go-admin/app/admin/apis.SysMenu.Delete-fm', '删除菜单', '/api/v1/menu', 'BUS', 'DELETE', '2021-05-13 19:59:06.654', '2021-06-17 11:48:40.732', NULL, 0, 0), (127, 'go-admin/app/admin/apis.SysPost.Delete-fm', '岗位删除', '/api/v1/post/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.702', '2021-06-17 11:48:40.732', NULL, 0, 0), (128, 'go-admin/app/admin/apis.SysRole.Delete-fm', '角色删除', '/api/v1/role', 'BUS', 'DELETE', '2021-05-13 19:59:06.746', '2021-06-17 11:48:40.732', NULL, 0, 0), (131, 'github.com/go-admin-team/go-admin-core/tools/transfer.Handler.func1', '系统指标', '/api/v1/metrics', 'SYS', 'GET', '2021-05-17 22:13:55.933', '2021-06-13 20:53:49.614', NULL, 0, 0), (132, 'go-admin/app/other/router.registerMonitorRouter.func1', '健康状态', '/api/v1/health', 'SYS', 'GET', '2021-05-17 22:13:56.285', '2021-06-13 20:53:49.951', NULL, 0, 0), (133, 'go-admin/app/admin/apis.HelloWorld', '项目默认接口', '/', 'SYS', 'GET', '2021-05-24 10:30:44.553', '2021-06-13 20:53:47.406', NULL, 0, 0), (134, 'go-admin/app/other/apis.ServerMonitor.ServerInfo-fm', '服务器基本状态', '/api/v1/server-monitor', 'SYS', 'GET', '2021-05-24 10:30:44.937', '2021-06-13 20:53:48.255', NULL, 0, 0), (135, 'go-admin/app/admin/apis.SysApi.GetPage-fm', '接口列表', '/api/v1/sys-api', 'BUS', 'GET', '2021-05-24 11:37:53.303', '2021-06-17 11:48:40.732', NULL, 0, 0), (136, 'go-admin/app/admin/apis.SysApi.Get-fm', '接口通过id获取', '/api/v1/sys-api/:id', 'BUS', 'GET', '2021-05-24 11:37:53.359', '2021-06-17 11:48:40.732', NULL, 0, 0), (137, 'go-admin/app/admin/apis.SysLoginLog.GetPage-fm', '登录日志列表', '/api/v1/sys-login-log', 'BUS', 'GET', '2021-05-24 11:47:30.397', '2021-06-17 11:48:40.732', NULL, 0, 0), (138, 'go-admin/app/other/apis.File.UploadFile-fm', '文件上传', '/api/v1/public/uploadFile', 'SYS', 'POST', '2021-05-25 19:16:18.493', '2021-06-13 20:53:50.866', NULL, 0, 0), (139, 'go-admin/app/admin/apis.SysConfig.Update2Set-fm', '参数信息修改【参数配置】', '/api/v1/set-config', 'BUS', 'PUT', '2021-05-27 09:45:14.853', '2021-06-17 11:48:40.732', NULL, 0, 0), (140, 'go-admin/app/admin/apis.SysConfig.Get2Set-fm', '参数获取全部【配置使用】', '/api/v1/set-config', 'BUS', 'GET', '2021-05-27 11:54:14.384', '2021-06-17 11:48:40.732', NULL, 0, 0), (141, 'go-admin/app/admin/apis.SysUser.GetPage-fm', '管理员列表', '/api/v1/sys-user', 'BUS', 'GET', '2021-06-13 19:24:57.111', '2021-06-17 20:31:14.318', NULL, 0, 0), (142, 'go-admin/app/admin/apis.SysUser.Get-fm', '管理员通过id获取', '/api/v1/sys-user/:id', 'BUS', 'GET', '2021-06-13 19:24:57.188', '2021-06-17 20:31:14.318', NULL, 0, 0), (143, 'go-admin/app/admin/apis/tools.(*SysTable).GetSysTablesInfo-fm', '', '/api/v1/sys/tables/info', '', 'GET', '2021-06-13 19:24:57.437', '2021-06-13 20:53:48.047', NULL, 0, 0), (144, 'go-admin/app/admin/apis/tools.(*SysTable).GetSysTables-fm', '', '/api/v1/sys/tables/info/:tableId', '', 'GET', '2021-06-13 19:24:57.510', '2021-06-13 20:53:48.088', NULL, 0, 0), (145, 'go-admin/app/admin/apis/tools.(*SysTable).GetSysTableList-fm', '', '/api/v1/sys/tables/page', '', 'GET', '2021-06-13 19:24:57.582', '2021-06-13 20:53:48.128', NULL, 0, 0), (146, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/static/*filepath', '', 'GET', '2021-06-13 19:24:59.641', '2021-06-13 20:53:50.081', NULL, 0, 0), (147, 'github.com/swaggo/gin-swagger.CustomWrapHandler.func1', '', '/swagger/*any', '', 'GET', '2021-06-13 19:24:59.713', '2021-06-13 20:53:50.123', NULL, 0, 0), (148, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/form-generator/*filepath', '', 'GET', '2021-06-13 19:24:59.914', '2021-06-13 20:53:50.295', NULL, 0, 0), (149, 'go-admin/app/admin/apis/tools.(*SysTable).InsertSysTable-fm', '', '/api/v1/sys/tables/info', '', 'POST', '2021-06-13 19:25:00.163', '2021-06-13 20:53:50.539', NULL, 0, 0), (150, 'go-admin/app/admin/apis.SysUser.Insert-fm', '管理员创建', '/api/v1/sys-user', 'BUS', 'POST', '2021-06-13 19:25:00.233', '2021-06-17 20:31:14.318', NULL, 0, 0), (151, 'go-admin/app/admin/apis.SysUser.Update-fm', '管理员编辑', '/api/v1/sys-user', 'BUS', 'PUT', '2021-06-13 19:25:00.986', '2021-06-17 20:31:14.318', NULL, 0, 0), (152, 'go-admin/app/admin/apis/tools.(*SysTable).UpdateSysTable-fm', '', '/api/v1/sys/tables/info', '', 'PUT', '2021-06-13 19:25:01.149', '2021-06-13 20:53:51.375', NULL, 0, 0), (153, 'go-admin/app/admin/apis.SysRole.Update2Status-fm', '', '/api/v1/role-status', '', 'PUT', '2021-06-13 19:25:01.446', '2021-06-13 20:53:51.636', NULL, 0, 0), (154, 'go-admin/app/admin/apis.SysUser.ResetPwd-fm', '', '/api/v1/user/pwd/reset', '', 'PUT', '2021-06-13 19:25:01.601', '2021-06-13 20:53:51.764', NULL, 0, 0), (155, 'go-admin/app/admin/apis.SysUser.UpdateStatus-fm', '', '/api/v1/user/status', '', 'PUT', '2021-06-13 19:25:01.671', '2021-06-13 20:53:51.806', NULL, 0, 0), (156, 'go-admin/app/admin/apis.SysUser.Delete-fm', '管理员删除', '/api/v1/sys-user', 'BUS', 'DELETE', '2021-06-13 19:25:02.043', '2021-06-17 20:31:14.318', NULL, 0, 0), (157, 'go-admin/app/admin/apis/tools.(*SysTable).DeleteSysTables-fm', '', '/api/v1/sys/tables/info/:tableId', '', 'DELETE', '2021-06-13 19:25:02.283', '2021-06-13 20:53:52.367', NULL, 0, 0), (158, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/static/*filepath', '', 'HEAD', '2021-06-13 19:25:02.734', '2021-06-13 20:53:52.791', NULL, 0, 0), (159, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/form-generator/*filepath', '', 'HEAD', '2021-06-13 19:25:02.808', '2021-06-13 20:53:52.838', NULL, 0, 0); sql语句报错 Data truncated for column 'type' at row 105

filetype

wjs@wjs-virtual-machine:~/leida_ws$ ls -l /dev/ttyUSB* crw-rw-rw- 1 root dialout 188, 0 7月 18 10:56 /dev/ttyUSB0 wjs@wjs-virtual-machine:~/leida_ws$ colcon build/ usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL] {build,extension-points,extensions,graph,info,list,metadata,test,test-result,version-check} ... colcon: error: argument verb_name: invalid choice: 'build/' (choose from 'build', 'extension-points', 'extensions', 'graph', 'info', 'list', 'metadata', 'test', 'test-result', 'version-check') wjs@wjs-virtual-machine:~/leida_ws$ colcon build Starting >>> rplidar_ros2 Finished <<< rplidar_ros2 [0.13s] Summary: 1 package finished [0.32s] wjs@wjs-virtual-machine:~/leida_ws$ . install/setup.bash wjs@wjs-virtual-machine:~/leida_ws$ ros2 launch rplidar_ros2 rplidar.launch.py [INFO] [launch]: All log files can be found below /home/wjs/.ros/log/2025-07-18-11-02-50-225063-wjs-virtual-machine-3789 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [rplidarNode-1]: process started with pid [3790] [rplidarNode-1] [INFO] [1752807770.272385203] [rplidarNode]: RPLIDAR running on ROS package rplidar_ros. SDK Version:1.12.0 [rplidarNode-1] [ERROR] [1752807776.882931070] [rplidarNode]: Operation time out. RESULT_OPERATION_TIMEOUT! [rplidarNode-1] runtime_error [ERROR] [rplidarNode-1]: process has died [pid 3790, exit code 255, cmd '/home/wjs/leida_ws/install/rplidar_ros2/lib/rplidar_ros2/rplidarNode --ros-args -r __node:=rplidarNode --params-file /tmp/launch_params_vpzqjbab']. wjs@wjs-virtual-machine:~/leida_ws$

filetype

{ "name": "ims-web-view", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit", "analyze": "cross-env ANALYZE=true vue-cli-service build", "build:dameng": "vue-cli-service build --mode dameng", "build:mofan": "vue-cli-service build --mode mofan", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "build:sxf": "vue-cli-service build --mode sxf", "build:uat": "vue-cli-service build --mode uat" }, "dependencies": { "@babel/runtime": "^7.25.7", "@fullcalendar/core": "^6.1.15", "@fullcalendar/daygrid": "^6.1.15", "@fullcalendar/interaction": "^6.1.15", "@fullcalendar/resource-timeline": "^6.1.15", "@fullcalendar/timegrid": "^6.1.15", "@fullcalendar/timeline": "^6.1.15", "@fullcalendar/vue": "^6.1.15", "@jiaminghi/data-view": "^2.10.0", "@riophae/vue-treeselect": "^0.4.0", "@sentry/tracing": "^7.118.0", "@sentry/vue": "^7.118.0", "@stomp/stompjs": "^7.0.0", "@tencentcloud/call-uikit-vue": "^4.0.7", "@tencentcloud/call-uikit-vue2": "^4.0.7", "@tencentcloud/chat-uikit-vue": "^2.5.1", "@vant/area-data": "^1.5.1", "alloyfinger": "^0.1.16", "awe-dnd": "^0.3.4", "axios": "^1.7.7", "core-js": "^3.38.1", "dayjs": "^1.11.13", "dhtmlx-gantt": "^8.0.10", "dom-to-image-hm": "^2.6.1", "dompurify": "^3.2.5", "echarts-wordcloud": "^2.1.0", "el-table-infinite-scroll": "^2.0.2", "element-resize-detector": "^1.2.4", "element-ui": "^2.15.14", "file-saver": "^2.0.5", "html2canvas": "^1.4.1", "jquery": "^3.7.1", "js-cookie": "^3.0.5", "js-md5": "^0.8.3", "jsencrypt": "^3.3.2", "jsonwebtoken": "^9.0.2", "jspdf": "^1.5.3", "jszip": "^3.10.1", "lodash": "^4.17.21", "moment": "^2.30.1", "node-forge": "^1.3.1", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", "path-to-regexp": "^6.3.0", "posthog-js": "^1.230.4", "qrcodejs2": "0.0.2", "qs": "^6.13.0", "quill-image-extend-module": "^1.1.2", "recorder-core": "^1.2.23020100", "recordrtc": "^5.6.2", "save": "^2.4.0", "screenfull": "^6.0.2", "sm-crypto": "^0.3.13", "sortablejs": "^1.15.3", "svg-sprite-loader": "^6.0.11", "svgo": "^1.3.2", "swiper": "^5.4.5", "tim-upload-plugin": "^1.4.2", "trtc-sdk-v5": "^5.1.3", "turndown": "^7.2.0", "v-viewer": "^1.6.4", "vant": "^2.12.54", "vue": "^2.7.16", "vue-amap": "^0.5.10", "vue-awesome-swiper": "^4.1.1", "vue-bus": "^1.2.1", "vue-carousel": "^0.18.0", "vue-class-component": "^7.2.3", "vue-clipboard2": "^0.3.3", "vue-clock2": "^1.1.5", "vue-count-to": "^1.0.13", "vue-gallery": "^2.0.1", "vue-i18n": "^8.28.1", "vue-js-toggle-button": "^1.3.3", "vue-markdown": "^2.2.4", "vue-orgchart": "^1.1.7", "vue-property-decorator": "^9.1.2", "vue-qr": "^2.3.0", "vue-quill-editor": "^3.0.6", "vue-router": "^3.6.5", "vue-splitpane": "^1.0.6", "vue-wordcloud": "^1.1.1", "vue2-org-tree": "^1.3.6", "vuex": "^3.6.2", "vxe-table": "^3.11.14", "vxe-table-plugin-export-xlsx": "^2.2.1", "vxe-utils": "^1.9.3", "wangeditor": "^4.7.15", "xe-ajax": "^4.0.3", "xe-utils": "^3.4.0", "xlsx": "^0.18.5" }, "devDependencies": { "@babel/plugin-transform-runtime": "^7.25.7", "@riophae/vue-treeselect": "^0.4.0", "@types/chai": "^4.2.15", "@types/mocha": "^8.2.1", "@types/node": "^16.18.108", "@vue/cli-plugin-babel": "^5.0.8", "@vue/cli-plugin-router": "^5.0.8", "@vue/cli-plugin-typescript": "~5.0.0", "@vue/cli-plugin-unit-mocha": "^5.0.8", "@vue/cli-plugin-vuex": "^5.0.8", "@vue/cli-service": "^5.0.8", "@vue/preload-webpack-plugin": "^2.0.0", "@vue/test-utils": "^1.3.6", "awe-dnd": "^0.3.4", "babel-plugin-component": "^1.1.1", "babel-plugin-import": "^1.13.8", "buffer": "^6.0.3", "chai": "^4.5.0", "compression-webpack-plugin": "^11.1.0", "cross-env": "^7.0.3", "crypto-browserify": "^3.12.1", "css-loader": "^7.1.2", "cssnano": "^7.0.6", "dom-to-image-hm": "^2.6.1", "echarts": "^5.5.1", "file-loader": "^6.2.0", "https-browserify": "^1.0.0", "less": "^4.2.0", "less-loader": "^12.2.0", "lodash": "^4.17.21", "mini-css-extract-plugin": "^2.9.1", "os-browserify": "^0.3.0", "path-browserify": "^1.0.1", "process": "^0.11.10", "sass": "^1.79.4", "sass-loader": "^16.0.2", "sockjs-client": "^1.6.1", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "string-replace-loader": "^3.2.0", "terser-webpack-plugin": "^5.3.10", "timers-browserify": "^2.0.12", "typescript": "~4.5.5", "url": "^0.11.4", "url-loader": "^4.1.1", "util": "^0.12.5", "vm-browserify": "^1.1.2", "vue-amap": "^0.5.10", "vue-style-loader": "^4.1.3", "vue-template-compiler": "^2.7.16", "webpack-bundle-analyzer": "^4.10.2" }, "browserslist": [ "> 1%", "last 2 versions", "not dead" ] } 那个是我的node版本这是package.json 文件

filetype

3199: 07-22 20:40:03.941 4621 4621 I chromium: [INFO:CONSOLE(1)] "Uncaught ReferenceError: TenvideoJSBridge is not defined", source: https://s.iwan.qq.com/opengame/tenvideo/index.html?hidestatusbar=1&hidetitlebar=1&immersive=1&syswebview=1&gameid=54885&url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fcls.xjcs.3737.com%2Fhx3%2Fentry.php&ref_ele=10043&isDarkMode=1 (1) 行 3319: 07-22 20:40:04.088 4621 4621 I chromium: [INFO:CONSOLE(3)] "TenvideoJSBridge initialization begin", source: (3) 行 3344: 07-22 20:40:04.109 4621 4621 I chromium: [INFO:CONSOLE(212)] "TenvideoJSBridge initialization end", source: (212) 行 3345: 07-22 20:40:04.109 4621 4621 I chromium: [INFO:CONSOLE(235)] "after init []", source: (235) 行 3392: 07-22 20:40:04.184 4621 4621 I chromium: [INFO:CONSOLE(56)] "log[aegis] begin init aegis", source: https://ovg.gtimg.cn/opengame/v2/assets/common-head.e6e6a46a.js (56) 行 3403: 07-22 20:40:04.195 4621 4621 I chromium: [INFO:CONSOLE(56)] "log[aegis] init event bus", source: https://ovg.gtimg.cn/opengame/v2/assets/common-head.e6e6a46a.js (56) 行 3406: 07-22 20:40:04.205 4621 4621 I chromium: [INFO:CONSOLE(56)] "log[aegis] init aegis, aegis load: true", source: https://ovg.gtimg.cn/opengame/v2/assets/common-head.e6e6a46a.js (56) 行 3424: 07-22 20:40:04.238 4621 4621 I chromium: [INFO:CONSOLE(56)] "log[aegis] init aegis success", source: https://ovg.gtimg.cn/opengame/v2/assets/common-head.e6e6a46a.js (56) 行 3792: 07-22 20:40:05.040 4621 4621 I chromium: [INFO:CONSOLE(85)] "[adapter] init channelid = hx3", source: https://xjcs03.resources.3737.com/wc15/cn/h5/adapter/adapter.js?t=0.19968432772437916 (85) 这段log是安卓14 腾讯视频打开某个小游戏之后,加载到90%就停止了;这个bug该怎么解决

filetype

海康工业相机ros话题timeout 60s ./simple_armor_test.sh | head -50 === 海康工业相机装甲板检测测试 === 1. 检查工作空间... 2. 设置ROS2环境... 3. 检查海康相机连接... ✓ 找到海康相机: Bus 008 Device 005: ID 2bdf:0001 U3V MV-CA013-A0UC 启动海康工业相机装甲板检测系统... 启动海康工业相机完整系统... [INFO] [launch]: All log files can be found below /home/zkx/.ros/log/2025-07-19-20-55-46-797742-zkxcp-49786 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [hikvision_camera-1]: process started with pid [49788] [INFO] [detector_node-2]: process started with pid [49790] [INFO] [static_transform_publisher-3]: process started with pid [49792] [static_transform_publisher-3] [WARN] [1752929746.842861406] []: Old-style arguments are deprecated; see --help for new-style arguments [static_transform_publisher-3] [INFO] [1752929746.869005346] [camera_base_broadcaster]: Spinning until stopped - publishing transform [static_transform_publisher-3] translation: ('0.000000', '0.000000', '0.200000') [static_transform_publisher-3] rotation: ('0.000000', '0.000000', '0.000000', '1.000000') [static_transform_publisher-3] from 'base_link' to 'camera_link' [detector_node-2] [INFO] [1752929747.250788859] [armor_detector]: 使用默认相机内参 [detector_node-2] [INFO] [1752929747.260540014] [armor_detector]: 装甲板检测节点已启动 [hikvision_camera-1] [INFO] [1752929747.319222573] [hikvision_camera]: 发现 1 台相机 [hikvision_camera-1] [ERROR] [1752929747.338926332] [hikvision_camera]: 打开设备失败,错误码: 2147484163 [hikvision_camera-1] [INFO] [1752929747.339227563] [hikvision_camera]: 海康相机节点启动成功,帧率: 30.0 FPS === 海康工业相机检测测试开始 === 1. 检查ROS2节点... ✗ ROS2节点异常 2. 检查话题... ✗ 图像话题缺失 ✗ 装甲板检测话题缺失 3. 检查海康工业相机图像... ✗ 海康工业相机图像发布异常 可能的问题: - 海康SDK驱动问题 - 相机权限不足 - 相机被其他程序占用 4. 海康工业相机装甲板检测测试 (30秒)... 请在海康工业相机前放置红色或蓝色装甲板目标... 你可以使用: - 红色LED灯条 - 蓝色LED灯条 - 红/蓝色纸片或卡片 - 手机屏幕显示红/蓝色矩形 ⚠ 30秒内未检测到装甲板 zkx@zkxcp:~/RM/ar zkx@zkxcp:~/RM/armor_ws$ ^C zkx@zkxcp:~/RM/armor_ws$ echo "=== 系统状态检查 ===" === 系统状态检查 === zkx@zkxcp:~/RM/armor_ws$ echo "1. 检查海康相机连接..." && lsusb | grep "2bdf:0001" 1. 检查海康相机连接... Bus 008 Device 005: ID 2bdf:0001 U3V MV-CA013-A0UC zkx@zkxcp:~/RM/armor_ws$ echo "2. 检查ROS2环境..." && source /opt/ros/humble/setup.bash && source install/setup.bash && echo "✓ ROS2环境设置成功" 2. 检查ROS2环境... ✓ ROS2环境设置成功 zkx@zkxcp:~/RM/armor_ws$ echo "3. 启动检测节点测试..." && ros2 run detector detector_node --ros-args --params-file install/detector/share/detector/config/detector_params.yaml --params-file install/detector/share/detector/config/camera_params.yaml & [1] 50681 3. 启动检测节点测试... zkx@zkxcp:~/RM/armor_ws$ [INFO] [1752929832.042069290] [armor_detector]: 使用默认相机内参 [INFO] [1752929832.056559542] [armor_detector]: 装甲板检测节点已启动 ^C

filetype

lzy@lzy-Dell-G15-5530:~/ros2_ws$ ros2 launch orbbec_camera astra.launch.py [INFO] [launch]: All log files can be found below /home/lzy/.ros/log/2025-03-28-21-12-39-292013-lzy-Dell-G15-5530-4459 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [component_container-1]: process started with pid [4483] [component_container-1] [INFO] [1743167559.695487926] [camera.camera_container]: Load Library: /home/lzy/ros2_ws/install/orbbec_camera/lib/liborbbec_camera.so [component_container-1] [INFO] [1743167559.859324288] [camera.camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver> [component_container-1] [INFO] [1743167559.859382411] [camera.camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver> [component_container-1] [03/28 21:12:39.866629][info][4483][Context.cpp:68] Context created with config: /home/lzy/ros2_ws/install/orbbec_camera/share/orbbec_camera/config/OrbbecSDKConfig_v1.0.xml [component_container-1] [03/28 21:12:39.866644][info][4483][Context.cpp:73] Work directory=/home/lzy/ros2_ws, SDK version=v1.10.18-20250103-27bf2f6 [component_container-1] [03/28 21:12:39.866657][info][4483][LinuxPal.cpp:32] createObPal: create LinuxPal! [component_container-1] [03/28 21:12:39.867574][warning][4483][OpenNIDeviceInfo.cpp:122] New openni device matched. [component_container-1] [03/28 21:12:39.867719][info][4483][LinuxPal.cpp:166] Create PollingDeviceWatcher! [component_container-1] [03/28 21:12:39.867765][info][4483][DeviceManager.cpp:15] Current found device(s): (1) [component_container-1] [03/28 21:12:39.867769][info][4483][DeviceManager.cpp:24] - Name: Astra S, PID: 0x0402, SN/ID: , Connection: USB2.0 [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/camera/camera' in container '/camera/camera_container' [component_container-1] [INFO] [1743167559.969621694] [camera.camera]: Connecting to the default device [component_container-1] [INFO] [

filetype

njj@njj-Legion-R9000P-ARX8:~/桌面$ . ./install/setup.bash ros2 launch orbbec_camera astra.launch.py # or other launch file, see below table bash: ./install/setup.bash: 没有那个文件或目录 [INFO] [launch]: All log files can be found below /home/njj/.ros/log/2025-05-30-20-00-34-581719-njj-Legion-R9000P-ARX8-64818 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [component_container-1]: process started with pid [64830] [component_container-1] [INFO] [1748606434.902641889] [camera.camera_container]: Load Library: /home/njj/ros2_ws/install/orbbec_camera/lib/liborbbec_camera.so [component_container-1] [INFO] [1748606434.951425532] [camera.camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver> [component_container-1] [INFO] [1748606434.951457590] [camera.camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver> [component_container-1] [05/30 20:00:34.955243][info][64830][Context.cpp:68] Context created with config: /home/njj/ros2_ws/install/orbbec_camera/share/orbbec_camera/config/OrbbecSDKConfig_v1.0.xml [component_container-1] [05/30 20:00:34.955258][info][64830][Context.cpp:73] Work directory=/home/njj/桌面, SDK version=v1.10.22-20250410-46139de [component_container-1] [05/30 20:00:34.955273][info][64830][LinuxPal.cpp:32] createObPal: create LinuxPal! [component_container-1] [05/30 20:00:34.965122][warning][64830][OpenNIDeviceInfo.cpp:186] New openni device matched. [component_container-1] [05/30 20:00:34.965222][info][64830][LinuxPal.cpp:166] Create PollingDeviceWatcher! [component_container-1] [05/30 20:00:34.965241][info][64830][DeviceManager.cpp:15] Current found device(s): (1) [component_container-1] [05/30 20:00:34.965246][info][64830][DeviceManager.cpp:24] - Name: Astra Pro, PID: 0x0403, SN/ID: , Connection: USB2.0 [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/camera/camera' in container '/camera/camera_container' [component_container-1] [INFO] [1748606435.066065370] [camera.camera]: Connecting to the default device [component_container-1] [INFO] [1748606435.100209289] [camera.camera]: Select device cost 34 ms [component_container-1] [INFO] [1748606435.100231848] [camera.camera]: Try to connect device via USB2.0 [component_container-1] [INFO] [1748606435.100950180] [camera.camera]: OBCameraNode: use_intra_process: OFF [component_container-1] [INFO] [1748606435.105014395] [camera.camera]: current time domain: system [component_container-1] [INFO] [1748606435.105594997] [camera.camera]: Setting depth soft filter to ON [component_container-1] [INFO] [1748606435.105629430] [camera.camera]: Setting color auto exposure to ON [component_container-1] [INFO] [1748606435.106332327] [camera.camera]: default_soft_filter_max_diff: 16 [component_container-1] [INFO] [1748606435.106356073] [camera.camera]: default_soft_filter_speckle_size: 480 [component_container-1] [ERROR] [1748606435.106643406] [camera.camera]: Failed to get color profile: Invalid input, No matched video stream profile found! [component_container-1] [ERROR] [1748606435.106656466] [camera.camera]: Stream: OB_STREAM_COLOR, Stream Index: 0, Width: 640, Height: 480, FPS: 10, Format: OB_FORMAT_RGB [component_container-1] [ERROR] [1748606435.106664778] [camera.camera]: Error: The device might be connected via USB 2.0. Please verify your configuration and try again. The current process will now exit. [component_container-1] [INFO] [1748606435.106673089] [camera.camera]: Available profiles: [component_container-1] [INFO] [1748606435.106701585] [camera.camera]: color profile: 160x120 30fps UYVY [component_container-1] [INFO] [1748606435.106719395] [camera.camera]: color profile: 640x480 30fps UYVY [component_container-1] [INFO] [1748606435.106725331] [camera.camera]: color profile: 1280x720 30fps UYVY [component_container-1] [INFO] [1748606435.106733643] [camera.camera]: color profile: 1280x800 30fps UYVY [component_container-1] [ERROR] [1748606435.106740767] [camera.camera]: Because can not set this stream, so exit. [ERROR] [component_container-1]: process has died [pid 64830, exit code 255, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args -r __node:=camera_container -r __ns:=/camera'].

filetype
filetype

. ./install/setup.bash ros2 launch orbbec_camera astra.launch.py # or other launch file, see below table [INFO] [launch]: All log files can be found below /home/njj/.ros/log/2025-05-30-19-17-14-669565-njj-Legion-R9000P-ARX8-59674 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [component_container-1]: process started with pid [59686] [component_container-1] [INFO] [1748603834.987929981] [camera.camera_container]: Load Library: /home/njj/ros2_ws/install/orbbec_camera/lib/liborbbec_camera.so [component_container-1] [INFO] [1748603835.035404233] [camera.camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver> [component_container-1] [INFO] [1748603835.035441039] [camera.camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<orbbec_camera::OBCameraNodeDriver> [component_container-1] [05/30 19:17:15.038694][info][59686][Context.cpp:68] Context created with config: /home/njj/ros2_ws/install/orbbec_camera/share/orbbec_camera/config/OrbbecSDKConfig_v1.0.xml [component_container-1] [05/30 19:17:15.038706][info][59686][Context.cpp:73] Work directory=/home/njj/ros2_ws, SDK version=v1.10.22-20250410-46139de [component_container-1] [05/30 19:17:15.038720][info][59686][LinuxPal.cpp:32] createObPal: create LinuxPal! [component_container-1] [05/30 19:17:15.105307][warning][59686][OpenNIDeviceInfo.cpp:186] New openni device matched. [component_container-1] [05/30 19:17:15.105410][info][59686][LinuxPal.cpp:166] Create PollingDeviceWatcher! [component_container-1] [05/30 19:17:15.105428][info][59686][DeviceManager.cpp:15] Current found device(s): (1) [component_container-1] [05/30 19:17:15.105433][info][59686][DeviceManager.cpp:24] - Name: Astra Pro, PID: 0x0403, SN/ID: , Connection: USB2.0 [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/camera/camera' in container '/camera/camera_container' [component_container-1] [INFO] [1748603835.206411750] [camera.camera]: Connecting to the default device [component_container-1] [INFO] [1748603835.239844139] [camera.camera]: Select device cost 33 ms [component_container-1] [INFO] [1748603835.239869072] [camera.camera]: Try to connect device via USB2.0 [component_container-1] [INFO] [1748603835.240244250] [camera.camera]: OBCameraNode: use_intra_process: OFF [component_container-1] [INFO] [1748603835.242599797] [camera.camera]: current time domain: system [component_container-1] [INFO] [1748603835.243149504] [camera.camera]: Setting depth soft filter to ON [component_container-1] [INFO] [1748603835.243183935] [camera.camera]: Setting color auto exposure to ON [component_container-1] [INFO] [1748603835.243903422] [camera.camera]: default_soft_filter_max_diff: 16 [component_container-1] [INFO] [1748603835.243928354] [camera.camera]: default_soft_filter_speckle_size: 480 [component_container-1] [ERROR] [1748603835.244024523] [camera.camera]: Failed to get color profile: Invalid input, No matched video stream profile found! [component_container-1] [ERROR] [1748603835.244035209] [camera.camera]: Stream: OB_STREAM_COLOR, Stream Index: 0, Width: 640, Height: 480, FPS: 10, Format: OB_FORMAT_RGB [component_container-1] [ERROR] [1748603835.244043520] [camera.camera]: Error: The device might be connected via USB 2.0. Please verify your configuration and try again. The current process will now exit. [component_container-1] [INFO] [1748603835.244053018] [camera.camera]: Available profiles: [component_container-1] [INFO] [1748603835.244076763] [camera.camera]: color profile: 160x120 30fps UYVY [component_container-1] [INFO] [1748603835.244086262] [camera.camera]: color profile: 640x480 30fps UYVY [component_container-1] [INFO] [1748603835.244094572] [camera.camera]: color profile: 1280x720 30fps UYVY [component_container-1] [INFO] [1748603835.244102883] [camera.camera]: color profile: 1280x800 30fps UYVY [component_container-1] [ERROR] [1748603835.244110007] [camera.camera]: Because can not set this stream, so exit. [ERROR] [component_container-1]: process has died [pid 59686, exit code 255, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args -r __node:=camera_container -r __ns:=/camera'].

filetype

import time import os import sys import ctypes from can.interfaces.etas import EtasBus import can import can import re import can import os import sys import ctypes import can.interfaces.etas from pathlib import Path def load_etas_dlls(): """显式加载 ETAS DLL 并配置路径""" try: # 开发环境路径(未打包时) if not getattr(sys, 'frozen', False): dll_dir = r"C:/Program Files/ETAS/BOA_V2/Bin/x64/Dll/Framework/" # 根据实际安装路径修改 else: # 打包后的资源目录 base_path = sys._MEIPASS if hasattr(sys, '_MEIPASS') else os.path.dirname(sys.executable) dll_dir = os.path.join(base_path, "etas_dlls") # 添加 DLL 搜索路径 os.environ["PATH"] = dll_dir + os.pathsep + os.environ["PATH"] # 显式加载关键 DLL(解决延迟加载问题) ctypes.WinDLL(os.path.join(dll_dir, "dll-csiBind.dll")) ctypes.WinDLL(os.path.join(dll_dir, "dll-ocdProxy.dll")) print(f"已成功加载 ETAS DLL,路径: {dll_dir}") return True except Exception as e: print(f"DLL 加载失败: {e}") return False ETAS_channel=[] def detect_device_exist(): # 检测ETAS设备是否存在 device_exist = False pattern = re.compile(r'ETAS://(USB|PCI)/ES582\.?1?', re.IGNORECASE) configs = can.detect_available_configs(interfaces=['etas']) for config in configs: # print(config['channel']) if 'ETAS://USB/ES582.1' in config['channel']: print(f"匹配成功: { config['channel']}") ETAS_channel.append(config['channel']) found = any(pattern.search(channel) for channel in ETAS_channel) if found: print("ETAS设备已连接") device_exist = True else: print("ETAS设备未连接") device_exist = False return device_exist def ETAS_init(): count=0 if not detect_device_exist(): print("ETAS device not found.") print("请选择当前设备-所用通道:") for device_channel in ETAS_channel: count=count+1 print(f"{count}-{device_channel}") count=0 device_channel_index = input("当前所需通道序号:") device_User_channel = ETAS_channel[int(device_channel_index)-1] print(device_User_channel) # device_bitrate = 500000 # device_bitrate = input("当前所用波特率(bit):") # print("请选择当前设备-所用CAN协议类型:") # print("1-CAN") # print("2-CANFD") # device_can_type_index = input("当前所需CAN协议类型:") # if device_can_type_index == "2": # bus = can.interface.Bus(bustype='etas', channel=device_User_channel, bitrate=device_bitrate, data_bitrate=2000000, tres=True) # else: # bus = can.interface.Bus(bustype='etas', channel=device_User_channel, bitrate=device_bitrate) return device_User_channel def format_asc_line(msg): """将 CAN 报文格式化为 ASC 格式字符串""" try: # 时间戳处理(兼容浮点精度问题) timestamp_sec = int(msg.timestamp) timestamp_usec = int(round((msg.timestamp - timestamp_sec) * 1e6)) timestamp_str = f"{timestamp_sec}.{timestamp_usec:06d}" # CAN ID处理(兼容标准帧和扩展帧) can_id_str = f"{msg.arbitration_id:08X}" if msg.is_extended_id else f"{msg.arbitration_id:03X}" # 数据字节处理(兼容可变长度) data_bytes = msg.data.ljust(8, b'\x00')[:8] # 确保8字节长度 data_str = ' '.join(f"{byte:02X}" for byte in data_bytes[:msg.dlc]) return f"{timestamp_str} {can_id_str} {msg.dlc} {data_str}\n" except Exception as e: print(f"格式化报文时出错: {str(e)}") return "" def main(): # 在 main() 函数开头添加 os.environ["BOA_LOG_LEVEL"] = "DEBUG" os.environ["BOA_LOG_FILE"] = "BOA_Debug.log" # configs = can.interface.detect_available_configs(interfaces="etas") # for c in configs: # print(c) User_channel=ETAS_init() # 配置ETAS接口参数 config = { 'interface': 'etas', 'channel': User_channel, # 简化通道格式 'bitrate': 500000, 'data_bitrate': 2000000, 'fd': True, 'receive_own_messages': False, 'sync': False, 'buffer_size': 1000 } try: # 初始化CAN总线 bus = EtasBus(**config) print(f"成功连接到 {config['channel']}") # 创建ASC文件(带时间戳) timestamp = time.strftime("%Y%m%d_%H%M%S") asc_filename = f"can_log_{timestamp}.asc" # 写入ASC文件头 with open(asc_filename, "w") as f: f.write(f"date {time.strftime('%b %d %H:%M:%S %Y')}\n") f.write("base hex timestamps absolute\n") f.write("no internal events logged\n") f.write("// version 1.0\n") print(f"开始记录到 {asc_filename}... (按Ctrl+C停止)") with open(asc_filename, "a") as asc_file: try: while True: try: msg = bus.recv(timeout=1.0) if msg is not None: asc_line = format_asc_line(msg) if asc_line: print(asc_line.strip()) asc_file.write(asc_line) asc_file.flush() except can.CanError as e: print(f"CAN通信错误: {str(e)}") time.sleep(0.1) except KeyboardInterrupt: print("\n收到终止信号...") break except Exception as e: print(f"记录过程中发生错误: {str(e)}") except Exception as e: print(f"初始化失败: {str(e)}") print("请检查以下配置:") print("1. ETAS硬件连接是否正常") print("2. BOA SDK是否正确安装") print("3. 通道配置是否正确") sys.exit(1) finally: if 'bus' in locals(): bus.shutdown() print("CAN连接已关闭") if __name__ == "__main__": # 加载 ETAS 依赖 if not load_etas_dlls(): print("错误: 无法加载 ETAS 库文件") sys.exit(1) try: # 尝试列出所有可用的接口 print("正在检测ETAS接口...") # 显式指定接口类型 configs = can.interface.detect_available_configs(interfaces=["etas"]) # print("检测到的配置:", configs) # 如果配置为空,尝试初始化一个默认通道以获取错误信息 # if not configs: # print("未检测到ETAS配置,尝试初始化默认通道...") # try: # bus = can.interface.Bus(channel='ETAS://USB/ES582.1:4235768/CAN:1', interface='etas') # print("成功创建ETAS总线") # # except Exception as e: # print(f"初始化ETAS总线失败: {e}") except Exception as e: print(f"接口检测失败: {e}") print("可能原因:\n" "1. ETAS 硬件未连接\n" "2. BOA SDK 未正确安装\n" "3. 缺少许可证文件\n" "4. 32/64 位架构不匹配") main() 优化一下以上代码,并编写cx_Freeze打包脚本

filetype

# -*- coding: utf-8 -*- """ Traffic Monitoring System v2.5 (Camera Version) Features: - Real-time camera object detection - YOLOv8 object detection - ByteTrack tracking - Matching colors for boxes and trajectories - Huawei Cloud IoT data reporting - Movable table - Trajectory display """ import os import sys import cv2 import numpy as np import torch import supervision as sv from ultralytics import YOLO from typing import Dict, Optional, Tuple, List import warnings import time import logging import socket import json from pathlib import Path from collections import defaultdict, deque # Import Huawei IoT SDK with encoding handling try: from iot_device_sdk_python.client.client_conf import ClientConf from iot_device_sdk_python.client.connect_auth_info import ConnectAuthInfo from iot_device_sdk_python.iot_device import IotDevice from iot_device_sdk_python.client.request.service_property import ServiceProperty except ImportError as e: logging.error(f"Huawei IoT SDK import error: {str(e)}") sys.exit(1) # Configure global logging with UTF-8 encoding logging.basicConfig( level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', handlers=[ logging.StreamHandler(), logging.FileHandler('traffic_monitor.log', encoding='utf-8', mode='a') ] ) logger = logging.getLogger("TrafficMonitor") class Config: """System configuration parameters""" MODEL_PATH = r"C:\Users\yuanb\Desktop\物联网设计大赛无pyqt同时MQTT传输\runs\detect\train_v8\weights\best.pt" CLASS_NAMES = { 0: 'Pedestrian', 1: 'Person', 2: 'Bicycle', 3: 'Car', 4: 'Van', 5: 'Truck', 6: 'Tricycle', 7: 'CoveredTricycle', 8: 'Bus', 9: 'Motorcycle' } # Color palette for different classes CLASS_COLORS = { 0: (255, 0, 0), # Red - Pedestrian 1: (0, 255, 0), # Green - Person 2: (0, 0, 255), # Blue - Bicycle 3: (255, 255, 0), # Yellow - Car 4: (255, 0, 255), # Magenta - Van 5: (0, 255, 255), # Cyan - Truck 6: (255, 128, 0), # Orange - Tricycle 7: (128, 0, 255), # Purple - CoveredTricycle 8: (0, 128, 255), # Light Blue - Bus 9: (255, 0, 128) # Pink - Motorcycle } IOT_CONFIG = { "server_uri": "117.78.5.125", "port": 1883, "device_id": "681eeebc9314d118511a5690_DEV4", "secret": "Wjy15640916538", "service_id": "鲁班猫4", "use_tls": False, "keep_alive": 300, "clean_session": False } REPORT_INTERVAL = 10 MIN_REPORT_INTERVAL = 30 LINE_COLOR = sv.Color(r=0, g=255, b=0) TEXT_COLOR = (255, 255, 255) # White text for better visibility FONT_SCALE = 0.7 TABLE_POSITION = (10, 400) # Initial position, will be updated by mouse TABLE_ROW_HEIGHT = 30 TABLE_COL_WIDTH = 180 # Increased width TABLE_COLORS = { 'header': (0, 100, 255), 'row_even': (50, 50, 50), 'row_odd': (80, 80, 80), 'text': (255, 255, 255) } TRACK_HISTORY_LENGTH = 30 # Number of trajectory points to keep class LineCounter: """Improved counting logic with bidirectional counting and classification""" def __init__(self, start_point: sv.Point, end_point: sv.Point): self.start = start_point self.end = end_point self.tracker_state = {} self.counts = { 'Inbound_Vehicle': 0, 'Outbound_Vehicle': 0, 'Inbound_Pedestrian': 0, 'Outbound_Pedestrian': 0, 'Total_Vehicles': 0, 'Total_Pedestrians': 0 } self.class_mapping = { 'Vehicle': {3, 4, 5, 6, 7, 8, 9}, 'Pedestrian': {0, 1} } self.history = [] def _get_side(self, point: sv.Point) -> bool: """Calculate which side of the line the point is on (cross product method)""" vector_line = (self.end.x - self.start.x, self.end.y - self.start.y) vector_point = (point.x - self.start.x, point.y - self.start.y) cross_product = vector_line[0] * vector_point[1] - vector_line[1] * vector_point[0] return cross_product > 0 def update(self, detections: sv.Detections): """Update counter state""" current_counts = { 'Inbound_Vehicle': 0, 'Outbound_Vehicle': 0, 'Inbound_Pedestrian': 0, 'Outbound_Pedestrian': 0, } for xyxy, _, confidence, class_id, tracker_id in detections: if tracker_id is None or confidence < 0.5: continue # Calculate center point x1, y1, x2, y2 = xyxy center = sv.Point(x=int((x1 + x2) / 2), y=int((y1 + y2) / 2)) current_side = self._get_side(center) # Initialize new object if tracker_id not in self.tracker_state: self.tracker_state[tracker_id] = current_side continue # Check if crossed the line if self.tracker_state[tracker_id] != current_side: if class_id in self.class_mapping['Vehicle']: direction = 'Inbound' if current_side else 'Outbound' current_counts[f'{direction}_Vehicle'] += 1 self.counts[f'{direction}_Vehicle'] += 1 self.counts['Total_Vehicles'] += 1 elif class_id in self.class_mapping['Pedestrian']: direction = 'Inbound' if current_side else 'Outbound' current_counts[f'{direction}_Pedestrian'] += 1 self.counts[f'{direction}_Pedestrian'] += 1 self.counts['Total_Pedestrians'] += 1 self.tracker_state[tracker_id] = current_side if any(current_counts.values()): self.history.append({ 'timestamp': time.time(), 'counts': current_counts.copy() }) def get_counts(self) -> Dict[str, int]: """Get current statistics""" return self.counts.copy() def get_recent_counts(self, seconds=10) -> Dict[str, int]: """Get counts from recent specified time period""" recent_counts = { 'Inbound_Vehicle': 0, 'Outbound_Vehicle': 0, 'Inbound_Pedestrian': 0, 'Outbound_Pedestrian': 0 } cutoff = time.time() - seconds for record in reversed(self.history): if record['timestamp'] < cutoff: break for key in recent_counts: recent_counts[key] += record['counts'].get(key, 0) return recent_counts class HuaweiIoTClient: """Huawei Cloud IoT Client""" def __init__(self, config: dict): self.config = config self.device = None self.max_retries = 5 self.base_reconnect_delay = 5 self.last_report_time = 0 self._initialize_client() def _initialize_client(self): """Initialize client connection""" try: auth_info = ConnectAuthInfo() auth_info.server_uri = self.config["server_uri"] auth_info.port = self.config["port"] auth_info.id = self.config["device_id"] auth_info.secret = self.config["secret"] self.config["use_tls"] = False client_conf = ClientConf(auth_info) client_conf.clean_session = self.config["clean_session"] client_conf.keep_alive = self.config["keep_alive"] client_conf.will_topic = f"$oc/devices/{self.config['device_id']}/sys/events/down" client_conf.will_message = json.dumps({ "type": "ABNORMAL_DISCONNECT", "timestamp": time.strftime("%Y%m%dT%H%M%SZ", time.gmtime()) }) self.device = IotDevice(client_conf) self._connect_with_retry() except Exception as e: logger.error(f"Client initialization failed: {str(e)}") raise def _check_network(self) -> bool: """Check network connectivity""" try: with socket.create_connection( (self.config["server_uri"], self.config["port"]), timeout=10 ): return True except Exception as e: logger.warning(f"Network check failed: {str(e)}") return False def _connect_with_retry(self): """Exponential backoff reconnection mechanism""" retry_count = 0 while retry_count < self.max_retries: try: if not self._check_network(): raise ConnectionError("Network unavailable") result = self.device.connect() if result == 0: logger.info(f"Connection successful (attempt {retry_count + 1}/{self.max_retries})") return True wait_time = min(self.base_reconnect_delay * (2 ** retry_count), 60) logger.warning(f"Connection failed, retrying in {wait_time} seconds... (error code: {result})") time.sleep(wait_time) retry_count += 1 except Exception as e: wait_time = min(self.base_reconnect_delay * (2 ** retry_count), 60) logger.error(f"Connection exception: {str(e)}, retrying in {wait_time} seconds") time.sleep(wait_time) retry_count += 1 logger.error("Max retries reached, giving up") return False def is_connected(self) -> bool: """Check connection status""" try: return (self.device is not None and hasattr(self.device, 'get_client') and self.device.get_client().is_connected()) except Exception as e: logger.warning(f"Connection status check exception: {str(e)}") return False def report_traffic_data(self, counts: Dict[str, int]) -> bool: """Data reporting method""" current_time = time.time() if current_time - self.last_report_time < Config.MIN_REPORT_INTERVAL: return False if not self.is_connected(): logger.warning("Connection lost, attempting to reconnect...") if not self._connect_with_retry(): return False try: service = ServiceProperty() service.service_id = self.config["service_id"] service.properties = { "vehicle_in": counts.get('Inbound_Vehicle', 0), "vehicle_out": counts.get('Outbound_Vehicle', 0), "vehicle_total": counts.get('Total_Vehicles', 0), "person_in": counts.get('Inbound_Pedestrian', 0), "person_out": counts.get('Outbound_Pedestrian', 0), "person_total": counts.get('Total_Pedestrians', 0), "timestamp": int(time.time() * 1000) } service.event_time = time.strftime("%Y%m%dT%H%M%SZ", time.gmtime()) result = self.device.get_client().report_properties([service]) if result == 0: self.last_report_time = current_time logger.info(f"Data reported successfully: {service.properties}") return True logger.error(f"Reporting failed, return code: {result}") return False except Exception as e: logger.error(f"Reporting exception: {str(e)}") return False class TrafficMonitor: """Main traffic monitoring program""" def __init__(self): # Hardware configuration self.device = 'cuda' if torch.cuda.is_available() else 'cpu' logger.info(f"Running on: {self.device.upper()}") # Model loading self.model = self._load_model() self.tracker = sv.ByteTrack() self.line_counter = None self.frame_count = 0 self.current_tracks = {} self.track_history = defaultdict(lambda: deque(maxlen=Config.TRACK_HISTORY_LENGTH)) # Visualization tools with custom color settings self.box_annotator = sv.BoundingBoxAnnotator(color_lookup=sv.ColorLookup.TRACK) self.label_annotator = sv.LabelAnnotator(color_lookup=sv.ColorLookup.TRACK) self.line_annotator = sv.LineZoneAnnotator( thickness=2, text_thickness=1, text_scale=0.5 ) # Table properties self.table_position = list(Config.TABLE_POSITION) self.is_dragging = False self.drag_offset = (0, 0) # Huawei Cloud connection try: self.iot_client = HuaweiIoTClient(Config.IOT_CONFIG) except Exception as e: logger.error(f"Huawei IoT client initialization failed: {str(e)}") self.iot_client = None def _load_model(self) -> YOLO: """Load YOLO model""" try: model = YOLO(Config.MODEL_PATH) model.fuse() logger.info(f"Model loaded successfully, detection classes: {model.names}") return model except Exception as e: logger.error(f"Model loading failed: {str(e)}") sys.exit(1) def set_counting_line(self, start: Tuple[int, int], end: Tuple[int, int]): """Set counting line coordinates""" self.line_counter = LineCounter( start_point=sv.Point(*start), end_point=sv.Point(*end) ) logger.info(f"Counting line set: {start} -> {end}") def _draw_stats(self, frame: np.ndarray, counts: Dict[str, int]) -> np.ndarray: """Draw statistics on frame""" stats = [ f"Inbound Vehicle: {counts['Inbound_Vehicle']}", f"Outbound Vehicle: {counts['Outbound_Vehicle']}", f"Total Vehicles: {counts['Total_Vehicles']}", f"Inbound Pedestrian: {counts['Inbound_Pedestrian']}", f"Outbound Pedestrian: {counts['Outbound_Pedestrian']}", f"Total Pedestrians: {counts['Total_Pedestrians']}" ] for i, text in enumerate(stats): cv2.putText( frame, text, (10, 30 + i * 30), cv2.FONT_HERSHEY_SIMPLEX, Config.FONT_SCALE, Config.TEXT_COLOR, 2 ) return frame def _draw_data_table(self, frame: np.ndarray, counts: Dict[str, int], recent_counts: Dict[str, int]) -> np.ndarray: """Draw movable data table""" x, y = self.table_position row_height = Config.TABLE_ROW_HEIGHT col_width = Config.TABLE_COL_WIDTH # Calculate table dimensions num_cols = 3 num_rows = 5 # Header + 4 data rows table_width = num_cols * col_width table_height = num_rows * row_height # Draw table background cv2.rectangle(frame, (x, y), (x + table_width, y + table_height), (40, 40, 40), -1) # Table header headers = ["Metric", "Total", "Last 10s"] for i, header in enumerate(headers): cv2.rectangle(frame, (x + i * col_width, y), (x + (i + 1) * col_width, y + row_height), Config.TABLE_COLORS['header'], -1) cv2.putText(frame, header, (x + i * col_width + 10, y + int(row_height * 0.7)), cv2.FONT_HERSHEY_SIMPLEX, 0.6, Config.TABLE_COLORS['text'], 1) # Data rows rows = [ ("Inbound Vehicle", counts['Inbound_Vehicle'], recent_counts['Inbound_Vehicle']), ("Outbound Vehicle", counts['Outbound_Vehicle'], recent_counts['Outbound_Vehicle']), ("Inbound Pedestrian", counts['Inbound_Pedestrian'], recent_counts['Inbound_Pedestrian']), ("Outbound Pedestrian", counts['Outbound_Pedestrian'], recent_counts['Outbound_Pedestrian']) ] for row_idx, (label, total, recent) in enumerate(rows): bg_color = Config.TABLE_COLORS['row_even'] if row_idx % 2 == 0 else Config.TABLE_COLORS['row_odd'] # Draw row background cv2.rectangle(frame, (x, y + (row_idx + 1) * row_height), (x + table_width, y + (row_idx + 2) * row_height), bg_color, -1) # Draw cell content cv2.putText(frame, label, (x + 10, y + (row_idx + 1) * row_height + int(row_height * 0.7)), cv2.FONT_HERSHEY_SIMPLEX, 0.5, Config.TABLE_COLORS['text'], 1) cv2.putText(frame, str(total), (x + col_width + 10, y + (row_idx + 1) * row_height + int(row_height * 0.7)), cv2.FONT_HERSHEY_SIMPLEX, 0.5, Config.TABLE_COLORS['text'], 1) cv2.putText(frame, str(recent), (x + 2 * col_width + 10, y + (row_idx + 1) * row_height + int(row_height * 0.7)), cv2.FONT_HERSHEY_SIMPLEX, 0.5, Config.TABLE_COLORS['text'], 1) # Draw drag handle (small rectangle at top-right) handle_size = 20 cv2.rectangle(frame, (x + table_width - handle_size, y), (x + table_width, y + handle_size), (0, 255, 255), -1) return frame def _handle_table_drag(self, event, x, y, flags, param): """Mouse callback for table dragging""" table_x, table_y = self.table_position table_width = 3 * Config.TABLE_COL_WIDTH table_height = 5 * Config.TABLE_ROW_HEIGHT handle_size = 20 # Check if mouse is in drag handle area handle_rect = (table_x + table_width - handle_size, table_y, table_x + table_width, table_y + handle_size) if event == cv2.EVENT_LBUTTONDOWN: if (handle_rect[0] <= x <= handle_rect[2] and handle_rect[1] <= y <= handle_rect[3]): self.is_dragging = True self.drag_offset = (x - table_x, y - table_y) elif event == cv2.EVENT_LBUTTONUP: self.is_dragging = False elif event == cv2.EVENT_MOUSEMOVE: if self.is_dragging: # Update table position with offset new_x = x - self.drag_offset[0] new_y = y - self.drag_offset[1] # Keep table within frame bounds frame_height, frame_width = param.shape[:2] new_x = max(0, min(new_x, frame_width - table_width)) new_y = max(0, min(new_y, frame_height - table_height)) self.table_position = [new_x, new_y] def _draw_tracks(self, frame: np.ndarray, detections: sv.Detections) -> np.ndarray: """Draw object trajectories with matching colors""" for xyxy, _, confidence, class_id, tracker_id in detections: if tracker_id is None or confidence < 0.5: continue # Get color based on class color = Config.CLASS_COLORS.get(class_id, (255, 255, 255)) # Default to white if class not found # Calculate center point x1, y1, x2, y2 = xyxy center = (int((x1 + x2) / 2), int((y1 + y2) / 2)) # Update track history self.track_history[tracker_id].append(center) # Draw trajectory line points = list(self.track_history[tracker_id]) for i in range(1, len(points)): cv2.line(frame, points[i - 1], points[i], color, thickness=2) # Draw bounding box with same color cv2.rectangle(frame, (int(x1), int(y1)), (int(x2), int(y2)), color, 2) # Display ID and class label = f"{Config.CLASS_NAMES.get(class_id, 'Unknown')} ID:{tracker_id}" cv2.putText(frame, label, (int(x1), int(y1) - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2) return frame def _update_track_info(self, detections: sv.Detections): """Update tracking object information""" current_tracks = {} for xyxy, _, confidence, class_id, tracker_id in detections: if tracker_id is not None: current_tracks[tracker_id] = (class_id, confidence) self.current_tracks = current_tracks def process_frame(self, frame: np.ndarray) -> np.ndarray: """Process single frame""" try: # Object detection results = self.model(frame, imgsz=640, verbose=False)[0] detections = sv.Detections.from_ultralytics(results) # Object tracking with ByteTrack detections = self.tracker.update_with_detections(detections) self._update_track_info(detections) # Initialize count results counts = { 'Inbound_Vehicle': 0, 'Outbound_Vehicle': 0, 'Inbound_Pedestrian': 0, 'Outbound_Pedestrian': 0, 'Total_Vehicles': 0, 'Total_Pedestrians': 0 } recent_counts = { 'Inbound_Vehicle': 0, 'Outbound_Vehicle': 0, 'Inbound_Pedestrian': 0, 'Outbound_Pedestrian': 0 } if self.line_counter: # Update counter self.line_counter.update(detections) counts = self.line_counter.get_counts() recent_counts = self.line_counter.get_recent_counts(seconds=10) # Draw counting line cv2.line( frame, (self.line_counter.start.x, self.line_counter.start.y), (self.line_counter.end.x, self.line_counter.end.y), Config.LINE_COLOR.as_bgr(), 2 ) # Periodic data reporting if self.frame_count % Config.REPORT_INTERVAL == 0 and self.iot_client: self.iot_client.report_traffic_data(counts) # Draw object trajectories and boxes (now handled together in _draw_tracks) frame = self._draw_tracks(frame, detections) # Display statistics and table frame = self._draw_stats(frame, counts) frame = self._draw_data_table(frame, counts, recent_counts) # Set mouse callback for table dragging cv2.setMouseCallback("Traffic Monitoring", self._handle_table_drag, frame) self.frame_count += 1 return frame except Exception as e: logger.error(f"Frame processing exception: {str(e)}") return frame def interactive_line_setup(frame: np.ndarray) -> Optional[Tuple[Tuple[int, int], Tuple[int, int]]]: """Interactive counting line setup""" points = [] instructions = [ "1. Click to set line start point", "2. Click to set line end point", "3. Press ESC to confirm" ] def mouse_callback(event, x, y, flags, param): if event == cv2.EVENT_LBUTTONDOWN: points.append((x, y)) cv2.circle(frame, (x, y), 5, (0, 0, 255), -1) if len(points) > 1: cv2.line(frame, points[0], points[1], (0, 255, 0), 2) cv2.namedWindow("Set Counting Line") cv2.setMouseCallback("Set Counting Line", mouse_callback) for i, text in enumerate(instructions): cv2.putText(frame, text, (10, 30 + i * 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 255), 2) while True: cv2.imshow("Set Counting Line", frame) key = cv2.waitKey(1) if key == 27 or len(points) >= 2: # ESC key or two points selected break cv2.destroyAllWindows() return (points[0], points[1]) if len(points) >= 2 else None def main(): """Main program entry""" try: # Open default camera (index 0) cap = cv2.VideoCapture(0) if not cap.isOpened(): logger.error("Unable to open camera") return # Set camera resolution (optional, adjust as needed) cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280) cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720) # Initialize monitor monitor = TrafficMonitor() # Read a few frames to allow camera to adjust for _ in range(5): ret, frame = cap.read() if not ret: logger.error("Failed to capture initial frames from camera") return # Set counting line using a frame from the camera line_points = interactive_line_setup(frame.copy()) if line_points: monitor.set_counting_line(*line_points) else: logger.info("No counting line set, will only perform object detection") # Main loop while cap.isOpened(): ret, frame = cap.read() if not ret: logger.warning("Camera frame read failed") break # Process frame processed_frame = monitor.process_frame(frame) # Display results cv2.imshow("Traffic Monitoring", processed_frame) key = cv2.waitKey(1) if key == ord('q') or key == 27: # 'q' or ESC to quit logger.info("Program terminated by user") break elif key == ord('r'): # 'r' to reset counting line line_points = interactive_line_setup(frame.copy()) if line_points: monitor.set_counting_line(*line_points) except KeyboardInterrupt: logger.info("Program interrupted by user") except Exception as e: logger.critical(f"Program exception: {str(e)}", exc_info=True) finally: # Release resources if 'cap' in locals() and cap.isOpened(): cap.release() cv2.destroyAllWindows() logger.info("Program exited") if __name__ == "__main__": # Check required dependencies try: import iot_device_sdk_python except ImportError: logger.error("Huawei IoT SDK not found, please install: pip install iot_device_sdk_python") sys.exit(1) # Ignore warning messages warnings.filterwarnings("ignore", category=UserWarning) main()为我修改这个代码改为画两条线,第一个点和第二个点是第一条线,第三个点和第四个点是第二条线,同时计算第一个点的正向行走人数-第二个点正向行走的绝对值,第二个点-第一个点正向行走的绝对值,第一条线正、逆向行走人数,总人数。第二条线正、逆向行走人数,总人数,尽量减少源代码的修改,MQTT协议传送部分不要过大改动

filetype

wjs@wjs-desktop:~/Drone_Slam$ ros2 launch fishbot_grapher test_grapher_3.launch.py [INFO] [launch]: All log files can be found below /home/wjs/.ros/log/2025-07-27-22-33-04-888587-wjs-desktop-3334 [INFO] [launch]: Default logging verbosity is set to INFO pkg_share =/home/wjs/Drone_Slam/install/fishbot_grapher/share/fishbot_grapher<== model_path =/home/wjs/Drone_Slam/install/fishbot_grapher/share/fishbot_grapher/urdf/fishbot_base.urdf<== [INFO] [sllidar_node-1]: process started with pid [3335] [INFO] [wit_ros2_imu-2]: process started with pid [3337] [INFO] [test01-3]: process started with pid [3339] [INFO] [robot_state_publisher-4]: process started with pid [3341] [INFO] [cartographer_node-5]: process started with pid [3343] [INFO] [cartographer_occupancy_grid_node-6]: process started with pid [3346] [robot_state_publisher-4] [WARN] [1753626785.292549553] [robot_state_publisher]: No robot_description parameter, but command-line argument available. Assuming argument is name of URDF file. This backwards compatibility fallback will be removed in the future. [robot_state_publisher-4] [INFO] [1753626785.326000258] [robot_state_publisher]: got segment base_link [robot_state_publisher-4] [INFO] [1753626785.338680611] [robot_state_publisher]: got segment imu_link [robot_state_publisher-4] [INFO] [1753626785.342302312] [robot_state_publisher]: got segment laser_link [sllidar_node-1] [INFO] [1753626785.398643897] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0 [sllidar_node-1] [INFO] [1753626785.454849740] [sllidar_node]: SLLidar S/N: 7885EC95C1EA9ED1B2E49CF4FB594571 [sllidar_node-1] [INFO] [1753626785.455013574] [sllidar_node]: Firmware Ver: 1.01 [sllidar_node-1] [INFO] [1753626785.455063630] [sllidar_node]: Hardware Rev: 18 [sllidar_node-1] [INFO] [1753626785.507953718] [sllidar_node]: SLLidar health status : 0 [sllidar_node-1] [INFO] [1753626785.508177608] [sllidar_node]: SLLidar health status : OK. [cartographer_node-5] [INFO] [1753626785.633687427] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/home/wjs/Drone_Slam/install/fishbot_grapher/share/fishbot_grapher/config/test02.lua' for 'test02.lua'. [cartographer_node-5] [INFO] [1753626785.635179989] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'. [cartographer_node-5] [INFO] [1753626785.636018011] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'. [cartographer_node-5] [INFO] [1753626785.636677940] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/pose_graph.lua' for 'pose_graph.lua'. [cartographer_node-5] [INFO] [1753626785.637022719] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/pose_graph.lua' for 'pose_graph.lua'. [cartographer_node-5] [INFO] [1753626785.637744815] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder.lua' for 'trajectory_builder.lua'. [cartographer_node-5] [INFO] [1753626785.637998224] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder.lua' for 'trajectory_builder.lua'. [cartographer_node-5] [INFO] [1753626785.638368374] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_2d.lua' for 'trajectory_builder_2d.lua'. [cartographer_node-5] [INFO] [1753626785.638664079] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_2d.lua' for 'trajectory_builder_2d.lua'. [cartographer_node-5] [INFO] [1753626785.639450397] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_3d.lua' for 'trajectory_builder_3d.lua'. [cartographer_node-5] [INFO] [1753626785.639716324] [cartographer logger]: I0727 22:33:05.000000 3343 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_3d.lua' for 'trajectory_builder_3d.lua'. [cartographer_node-5] [INFO] [1753626785.715124123] [cartographer logger]: I0727 22:33:05.000000 3343 map_builder_bridge.cpp:136] Added trajectory with ID '0'. [sllidar_node-1] [INFO] [1753626785.720324961] [sllidar_node]: current scan mode: DenseBoost, sample rate: 32 Khz, max_distance: 18.0 m, scan frequency:10.0 Hz, [test01-3] Traceback (most recent call last): [test01-3] File "/home/wjs/.local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open [test01-3] self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) [test01-3] FileNotFoundError: [Errno 2] No such file or directory: '/dev/mcu_usb' [test01-3] [test01-3] During handling of the above exception, another exception occurred: [test01-3] [test01-3] Traceback (most recent call last): [test01-3] File "/home/wjs/Drone_Slam/install/fishbot_grapher/lib/fishbot_grapher/test01", line 33, in <module> [test01-3] sys.exit(load_entry_point('fishbot-grapher==0.0.0', 'console_scripts', 'test01')()) [test01-3] File "/home/wjs/Drone_Slam/build/fishbot_grapher/fishbot_grapher/test01.py", line 101, in main [test01-3] tf_subscriber = TFSubscriber() [test01-3] File "/home/wjs/Drone_Slam/build/fishbot_grapher/fishbot_grapher/test01.py", line 20, in __init__ [test01-3] self.ser = serial.Serial("/dev/mcu_usb", 115200) [test01-3] File "/home/wjs/.local/lib/python3.10/site-packages/serial/serialutil.py", line 244, in __init__ [test01-3] self.open() [test01-3] File "/home/wjs/.local/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open [test01-3] raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) [test01-3] serial.serialutil.SerialException: [Errno 2] could not open port /dev/mcu_usb: [Errno 2] No such file or directory: '/dev/mcu_usb' [wit_ros2_imu-2] [INFO] [1753626787.245410580] [imu]: Serial port opening failure [ERROR] [test01-3]: process has died [pid 3339, exit code 1, cmd '/home/wjs/Drone_Slam/install/fishbot_grapher/lib/fishbot_grapher/test01 --ros-args'].

filetype

wjs@wjs-desktop:~/Drone_Slam$ ros2 launch fishbot_grapher test_grapher_3.launch.py [INFO] [launch]: All log files can be found below /home/wjs/.ros/log/2025-07-27-21-56-35-948343-wjs-desktop-3929 [INFO] [launch]: Default logging verbosity is set to INFO pkg_share =/home/wjs/Drone_Slam/install/fishbot_grapher/share/fishbot_grapher<== model_path =/home/wjs/Drone_Slam/install/fishbot_grapher/share/fishbot_grapher/urdf/fishbot_base.urdf<== [INFO] [sllidar_node-1]: process started with pid [3930] [INFO] [wit_ros2_imu-2]: process started with pid [3932] [INFO] [test01-3]: process started with pid [3934] [INFO] [robot_state_publisher-4]: process started with pid [3936] [INFO] [cartographer_node-5]: process started with pid [3939] [INFO] [cartographer_occupancy_grid_node-6]: process started with pid [3948] [sllidar_node-1] [INFO] [1753624596.293528113] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0 [sllidar_node-1] [INFO] [1753624596.346378641] [sllidar_node]: SLLidar S/N: 7885EC95C1EA9ED1B2E49CF4FB594571 [sllidar_node-1] [INFO] [1753624596.346608009] [sllidar_node]: Firmware Ver: 1.01 [sllidar_node-1] [INFO] [1753624596.346674323] [sllidar_node]: Hardware Rev: 18 [sllidar_node-1] [INFO] [1753624596.399133596] [sllidar_node]: SLLidar health status : 0 [sllidar_node-1] [INFO] [1753624596.399320242] [sllidar_node]: SLLidar health status : OK. [robot_state_publisher-4] [WARN] [1753624596.504253936] [robot_state_publisher]: No robot_description parameter, but command-line argument available. Assuming argument is name of URDF file. This backwards compatibility fallback will be removed in the future. [robot_state_publisher-4] [INFO] [1753624596.556528415] [robot_state_publisher]: got segment base_link [robot_state_publisher-4] [INFO] [1753624596.560108244] [robot_state_publisher]: got segment imu_link [robot_state_publisher-4] [INFO] [1753624596.564348027] [robot_state_publisher]: got segment laser_link [sllidar_node-1] [INFO] [1753624596.609412665] [sllidar_node]: current scan mode: DenseBoost, sample rate: 32 Khz, max_distance: 18.0 m, scan frequency:10.0 Hz, [cartographer_node-5] [INFO] [1753624596.693458234] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/home/wjs/Drone_Slam/install/fishbot_grapher/share/fishbot_grapher/config/test02.lua' for 'test02.lua'. [cartographer_node-5] [INFO] [1753624596.697710332] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'. [cartographer_node-5] [INFO] [1753624596.698250159] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'. [cartographer_node-5] [INFO] [1753624596.698714117] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/pose_graph.lua' for 'pose_graph.lua'. [cartographer_node-5] [INFO] [1753624596.698993447] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/pose_graph.lua' for 'pose_graph.lua'. [cartographer_node-5] [INFO] [1753624596.699914917] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder.lua' for 'trajectory_builder.lua'. [cartographer_node-5] [INFO] [1753624596.700183470] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder.lua' for 'trajectory_builder.lua'. [cartographer_node-5] [INFO] [1753624596.700551632] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_2d.lua' for 'trajectory_builder_2d.lua'. [cartographer_node-5] [INFO] [1753624596.700780704] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_2d.lua' for 'trajectory_builder_2d.lua'. [cartographer_node-5] [INFO] [1753624596.702823920] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_3d.lua' for 'trajectory_builder_3d.lua'. [cartographer_node-5] [INFO] [1753624596.703229045] [cartographer logger]: I0727 21:56:36.000000 3939 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/trajectory_builder_3d.lua' for 'trajectory_builder_3d.lua'. [cartographer_node-5] [INFO] [1753624596.795457981] [cartographer logger]: I0727 21:56:36.000000 3939 map_builder_bridge.cpp:136] Added trajectory with ID '0'. [test01-3] Traceback (most recent call last): [test01-3] File "/home/wjs/.local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open [test01-3] self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) [test01-3] FileNotFoundError: [Errno 2] No such file or directory: '/dev/mcu_usb' [test01-3] [test01-3] During handling of the above exception, another exception occurred: [test01-3] [test01-3] Traceback (most recent call last): [test01-3] File "/home/wjs/Drone_Slam/install/fishbot_grapher/lib/fishbot_grapher/test01", line 33, in <module> [test01-3] sys.exit(load_entry_point('fishbot-grapher==0.0.0', 'console_scripts', 'test01')()) [test01-3] File "/home/wjs/Drone_Slam/build/fishbot_grapher/fishbot_grapher/test01.py", line 101, in main [test01-3] tf_subscriber = TFSubscriber() [test01-3] File "/home/wjs/Drone_Slam/build/fishbot_grapher/fishbot_grapher/test01.py", line 20, in __init__ [test01-3] self.ser = serial.Serial("/dev/mcu_usb", 115200) [test01-3] File "/home/wjs/.local/lib/python3.10/site-packages/serial/serialutil.py", line 244, in __init__ [test01-3] self.open() [test01-3] File "/home/wjs/.local/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open [test01-3] raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) [test01-3] serial.serialutil.SerialException: [Errno 2] could not open port /dev/mcu_usb: [Errno 2] No such file or directory: '/dev/mcu_usb' [wit_ros2_imu-2] [INFO] [1753624598.299331361] [imu]: Serial port opening failure [ERROR] [test01-3]: process has died [pid 3934, exit code 1, cmd '/home/wjs/Drone_Slam/install/fishbot_grapher/lib/fishbot_grapher/test01 --ros-args']. ?

资源评论
用户头像
开眼旅行精选
2025.07.21
支持在JavaScript环境中轻松集成,有助于日志管理。
用户头像
养生的控制人
2025.06.02
遵循开源协议,让开发者在授权范围内自由使用和扩展。
用户头像
赵伊辰
2025.05.22
源码维护活跃,社区贡献者众多,值得信赖。🍚
用户头像
光与火花
2025.04.06
方便易用的bus-log服务SDK,对日志记录有高需求的开发者会喜欢。👍
用户头像
挽挽深铃
2025.03.20
使用方法简单,通过简单的代码就能实现日志记录功能。
用户头像
型爷
2025.02.28
文档清晰,示例详尽,有助于快速上手bus-log-sdk-js。
刘怒威
  • 粉丝: 35
上传资源 快速赚钱