ROS智能仿真车模开发:Open4WD与XECUPro控制器升级

需积分: 0 0 下载量 86 浏览量 更新于2024-09-07 1 收藏 1.58MB PDF 举报
"Open4WD_Presentation_1009.pdf 涉及ROS智能仿真车模开发平台的软硬件技术实现,包括车型更新、控制器升级到XECUPro、有感控制的优势、XECUPro的转速反馈精度对比、接口定义以及首个基于激光雷达和IMU的自动驾驶Demo展示。" 在ROS智能仿真车模开发平台中,Open4WD项目经历了车型的更新,以适应不断发展的需求。原车型由于厂家不再生产而被淘汰,新车型带来了多项改进。首先,新车型的机构设计更加科学,提供了详细的传动比数据,使得车辆性能得以优化。其次,所有配件都配有固定编号,便于在线购买和维修,提高了便捷性。此外,新车型的底盘离地间隙增大,提升了车辆的通过性和负重能力,同时螺孔位置设计更合理,有利于构建稳定的平台支架。 控制器的升级是另一个关键点,从无感到有感控制的转变,引入了XECUPro。有感控制显著提升了车辆的操控性能,尤其是在启动和低速时,控制更为平滑,正反转切换流畅。有感电机还能提供更精确的转速反馈,结合ROS软件,可以实现高精度的里程计,省去了额外安装测速传感器的步骤。此外,XECUPro还提高了舵机驱动电压,增强了舵机的响应速度,其安装孔位按照车型设计,确保了固定可靠性。与旧版XECU相比,XECUPro在转速数据采集方面更为精确,利用霍尔传感器减少了静止时的误差。 XECUPro的接口设计丰富多样,包括电机的A、B、C相驱动,电池正负极连接,电机霍尔输入,遥控器接口,舵机驱动,ROS串口,手动模式指示灯等,为不同功能的实现提供了基础。 在实际应用上,开发团队已经成功实现了首个基于激光雷达和IMU的SLAM自动驾驶Demo。这个系统能够处理室内和室外的避障任务,展示了强大的自主行驶能力。硬件架构包括两块电池供电,Jetson Nano作为核心处理器,X-IMU用于姿态感知,Lidar负责环境扫描,以及通过WIFI和ETH进行通信。XECUPro作为有感电机控制器,为整个系统提供了稳定且灵敏的动力控制。 Open4WD项目通过车型升级和控制器优化,实现了更高效、更精确的ROS智能仿真车模。随着XECUPro的引入和自动驾驶Demo的开发,该平台的潜力和应用场景得到了显著扩展。

使用QTimer对象代替QBasicTimer对象,修改程序class MyWindow(QWidget): def init(self): super().init() self.thread_list = [] self.color_photo_dir = os.path.join(os.getcwd(), "color_photos") self.depth_photo_dir = os.path.join(os.getcwd(), "depth_photos") self.image_thread = None self.saved_color_photos = 0 # 定义 saved_color_photos 属性 self.saved_depth_photos = 0 # 定义 saved_depth_photos 属性 self.init_ui() def init_ui(self): self.ui = uic.loadUi("C:/Users/wyt/Desktop/D405界面/intelrealsense1.ui") self.open_btn = self.ui.pushButton self.color_image_chose_btn = self.ui.pushButton_3 self.depth_image_chose_btn = self.ui.pushButton_4 self.open_btn.clicked.connect(self.open) self.color_image_chose_btn.clicked.connect(lambda: self.chose_dir(self.ui.lineEdit, "color")) self.depth_image_chose_btn.clicked.connect(lambda: self.chose_dir(self.ui.lineEdit_2, "depth")) def open(self): self.profile = self.pipeline.start(self.config) self.is_camera_opened = True self.label.setText('相机已打开') self.label.setStyleSheet('color:green') self.open_btn.setEnabled(False) self.close_btn.setEnabled(True) self.image_thread = ImageThread(self.pipeline, self.color_label, self.depth_label, self.interval, self.color_photo_dir, self.depth_photo_dir, self._dgl) self.image_thread.saved_color_photos_signal.connect(self.update_saved_color_photos_label) self.image_thread.saved_depth_photos_signal.connect(self.update_saved_depth_photos_label) self.image_thread.start() def chose_dir(self, line_edit, button_type): my_thread = MyThread(line_edit, button_type) my_thread.finished_signal.connect(self.update_line_edit) self.thread_list.append(my_thread) my_thread.start()

2023-05-26 上传

优化这个方法:private View getPopupWindowContentView(LayoutElementParcelable file) { // 一个自定义的布局,作为显示的内容 int layoutId = R.layout.popup_open_file_layout; // 布局ID View contentView = LayoutInflater.from(this).inflate(layoutId, null); // 点击重命名 contentView.findViewById(R.id.open_file_menu_rename).setOnClickListener(v -> { if (mPopupWindow != null) { mPopupWindow.dismiss(); } XLog.tag(TAG).i("popup click:rename"); checkDir(file, 0); }); // 点击删除 contentView.findViewById(R.id.open_file_menu_delete).setOnClickListener(v -> { if (mPopupWindow != null) { mPopupWindow.dismiss(); } XLog.tag(TAG).i("popup click:delete"); checkDir(file, 1); }); // 设置收藏按钮文字 收藏||取消收藏 String collectPath = ""; if (mCollects != null) { collectPath = mCollects.get(file.desc); } if (TextUtils.isEmpty(collectPath)) { collectPath = ""; } // 点击 收藏||取消收藏 TextView open_file_menu_collect = contentView.findViewById(R.id.open_file_menu_collect); String finalCollectPath = collectPath; open_file_menu_collect.setOnClickListener(v -> { if (mPopupWindow != null) { mPopupWindow.dismiss(); } if (finalCollectPath.equals(file.desc)) { XLog.tag(TAG).i("popup click:unCollect"); } else { XLog.tag(TAG).i("popup click:collect"); saveFileBrowseRecord(file); } }); if (collectPath.equals(file.desc)) { open_file_menu_collect.setText(getString(R.string.file_browser_un_collect)); } else { open_file_menu_collect.setText(getString(R.string.file_browser_collect)); } if (mTransferType == U_FTP_TO_FAB_FTP || mTransferType == FTP_U) { open_file_menu_collect.setVisibility(View.VISIBLE); } else { open_file_menu_collect.setVisibility(View.GONE); } return contentView; }

2023-06-08 上传