主要内容

resetOdometry

重置里程表TurtleBot

描述

例子

resetOdometry (tbot重置TurtleBot的里程表读数®通过接口对象连接,tbot.位置和方向都被重置为[0 0 0]

例子

全部折叠

resetOdometry (tbot);

输入参数

全部折叠

TurtleBot接口对象,指定为turtlebot对象。该对象包含用于激活订阅者和访问与TurtleBot相关的主题名称的属性。属性包含TurtleBot不同订阅者的主题名称和活动状态。创建对象时使用turtlebot,可用的属性为:

龟形机器人
tbot = turtlebot与属性:Velocity: [1x1 struct] ColorImage: [1x1 struct] GrayImage: [1x1 struct] DepthImage: [1x1 struct] PointCloud: [1x1 struct] LaserScan: [1x1 struct] Odometry: [1x1 struct] OdometryReset: [1x1 struct] IMU: [1x1 struct] TransformFrames: {0x1 cell} TopicNames: {3x1 cell}

对于具有相关ROS数据消息的属性,您可以查看主题名称和订阅者的活动状态。给定的特定订阅者是活动的TopicName如果活跃的等于1。

tbot。速度
ans = TopicName: '/mobile_base/commands/velocity'激活:1

版本历史

在R2016a中引入