missing <odometrySource> default is 1 ; missing <publishTf>, defaults to 1

在运行Gazebo时遇到关于<odometrySource>和<publishTf>的警告,解决方法是在配置文件中添加相应代码行,参考ROS社区解答。
摘要由CSDN通过智能技术生成

运行Gazebo的时候报下面的警告

[ WARN] [1465156368.902100026, 1017.888000000]: DiffDrive(ns = //): missing <odometrySource> default is 1
[ WARN] [1465156368.902473604, 1017.888000000]: GazeboRosDiffDrive Plugin (ns = ) missing <publishTf>, defaults to 1

解决方案:

在配置文件中加入如下两行代码:

<odometrySource>world</odometrySource> <!-- 'encoder' instead of 'world' is also possible -->
<publishTf>1</publishTf>

完整代码如下:

  <!-- differential drive -->
<gazebo>
    <plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>40</updateRate>
        <legacyMode>false</legacyMode>
        <leftJoint>base_right_wheel_joint</leftJoint>
        <rightJoint>base_left_wheel_joint</rightJoint>
        <wheelSeparation>0.39</wheelSeparation>
        <wheelDiameter>0.15</wheelDiameter>
        <torque>5</torque>
        <commandTopic>cmd_vel</commandTopic>
        <odometryTopic>odom</odometryTopic>
        <odometryFrame>odom</odometryFrame>
        <robotBaseFrame>base_link</robotBaseFrame>
        <publishWheelTF>false</publishWheelTF>
        <publishWheelJointState>false</publishWheelJointState>
        <rosDebugLevel>na</rosDebugLevel>
        <wheelAcceleration>0</wheelAcceleration>
        <wheelTorque>5</wheelTorque>
        <odometrySource>world</odometrySource>
        <publishTf>1</publishTf>
    </plugin>
</gazebo>

参考:https://answers.ros.org/question/236122/diffdrive-odometry-source-is-missing/

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值