6 from sensor_msgs.msg
import Joy
7 from std_msgs.msg
import Float32
8 from geometry_msgs.msg
import Twist
9 from actionlib_msgs.msg
import GoalID
19 self.
cmd_vel_pub = rospy.Publisher(
"teleop/cmd_vel", Twist, queue_size=1)
21 self.
servo_pub = rospy.Publisher(
"servo_pos", Float32, queue_size=1)
30 if data.axes[7] == -1:
38 linear_vel = (left_speed + right_speed) / 2.0
39 angular_vel = (right_speed - left_speed) / 2.0
43 twist.linear.x = linear_vel
44 twist.angular.z = angular_vel
45 self.cmd_vel_pub.publish(twist)
60 rospy.loginfo(
'Cancelling move_base goal')
62 self.goal_cancel_pub.publish(cancel_msg)
65 rospy.init_node(
"drive_teleop")