OM_TIME_SETTING

本文介绍了如何在CentOS系统中进行时间同步和配置。主要包括手动设置系统日期和时间、配置硬件时钟、选择时区、安装并使用ntpdate命令进行时间同步以及定时任务的设置。
#ENV:CentOS1.date date --set "07/07/06 10:19"2.clock/hwclock hwclock/clock --set --date="07/07/06 10:19"3.Soft and Hard time hwclock --systohc4.tzselect(date -R) vi /etc/sysconfig/clock ZONE=Asia/Chongqing(查/usr/share/zoneinfo下面的文件) UTC=false ARC=false rm /etc/localtime cp -sf /usr/share/zoneinfo/Asia/Chongqing /etc/localtime 5.ntpdate yum -y install ntpdate ntpdate asia.pool.ntp.org ntpdate pool.ntp.org /如果解析域名失败,那么请检查下/etc/resolv.conf加入Cron crontab -e 1 4 * * * * /usr/sbin/ntpdate asia.pool.ntp.org
* This program demonstrates the effect of using the * generic parameter 'recompute_score' of the operator * find_shape_model_3d. * * By setting 'recompute_score' to 'true', the score * is recomputed after the pose refinement, which * may lead to slightly different (but more consistent) * score values at the cost of a slightly larger * execution time. * * For this, a 3D shape model of a cube is searched in * a sequence of artificially created images by using * find_shape_model_3d. The images are created by * changing the longitude of the camera in the object * centered spherical coordinate system. * * The matching is performed twice. In the first run, * 'recompute_score' is set to 'false', while in the * second run, 'recompute_score' is set to 'true'. The * score is stored for each of the two runs over all * images. Finally, the score values are plotted with * respect to the camera longitude. * * Note that the variation of the score values is * significantly higher when setting 'recompute_score' * to 'false'. Also note that in real images typically * the variation of the score is lower. * gen_cam_par_area_scan_division (0.01, 0, 7e-6, 7e-6, 320, 240, 640, 480, CamParam) get_cam_par_data (CamParam, 'image_width', Width) get_cam_par_data (CamParam, 'image_height', Height) dev_close_window () dev_open_window (0, 0, Width, Height, 'black', WindowHandle) dev_set_part (0, 0, Height - 1, Width - 1) set_display_font (WindowHandle, 14, 'mono', 'true', 'false') dev_update_off () * * Generate a cube X := [-1,-1,1,1,-1,-1,1,1] Y := [1,-1,-1,1,1,-1,-1,1] Z := [-1,-1,-1,-1,1,1,1,1] Polygons := [4,0,1,2,3,4,4,5,6,7,4,0,1,5,4,4,3,2,6,7,4,0,3,7,4,4,1,2,6,5] gen_object_model_3d_from_points (X, Y, Z, ObjectModel3DID) set_object_model_3d_attrib_mod (ObjectModel3DID, 'polygons', [], Polygons) * * Prepare the 3D object model for matching prepare_object_model_3d (ObjectModel3DID, 'shape_based_matching_3d', 'true', [], []) * * Display the 3D object model disp_object_model_3d_safe (WindowHandle, ObjectModel3DID, CamParam, [0,0,11,30,40,0,0], [], []) disp_message (WindowHandle, '3D Object Model of a Cube', 'window', 12, 12, 'black', 'true') disp_continue_message (WindowHandle, 'black', 'true') stop () * * * Generate the 3D shape model create_cube_shape_model_3d (WindowHandle, ObjectModel3DID, CamParam, ShapeModel3DID) clear_object_model_3d (ObjectModel3DID) * Scores1 := [] Scores2 := [] Times1 := [] Times2 := [] Longitudes := [] Latitude := rad(45) Distance := 11.5 dev_set_color ('green') dev_set_line_width (2) for Longitude := rad(30) to rad(60) by rad(0.25) convert_point_3d_spher_to_cart (Longitude, Latitude, Distance, '-y', '-z', CamX, CamY, CamZ) create_cam_pose_look_at_point (CamX, CamY, CamZ, 0, 0, 0, '-y', 0, CamPose) * Prevent flickering set_system ('flush_graphic', 'false') * * Generate an artificial image of the cube project_cube_image (Image, CamPose, CamParam, X, Y, Z, Polygons) * * Find the cube by using 3D shape-based matching * ('recompute_score' = 'false') count_seconds (Seconds1) find_shape_model_3d (Image, ShapeModel3DID, 0.7, 0.9, 0, [], [], Pose1, CovPose1, Score1) count_seconds (Seconds2) Time1 := (Seconds2 - Seconds1) * 1000.0 * Find the cube by using 3D shape-based matching * ('recompute_score' = 'true') count_seconds (Seconds1) find_shape_model_3d (Image, ShapeModel3DID, 0.7, 0.9, 0, 'recompute_score', 'true', Pose2, CovPose2, Score2) count_seconds (Seconds2) Time2 := (Seconds2 - Seconds1) * 1000.0 * * Display the matching result dev_display (Image) if (|Score1| == 1 and |Score2| == 1) * Display the match project_shape_model_3d (ModelContours, ShapeModel3DID, CamParam, Pose1, 'true', rad(30)) dev_display (ModelContours) * Display the matching time and score disp_message (WindowHandle, 'Matching at Longitude: ' + deg(Longitude)$'3.1f' + ' deg (from 30 to 60 deg)', 'window', 12, 12, 'white', 'false') gen_matching_result_message (Time1, Time2, Score1, Score2, Message) disp_message (WindowHandle, Message, 'window', 420, 12, ['white','yellow','green'], 'false') * Remember the score values Longitudes := [Longitudes,deg(Longitude)] Scores1 := [Scores1,Score1] Scores2 := [Scores2,Score2] Times1 := [Times1,Time1] Times2 := [Times2,Time2] endif * Prevent flickering set_system ('flush_graphic', 'true') * Show what we painted in the loop by drawing a invisible line disp_line (WindowHandle, -1, -1, -1, -1) endfor * * Display the score values dev_clear_window () Title := ['\'recompute_score\'=\'false\'','\'recompute_score\'=\'true\''] Colors := ['yellow','green'] plot_tuple (WindowHandle, Longitudes, [Scores1,Scores2], 'Longitude [deg]', 'Matching score', Colors, ['ticks_x','ticks_y','end_y'], [6,.01,1]) disp_message (WindowHandle, Title, 'window', 12, 350, Colors, 'false') disp_continue_message (WindowHandle, 'black', 'true') stop () dev_clear_window () plot_tuple (WindowHandle, Longitudes, [Times1,Times2], 'Longitude [deg]', 'Matching time [ms]', Colors, 'ticks_x', 6) disp_message (WindowHandle, Title, 'window', 12, 350, Colors, 'false') * * Clear the 3D shape model clear_shape_model_3d (ShapeModel3DID)
06-25
### 关于AUTOSAR Adaptive Platform中的OM_Collector 在 AUTOSAR 自适应平台 (AP) 中,OM_Collector 是 Operation Management Collector 的缩写。它是一个重要的组件,用于收集操作管理数据并将其传递给其他服务或模块以便进一步处理。这种机制通常涉及监控运行时状态、性能指标或其他动态行为的数据采集。 #### OM_Collector的功能概述 OM_Collector 主要负责从不同的来源获取操作相关的数据,并通过标准化接口将这些数据提供给上层应用或管理系统。其功能可以概括如下[^1]: - 数据聚合:从多个源(如传感器、执行器或其他软件组件)中提取信息。 - 数据转换:将原始数据转化为适合传输的形式。 - 接口适配:支持与其他服务交互的标准协议。 #### 实现方法探讨 为了实现 OM_Collector,在开发过程中可能需要用到一些跨平台库来辅助完成资源管理和系统监视的任务。例如 `psutil` 提供了一种简单有效的方式来访问底层硬件统计信息以及进程活动详情,这或许能够为设计高效能的 collector 奠定基础: ```python import psutil def collect_system_metrics(): cpu_usage = psutil.cpu_percent(interval=1) memory_info = psutil.virtual_memory() metrics = { 'cpu': cpu_usage, 'memory_total': memory_info.total, 'memory_used': memory_info.used, 'memory_free': memory_info.free } return metrics ``` 上述代码片段展示了如何利用 `psutil` 获取基本的 CPU 和内存使用情况作为示范。然而需要注意的是实际项目里还需要考虑更多因素比如实时性要求、错误恢复策略等。 此外,由于 AUTOSAR AP 架构强调灵活性和服务导向型设计理念,因此建议遵循 SOA(Service-Oriented Architecture)原则构建整个解决方案框架。这意味着不仅要定义清晰的服务边界还要确保各个组成部分之间具备良好的解耦特性从而便于维护升级。 #### 文档与参考资料寻找途径 对于具体到 AUTOSAR AP 上关于 OM_Collector 的官方文档或者权威指南,则推荐查阅由 AUTOSAR 组织发布的最新版本规范文件集。同时也可以关注行业内知名厂商的技术博客文章或者是参与相关论坛讨论区交流学习经验心得。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值