Ejemplo n.º 1
0
class Node:
    def __init__(self):
        self.driver = Drive()
        rospy.init_node("phoebe", anonymous=True)
        rospy.Subscriber("cmd_vel", Twist, self.didReceiveTwist)

        rospy.spin()

    def didReceiveTwist(self, twist):
        self.driver.steer(twist.twist.angular.y)
        self.driver.accelerate(twist.twist.linear.z)
Ejemplo n.º 2
0
    def __init__(self):
        self.driver = Drive()
        rospy.init_node("phoebe", anonymous=True)
        rospy.Subscriber("cmd_vel", Twist, self.didReceiveTwist)

        rospy.spin()