当前位置: 首页 > news >正文

ros2 control 2

controller

创建一个pkg,在pkg中新建一个controller.yaml。

点击查看代码
controller_manager:ros__parameters:update_rate: 50joint_state_broadcaster:type: joint_state_broadcaster/JointStateBroadcasterdiff_drive_controller:type: diff_drive_controller/DiffDriveControllerdiff_drive_controller:ros__parameters:left_wheel_names: ["base_left_wheel_joint"]right_wheel_names: ["base_right_wheel_joint"]wheel_separation: 0.45wheel_radius: 0.1odom_frame_id: "odom"base_frame_id: "base_footprint"pose_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01]twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01]enable_odom_tf: truepublish_rate: 50.0linear.x.max_velocity: 1.0linear.x.min_velocity: -1.0angular.z.max_velocity: 1.0angular.z.min_velocity: -1.0
update_rate为数据频率。 joint_state_broadcaster从硬件资源获取数据然后发布。写法仿照https://github.com/ros-controls/ros2_controllers/tree/humble/joint_state_broadcaster文档。起了两个名字分别是joint_state_broadcaster和diff_drive_controller,名字可以随意起,它们的type为文档中的class的那么属性。接下来这两个会成为节点,为这两个节点添加参数。diff_drive_controller的params参考https://github.com/ros-controls/ros2_controllers/blob/humble/diff_drive_controller/src/diff_drive_controller_parameter.yaml,将左右轮的名字添加进去。wheel_separation代表两个轮子的距离。diff_drive_controller接受速度命令,将其转化为两个轮子各自的速度,并且接受速度用来闭环控制。添加odom_frame_id,base_frame_id,base_frame_id为底盘的名字。params里的publish_rate不会超过controller_manager中的。增加速度限制范围。
http://www.gsyq.cn/news/11953.html

相关文章:

  • 新学期每日总结(第4天)
  • VSCode 升级 C++支持版本
  • 在electron-vite使用ShadCN
  • 9-23
  • Ubuntu Uninstall App
  • day11 课程(学员管理系统案例)
  • US$128 OBD II Adapter Plus OBD Cable Works with CKM100 and DIGIMASTER III for Key Programming
  • jmeter函数
  • Windows 10 C盘占用释放 - tfel
  • CherryStudio+cpolar:让智能工作流突破组织边界 - 详解
  • 科学计算方法--矩阵分析记录
  • 分布式链路追踪-SkyWalking - 指南
  • Say 题选记(9.21 - 9.27)
  • 9.25总结
  • Day08-C:\Users\Lenovo\Desktop\note\code\JavaSE\Basic\src\com\David\array-ArrayDemo01~07
  • ansible注意的和错误代码分析
  • 用 Rust 和 Tesseract OCR 识别验证码
  • 基于寄存器地址amp;标准外设库的LED流水灯
  • Rust 和 Tesseract OCR 实现验证码识别
  • AI-Powered-ToDo-List
  • Python 在 Web 开发中的应用与趋势
  • LLM MOE的进化之路
  • 【pytorch】关于深度学习模型是怎么使数据从头流动到尾的
  • AtCoder ARC114 总结 (A-C)
  • 日总结 8
  • 完整教程:讲一下ZooKeeper的持久化机制
  • AI变现攻略 - 教程
  • 英语_阅读_A farmer dream_待读
  • docker 私有仓库 harbor
  • Selenium工作原理详解 - 教程