corso2013_stub.ctrl 1.37 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
frequency 1000

blocks {
	{ "setpoint_generator", "lift_spg", "lift_spg", "m" }
	{ "value", "zero" }
	{ "value_bool", "false" }
	{ "value", "distance" }
	{ "value", "diff" }
	{ "matrix_2x2", "output_matrix" }
}



set motor_speed 0.018

params {
	{ "lift_spg", "setpoint",    (float)0.0     }
	{ "lift_spg", "t",           (float)0.001   }
	{ "lift_spg", "max_x",       (float)0.8     }
	{ "lift_spg", "min_x",       (float)0.0     }
	{ "lift_spg", "max_v",       (float)0.015   }
	{ "lift_spg", "max_a",       (float)0.01    }
	{ "lift_spg", "max_j",       (float)0.01    }
	{ "lift_spg", "precision_x", (float)0.005   }
	{ "lift_spg", "precision_v", (float)0.005   }
	{ "lift_spg", "precision_a", (float)0.005   }
	{ "distance", "value", (float)1.1 }
	{ "diff", "value", (float)-0.035 }
	{ "output_matrix", "constants", (float) { 1.0/$(motor_speed), -0.5/$(motor_speed) },
                                        (float) { 1.0/$(motor_speed), 0.5/$(motor_speed) } }
}

links {
	{ "zero", "value", "lift_spg", "reset_x", true }
	{ "false", "value", "lift_spg", "reset", true }
	{ "lift_spg", "v", "output_matrix", "in0", true }
	{ "zero", "value", "output_matrix", "in1", true }
}

traces {
	{ "oscillator", "Boolean", "oscillator0",  "output" }
	{ "distance",   "m/s",     "input_matrix", "out0"   }
	{ "input_matrix.out0", "test", "lift_spg", "x" }
	{ "input_matrix.out1", "test", "diff", "value" }
}