示例#1
0
文件: main.py 项目: younata/phoebe
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)
示例#2
0
文件: main.py 项目: younata/phoebe
    def __init__(self):
        self.driver = Drive()
        rospy.init_node("phoebe", anonymous=True)
        rospy.Subscriber("cmd_vel", Twist, self.didReceiveTwist)

        rospy.spin()