Ask Your Question

Revision history [back]

You can create a relatively simple ROS node (or function) to do this with the following steps:

  • Create a TF listener and cmd_vel publisher
  • In a while loop:

    publish some rotation command to cmd_vel, for instance 0.5 radians / second

You can create a relatively simple ROS node (or function) to do this with the following steps:

  • Create a TF listener and cmd_vel publisher
  • Ask TF the current odometric position (odom -> base link)
  • In a while loop:

    • publish some rotation command to cmd_vel, for instance 0.5 radians / second

    second
  • Check TF to see the current pose, compute the amount you've rotated
  • If within a threshold, break from the loop