turtlebot2自主导航速度过快该如何设置

本文详细解析了如何通过修改TurtleBot的smoother.yaml配置文件来调整机器人的最大线速度和角速度,以及如何正确设置速度平滑控制器参数,确保机器人导航时速度变化平稳,避免加速度过大导致的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我用键盘指令设置的时候,机器人一直没法自主导航规划路径

roslaunch turtlebot_teleop keyboard_teleop.launch

在找机器人导航launch文件的时候,找到了

 <include file="$(find turtlebot_navigation)/launch/includes/rplidar_move_base.launch.xml">   

链接到的:

  <include file="$(find turtlebot_navigation)/launch/includes/velocity_smoother.launch.xml"/>
  <include file="$(find turtlebot_navigation)/launch/includes/safety_controller.launch.xml"/>

百度网址:https://blog.csdn.net/sunyoop/article/details/78222938?utm_source=blogxgwz4,解释了我为什么用键盘指令设置机器人速度的时候,机器人一直没法正常进行自主导航.

smoother : 是一个速度平滑控制器,用来防止robot navigation的速度/转速过快,加速度/快减速过大

smoother针对navigation或者其他一些例子,robot有一个命令选择node cmd_vel_mux,防止robot被多个ros app下发的运动命令控制从而出现运动问题。
 

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

路径下的文件内容:

<!-- 
         Velocity smoother
-->
<launch>
  <node pkg="nodelet" type="nodelet" name="navigation_velocity_smoother" args="load yocs_velocity_smoother/VelocitySmootherNodelet mobile_base_nodelet_manager">
    <rosparam file="$(find turtlebot_bringup)/param/defaults/smoother.yaml" command="load"/>
    <remap from="navigation_velocity_smoother/smooth_cmd_vel" to="cmd_vel_mux/input/navi"/>

    <!-- Robot velocity feedbacks; use the default base configuration -->
    <remap from="navigation_velocity_smoother/odometry" to="odom"/>
    <remap from="navigation_velocity_smoother/robot_cmd_vel" to="mobile_base/commands/velocity"/>
  </node>
</launch>

我一直在找:

remap from="navigation_velocity_smoother/smooth_cmd_vel" to="cmd_vel_mux/input/navi"的信息内容怎么去更改turtlebot的速度,其实是在"$(find turtlebot_bringup)/param/defaults/smoother.yaml"文件里更改机器人最大线速度/角速度

参数配置文件smoothrt.yaml

# Default parameters used by the yocs_velocity_smoother module.
# This isn't used by minimal.launch per se, rather by everything
# which runs on top.

# Mandatory parameters
# speed_lim_v: 0.8   强制必须设置,线速度最大值
# speed_lim_w: 5.4   强制必须设置,角速度最大值
speed_lim_v: 0.15
speed_lim_w: 0.5

# accel_lim_v: 1.0   强制必须设置,线性加速度最大值maximum is actually 2.0, but we 
#                    push it down to be smooth
# accel_lim_w: 2.0  强制必须设置,角加速度最大值
accel_lim_v: 0.5 # maximum is actually 2.0, but we push it down to be smooth
accel_lim_w: 0.5

# Optional parameters
frequency: 20.0      #输出速度频率。不论输入命令的频率。必要时插值
decel_factor: 1.5   #加减速比,对于惯性大的机器人

# Robot velocity feedback type:
#  0 - none (default)
#  1 - odometry
#  2 - end robot commands
robot_feedback: 2       #速度反馈(0 - none, 1 - odometry, 2 - end robot commands). 

这个是参考上述博主的.PS:做一下笔记,以防忘记

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Maccy37

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值