19 PKG =
'uuv_trajectory_control' 20 roslib.load_manifest(PKG)
24 from uuv_waypoints
import Waypoint, WaypointSet
29 wp_set = WaypointSet()
30 self.assertEquals(wp_set.num_waypoints, 0,
'Waypoint list is not empty')
33 wp_set = WaypointSet()
34 self.assertFalse(wp_set.generate_helix(
38 max_forward_speed=0.0,
42 heading_offset=0.0),
'Invalid parameters have been wrongly instantiated')
45 wp_set = WaypointSet()
46 self.assertFalse(wp_set.generate_circle(
52 heading_offset=0.0),
'Invalid parameters have been wrongly instantiated')
55 wp = Waypoint(x=1, y=2, z=3, max_forward_speed=1)
56 wp_set = WaypointSet()
57 self.assertTrue(wp_set.add_waypoint(wp),
58 'Error occured while adding waypoint to empty set')
59 self.assertFalse(wp_set.add_waypoint(wp),
60 'Repeated waypoint wrongfully added')
63 if __name__ ==
'__main__':
65 rosunit.unitrun(PKG,
'test_waypoint_set', TestWaypointSet)
def test_invalid_params_helix(self)
def test_add_repeated_waypoint(self)
def test_invalid_params_circle(self)