41 import roslib; roslib.load_manifest(
'kobuki_testsuite')
45 from tf.transformations
import euler_from_quaternion
46 from math
import degrees
48 from sensor_msgs.msg
import Imu
49 from std_msgs.msg
import Float32
50 from nav_msgs.msg
import Odometry
51 from geometry_msgs.msg
import Twist
52 from geometry_msgs.msg
import Quaternion
58 rospy.init_node(
"test_slow_drive")
60 if (len(sys.argv) > 1):
61 multip = int(sys.argv[1])
70 self.
cmd_vel_pub = rospy.Publisher(
"/mobile_base/commands/velocity", Twist)
74 rospy.Subscriber(
"/mobile_base/sensors/imu_data", Imu, self.
ImuCallback)
78 self.
odom = data.pose.pose.position.x
82 if (self.
count > 100):
83 self.
real_w = data.angular_velocity.z
87 self.int_err_pub.publish(self.
int_err)
88 self.avg_err_pub.publish(self.
avg_err)
92 self.cmd_vel_pub.publish(self.
twist)
97 while not rospy.is_shutdown():
100 print test_slow_drive_obj.int_err
101 print test_slow_drive_obj.avg_err
def ImuCallback(self, data)
def OdomCallback(self, data)