参考文章
1-ros中的速度平滑处理和yocs_smoother_velocity介绍及关于全向扩展包实现
https://www.jianshu.com/p/926d6e68ebd1
2-ROS使用yocs_smoother_velocity做速度平滑处理
https://blog.csdn.net/lclfans1983/article/details/105444059
3-使用yocs_velocity_smoother对机器人速度进行限制
https://my.oschina.net/u/4275369/blog/4200069
4-ROS入门笔记(五):ROS中运行rqt_plot的问题(kinetic)
https://blog.csdn.net/brawly/article/details/106433339?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param
自己调试的注意事项
这是我的
raw_cmd_vel_topic是手柄发过来的话题数据
smooth_cmd_vel_topic和robot_cmd_vel_topic可以是同一个,最好是同一个,因为robot_cmd_vel_topic是机器人当前的速度你是不知道的。
<!--
Example standalone launcher for the velocity smoother
-->
<launch>
<arg name="node_name" value="velocity_smoother"/>
<arg name="nodelet_manager_name" value="nodelet_manager"/>
<arg name="config_file" value="$(find yocs_velocity_smoother)/param/standalone.yaml"/>
<arg name="raw_cmd_vel_topic" value="teleop_velocity_smoother/raw_cmd_vel"/>
<arg name="smooth_cmd_vel_topic" value="cmd_vel"/>
<arg name="robot_cmd_vel_topic" value="cmd_vel"/>
<arg name="odom_topic" value="odom"/>
<!-- nodelet manager -->
<node pkg="nodelet" type="nodelet" name="$(arg nodelet_manager_name)" args="manager"/>
<!-- velocity smoother -->
<include file="$(find yocs_velocity_smoother)/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)"/>
<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>
</launch>
平滑包参数,这是我的,速度最大值和加速度的对应关系一般为1:1.5(是我这么认为),比如speed_lim_v是0.5,则accel_lim_v为0.75,这样可以较平稳的控制小车
# Example configuration:
# - velocity limits are around a 10% above the physical limits
# - acceleration limits are just low enough to avoid jerking
# Mandatory parameters
speed_lim_v: 0.5
speed_lim_w: 2.0 #default is 5.4
accel_lim_v: 0.55
accel_lim_w: 2.2 #default is 3.5
# Optional parameters
frequency: 30.0
decel_factor: 1.0
# Robot velocity feedback type:
# 0 - none
# 1 - odometry
# 2 - end robot commands
robot_feedback: 2