11 import std_msgs.msg
as std_msgs
12 import geometry_msgs.msg
as geometry_msgs
22 implements a rotating motion. 35 '_initialise_pose_trigger' 49 twist = geometry_msgs.Twist()
60 def init(self, yaw_absolute_rate=1.2, yaw_direction=CLOCKWISE):
62 Initialise the direction and rate the robot should rotate at. 89 Drop this into threading.Thread or QThread for execution 92 rospy.logerr(
"AR Pair Search: already executing a motion, ignoring the request")
97 start = rospy.get_rostime()
101 while not self.
_stop and not rospy.is_shutdown():
104 twist.angular.z = twist.angular.z + update
108 now = rospy.get_rostime()
109 rospy.logdebug(
"AR Pair Search: rotate: %s rad/s [%ss]" % (twist.angular.z, str(now.secs - start.secs)))
111 self._cmd_vel_publisher.publish(twist)
112 except rospy.ROSException:
115 if not rospy.is_shutdown():
116 cmd = geometry_msgs.Twist()
118 self._cmd_vel_publisher.publish(cmd)
119 self._initialise_pose_trigger.publish(std_msgs.Empty())
121 self._cmd_vel_publisher.unregister()
def __init__(self, cmd_vel_topic)
def init(self, yaw_absolute_rate=1.2, yaw_direction=CLOCKWISE)
def change_direction(self)