Main Content

resetOdometry

Reset odometry for TurtleBot

Add-On Required: This feature requires the ROS Toolbox Support Package for TurtleBot-Based Robots add-on.

Description

example

resetOdometry(tbot) resets the odometry readings for the TurtleBot® connected through interface object, tbot. The position and orientation are both reset to [0 0 0].

Examples

collapse all

resetOdometry(tbot);

Input Arguments

collapse all

TurtleBot interface object, specified as a turtlebot object. The object contains properties for activating subscribers and accessing topic names relevant to the TurtleBot. The properties contain the topic name and active status of different subscribers for the TurtleBot. When you create the object with turtlebot, the properties available are:

tbot = turtlebot
tbot = 

  turtlebot with properties:

           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}

For properties with relevant ROS data messages, you can view the topic name and a subscriber’s active status. A specific subscriber is active for the given TopicName if Active equals 1.

tbot.Velocity
ans = 

    TopicName: '/mobile_base/commands/velocity'
       Active: 1

Version History

Introduced in R2016a