Control loop missed its desired rate of 20.0000Hz

ROS机器人高效编程(原书第3版)封面

在做第六章 导航功能包集进阶的实验:

执行下列命令:

$ roslaunch chapter6_tutorials chapter6_configuration_gazebo.launch
$ roslaunch chapter6_tutorials move_base.launch

 出现警告:

[ WARN] [1482245396.760593833]: Control loop missed its desired rate  of 20.0000Hz… the loop actually took 0.0665 seconds 
[ WARN] [1482245396.767846009]: Control loop missed its desired rate of 20.0000Hz… the loop actually took 0.0834 seconds

原因分析:

网上的解释是配置文件配置过高,机器cpu能力不足,配置文件并未改过。可能有个默认的Control loop missed its desired rate 为20Hz,那就把这个参数改小吧。

解决方案:

在move_base.launch 文件中添加参数赋值:

添加了这两句参数赋值,设置与电脑性能相称的参数值:

    <param name="controller_frequency" value="10.0"/> 
    <param name="controller_patiente" value="15.0"/>

move_base.launch 文件完整内容:

<?xml version="1.0"?>

<launch>

  <!-- Run the map server -->
   <node name="map_server" pkg="map_server" type="map_server" args="$(find chapter6_tutorials)/maps/map.yaml" output="screen"/>

  <include file="$(find amcl)/examples/amcl_diff.launch" >
  </include> 

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="controller_frequency" value="10.0"/> 
    <param name="controller_patiente" value="15.0"/>
    <rosparam file="$(find chapter6_tutorials)/launch/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find chapter6_tutorials)/launch/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find chapter6_tutorials)/launch/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find chapter6_tutorials)/launch/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find chapter6_tutorials)/launch/base_local_planner_params.yaml" command="load" />
  </node>
   <node name="rviz" pkg="rviz" type="rviz" args="-d $(find chapter6_tutorials)/launch/navigation.rviz" /> 

</launch>

  • 5
    点赞
  • 52
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值