I am trying to use node-ar-drone package for controlling and interfacing with an AR Parrot Drone 2 but I get the following errors after connecting to the wireless network of the drone in my OSX Yosemite:
我正在尝试使用node-ar-drone package来控制和与AR Parrot Drone 2交互,但是在连接到OSX Yosemite中的无人机无线网络后,我得到了以下错误:
587214779:examples mona$ node png-stream.js
Connecting png stream ...
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1127:5)
at Object.<anonymous> (/Users/mona/iotlab/armyo/node-ar-drone/examples/png-stream.js:28:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
587214779:examples mona$
I wonder what the error might be?
我想知道错误是什么?
For more information, I have followed these tutorials:
为了获得更多的信息,我遵循了这些教程:
git clone https://github.com/felixge/node-ar-drone.git
install it using this command:
使用以下命令安装:
npm install git://github.com/felixge/node-ar-drone.git
P.S.: I am literally running an example in the example directory and I am not changing any code.
注:我正在示例目录中运行一个示例,并且没有修改任何代码。
2 个解决方案
#1
2
In png-stream.js change the following lines:
在png-stream。js修改如下行:
server.listen(8080, function() {
console.log('Serving latest png on port 8080 ...');
});
To a different port, 8081 for instance:
到另一个端口,例如8081:
server.listen(8081, function() {
console.log('Serving latest png on port 8081 ...');
});
#2
2
You need sudo/admin priviliges on your machine to run it on port 8080 or any port used. You will need to start with sudo on linux.
您需要在机器上的sudo/admin特权才能在端口8080或使用的任何端口上运行它。您需要从linux上的sudo开始。
#1
2
In png-stream.js change the following lines:
在png-stream。js修改如下行:
server.listen(8080, function() {
console.log('Serving latest png on port 8080 ...');
});
To a different port, 8081 for instance:
到另一个端口,例如8081:
server.listen(8081, function() {
console.log('Serving latest png on port 8081 ...');
});
#2
2
You need sudo/admin priviliges on your machine to run it on port 8080 or any port used. You will need to start with sudo on linux.
您需要在机器上的sudo/admin特权才能在端口8080或使用的任何端口上运行它。您需要从linux上的sudo开始。