Improving controller

- Controller emit events
- Log directly to csv file in example repl
- Consider state stable after some delay
- Playing wit PID coefficients (not ideal yet)
Esse commit está contido em:
Laurent Eschenauer
2013-06-19 22:46:21 +02:00
commit 657c5dd4a8
4 arquivos alterados com 116 adições e 91 exclusões
+6 -1
Ver Arquivo
@@ -4,10 +4,15 @@ console.log("The test is broken. Will have to write proper tests :-)");
var autonomy = require('..');
var client = require('./mock/client');
var controller = new autonomy.Controller(new client(), {state: {x: 0, y:0, z:1, yaw: 0}, debug: false});
var controller = new autonomy.Controller(new client(), {state: {x: 0, y:0, z:1, yaw: 0}});
console.log("State: %j", controller.state());
controller.on('controlData', function(data) {
console.log("%j", data);
});
controller.go({x: 1, y: 1}, function(state) {
console.log("Reached state %j", state);
controller.disable();
});