]> git.llucax.com Git - z.facultad/75.68/celdas.git/blob - trunk/src/breve/robot/Demo-2wheels2-5.tz
(no commit message)
[z.facultad/75.68/celdas.git] / trunk / src / breve / robot / Demo-2wheels2-5.tz
1
2 @use Celdas-2-5.
3 \r
4 @define CELDAS_MAX_TURN_VELOCITY 2.\r
5
6 Controller DemoController.
7
8 CeldasControl : DemoController {
9         + variables:
10                 vehicle (object).
11                 n (int).
12
13         + to init: \r
14                 obs(object).\r
15                 \r
16                 obs = new CeldasObstacle .
17                 obs init at-location (0,1,10)with-size (20,3,1).\r
18                 obs set-direction at (0,0,1) .\r
19                 \r
20                 obs = new CeldasObstacle. \r
21                 obs init at-location (-25,1,0) with-size (20,3,1).\r
22                 obs set-direction at (0,0,1).\r
23                 \r
24                 obs = new CeldasObstacle.\r
25                 obs init at-location (-10,1,-10) with-size (1,3,20).\r
26                 obs set-direction at (1,0,0).\r
27                 
28                 obs = new CeldasObstacle.\r
29                 obs init at-location (-10,1,10)  with-size (1,3,20).\r
30                 obs set-direction at (1,0,0).\r
31
32                 obs = new CeldasObstacle.\r
33                 obs init at-location (10,1,10)  with-size (1,3,20).\r
34                 obs set-direction at (1,0,0).\r
35 \r
36                 vehicle = new CeldasVehicle.
37                 self watch item vehicle.
38
39                 vehicle move to (-20, 0.8, -3).
40
41                 vehicle set-global-velocity to 15.0.
42 }