def test_set_vel(self):
     mc = MotionControl()
     t = Twist()
     t.linear.x = 0.6
     t.angular.z = 0.12
     mc.set_vel(t)
     self.assertEquals(mc.vel_pid.target, 0.6)
     self.assertEquals(mc.rot_pid.target, 0.12)
Exemplo n.º 2
0
 def test_set_vel(self):
     mc = MotionControl()
     t = Twist()
     t.linear.x = 0.6
     t.angular.z = 0.12
     mc.set_vel(t)
     self.assertEquals(mc.vel_pid.target, 0.6)
     self.assertEquals(mc.rot_pid.target, 0.12)
Exemplo n.º 3
0
 def test_vel_pid(self):
     rospy.init_node('test_vel_pid')
     controller = MotionControl()
     goal = Bunch()
     goal.target = 5.0
     controller.motion_goal(goal)
     for i in range(30):
         rospy.logwarn(i)
         time.sleep(1)
     controller.stop()
 def test_vel_pid(self):
     rospy.init_node('test_motion_control')
     controller = MotionControl()
     goal = Bunch()
     goal.target = 2.5
     controller.motion_goal(goal)
     for i in range(40):
         rospy.logwarn(i)
         time.sleep(1)
     # goal.target = 0.0
     # controller.motion_goal(goal)
     # for i in range(30):
     #     rospy.logwarn(i)
     #     time.sleep(1)
     # goal.target = 0.5
     # controller.motion_goal(goal)
     # for i in range(30):
     #     rospy.logwarn(i)
         time.sleep(1)
     controller.stop()
Exemplo n.º 5
0
 def test_vel_pid(self):
     rospy.init_node('test_vel_pid')
     controller = MotionControl()
     goal = Bunch()
     goal.target = 5.0
     controller.motion_goal(goal)
     for i in range(30):
         rospy.logwarn(i)
         time.sleep(1)
     controller.stop()
Exemplo n.º 6
0
 def test_vel_pid(self):
     rospy.init_node('test_motion_control')
     controller = MotionControl()
     goal = Bunch()
     goal.target = 2.5
     controller.motion_goal(goal)
     for i in range(40):
         rospy.logwarn(i)
         time.sleep(1)
         # goal.target = 0.0
         # controller.motion_goal(goal)
         # for i in range(30):
         #     rospy.logwarn(i)
         #     time.sleep(1)
         # goal.target = 0.5
         # controller.motion_goal(goal)
         # for i in range(30):
         #     rospy.logwarn(i)
         time.sleep(1)
     controller.stop()