ROS使用yocs_smoother_velocity做速度平滑处理
发布日期:2021-10-03 22:59:08 浏览次数:11 分类:技术文章

本文共 2993 字,大约阅读时间需要 9 分钟。

ROS 导航模块move_base 输出的/cmd_vel topic指定了为机器人规划的线速度和角速度, 但是这个输出值还是不够友好导致机器人运动不够流畅,这就需要对这个输出速度值进行一个平滑的过程。ROS中的yocs_smoother_velocity是一个非常好的速度插值的包, 可以对速度、加速度进行限制,用来防止机器人的速度、转速变化过快或过慢, 是其运行平滑流畅. 下面做个具体介绍.

 

1 输入的TOPIC

~raw_cmd_vel ()

  • Input velocity commands. 输入的速度值,一般就是move_base的输出topic /cmd_vel

~odometry ()

  • We compare the output velocity commands to "real" velocity to ensure we don't create very big jumps in the velocity profile.

里程计数据,这个可以是直接的里程计,也可以是经过位姿估计调整后的里程计

~robot_cmd_vel ()

  • Alternatively, we can also compare the output velocity commands to end robot velocity commands to ensure we don't create very big jumps in the velocity profile. See robot_feedback parameter description below for more details.

这个数据一般是base_controller实际发送给机器人电机的速度值,把这个值发布出来,yocs_smoother_velocity可以参考这个值避免大的数据波动。

2 输出的TOPIC

~smooth_cmd_vel ()

  • Smoothed output velocity commands respecting velocity and acceleration limits.

输出的cmd_vel.  Bas_ controller 的输入topic。不使用yocs_smoother_velocity的话,base controller的输入是move_base的输出/cmd_vel, 现在就是用/smooth_cmd_vel

3 配置参数

~accel_lim_v (double)

  • Linear acceleration limit. Mandatory. 线加速度的最大值

~accel_lim_w (double)

  • Angular acceleration limit. Mandatory. 角加速度的最大值

~speed_lim_v (double)

  • Linear velocity limit. Mandatory. 线速度的最大值

~speed_lim_w (double)

  • Angular velocity limit. Mandatory. 角速度的最大值

~decel_factor (double, default: 1.0)

  • Deceleration/acceleration ratio. Useful to make deceleration more aggressive, for example to safely brake on robots with high inertia.

减或加速度系数,需要紧急减速时有用,例如高惯性的机器人急刹车时,此系数越大,越有效

~frequency (double, default: 20.0)

  • Output messages rate. The velocity smoother keeps it regardless incoming messages rate, interpolating whenever necessary.

输出数据的频率, 不管输入的数据频率,velocity smoother会保持这个频率发布数据

~robot_feedback (int, default: 0)

  • Specifies which topic to use as robot velocity feedback (0 - none, 1 - odometry, 2 - end robot commands). See hints below for more details.

机器人对此发布数据的反馈。详细解释可以参考官方文档。

4 yocs_velocity_smoother的安装与配置

安装很简单了,Ubuntu18.04 melodic 为例,

运行sudo apt-get install ros-melodic-yocs_velocity_smoother

 

Launch 文件的配置例子如下:

  <include file="$(find )/launch/velocity_smoother.launch">

    <arg name="node_name"             value="$(arg node_name)"/>

    <arg name="nodelet_manager_name"  value="$(arg nodelet_manager_name)"/>

    <arg name="config_file"           value="$(arg config_file)"/>  //配置参数的yaml文件

    <arg name="raw_cmd_vel_topic"     value="$(arg raw_cmd_vel_topic)"/>

    <arg name="smooth_cmd_vel_topic"  value="$(arg smooth_cmd_vel_topic)"/>

    <arg name="robot_cmd_vel_topic"   value="$(arg robot_cmd_vel_topic)"/>

<arg name="odom_topic"            value="$(arg odom_topic)"/>

</include>

配置参数是yaml文件格式,一个例子如下:

# Example configuration:# - velocity limits are around a 10% above the physical limits# - acceleration limits are just low enough to avoid jerking# Mandatory parametersspeed_lim_v: 0.6speed_lim_w: 0.5accel_lim_v: 0.1accel_lim_w: 0.25# Optional parametersfrequency: 20.0decel_factor: 20.0# Robot velocity feedback type:#  0 - none#  1 - odometry#  2 - end robot commandsrobot_feedback: 0

Reference:

转载地址:https://blog.csdn.net/lclfans1983/article/details/105444059 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:位姿估计Robot_pose_efk的配置和使用
下一篇:Xsens Mti-g-710 IMU driver在Ubuntu18.04 ROS melodic中的安装使用

发表评论

最新留言

很好
[***.229.124.182]2023年02月22日 20时05分55秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

最新文章

idea启动日志在哪里_艹,我的日志被Intellij IDEA 控制台给“吃”了! 2019-12-02 01:43:37
python 中不属于数据挖掘分析模块的是()_大工19秋《数据挖掘》在线作业3(参考答案)... 2019-12-02 01:43:38
python sqlserver 数据操作_python上手--python操作数据库 2019-12-02 01:43:35
80端口攻击_使用 ZoomEye 寻找 APT 攻击的蛛丝马迹 2019-12-02 01:43:35
leetcode c程序总提示主函数_Python练手:一行Python解Leetcode习题 2019-12-02 01:43:35
python多线程实现同时下载_Python实现多线程下载 2019-12-02 01:43:36
linux sleeping进程多_你知道Linux进程的睡眠和唤醒操作? 2019-12-02 01:43:36
fastcopy会损坏硬盘_绚丽多彩 卓有不凡 三星移动固态硬盘T5金属红新品评测 2019-12-02 01:43:36
git 修改密码_在windows中利用gitblit搭建git服务端 2019-12-02 01:43:36
gitlens突然不显示了_监控画面突然没有了怎么办?监控画面不显示了? 2019-12-02 01:43:36
python threading join_浅谈Python中threading join和setDaemon用法及区别说明 2019-12-02 01:43:34
工业循环冷却水处理设计规范_循环冷却水系统及其水处理 2019-12-02 01:43:34
c++ 多线程 类成员函数_C++11多线程 2019-12-02 01:43:34
vb6 怎么把一个数组的 0 值 去掉_解决逆向查找问题?VLOOKUP、CHOOSE、IF,索引数组,轻松解决... 2019-12-02 01:43:34
sqlite3 加密版本 下载_制作Sqlcipher+SM4加密的framework包(OC) 2019-12-02 01:43:34
python中基础知识_Python中的一些基础知识 2019-12-02 01:43:35
高通的快充协议_高通发布QC5.0快充技术最高100W+功率!手机厂商私有协议更好... 2019-12-02 01:43:32
csv逗号分隔符转换_文件系统(02):基于SpringBoot管理Xml和CSV 2019-12-02 01:43:32
python函数作用的描述_python基础之函数内容介绍 2019-12-02 01:43:33
python存数据到impala_0039-如何使用Python Impyla客户端连接Hive和Impala 2019-12-02 01:43:33