Raspberry PI based ROV

Anything to do with the Raspberry Pi
Post Reply
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: Raspberry PI based ROV

Post by Moki »

perfo wrote:Now when I run it :-

Code: Select all

root@ROV:~/Moki-ROV# node server.js
PCA9685 Not found, disabled!
MPU9150 Not found, disabled!
MS5803 Not found, disabled!
MCP3424 Not found, disabled!
ROV Server up and running. Go to http://192.168.2.13:3000
Fair enough it can't see the various I2C board as I haven't got any connected....

It runs for about 10 seconds then

Code: Select all

connected

/root/Moki-ROV/server.js:412
imuserver.on('listening', function () {
          ^
TypeError: Cannot call method 'on' of undefined
    at Namespace.<anonymous> (/root/Moki-ROV/server.js:412:11)
    at Namespace.EventEmitter.emit (events.js:95:17)
    at Namespace.emit (/root/Moki-ROV/node_modules/socket.io/lib/namespace.js:205:10)
    at /root/Moki-ROV/node_modules/socket.io/lib/namespace.js:172:14
    at process._tickCallback (node.js:415:13)
Do I have to run this as ROOT ie sudo su - or should it run from a normal user ? Not a problem as long as I know...

Sorry for so many questions. It does look good even though its only for 10 seconds :)
Thanks
As it was designed to be an embedded system, there was never need to run it as non-root. Just run it as root.
Ofcourse, if you wish to run it as non-root. You have to change a few things.. ill just add that to the wishlist.

As you don't have a MPU-9150, the software doesn't init the MPU-9150 routine... which breaks the code later on in the program. Ill see if i can add another if-then construct to fix this.
Last edited by Moki on Feb 16th, 2015, 12:27 am, edited 2 times in total.
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: Raspberry PI based ROV

Post by Moki »

perfo wrote:hmmm
I have to use
sudo modprobe i2c-dev

to get my I2C running but once I've entered that is appears to be ok....
Just add "i2c-dev" to your /etc/modules file. That should fix that.
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: Raspberry PI based ROV

Post by Moki »

Released version 0.1.1

- It should fix the sensor errors :)
- And will show "N/A" on the webbrowser page, if the sensor was not detected.
- Volts should work.
- Fixed a few typos :?
- No need to edit the ip adress in the server.js program... only edit the files in the public directory.
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: Raspberry PI based ROV

Post by perfo »

Splendid, do I need to do the full install again or can I just update bits of it to pull in the new server.js ?
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: Raspberry PI based ROV

Post by Moki »

I would recommend, a fresh install...
That way it is easier to debug any problems you may encounter.
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: Raspberry PI based ROV

Post by perfo »

Yep all works great now...thanks..
when you type in

Code: Select all

node server.js
You get the message all is good but it tell you to got to address 0.0.0.0:3000 rather than the Ip address of the raspberry pi which I think it used to do.. Anyway this doesn't really matter as long as you know the actual address. As pointing the browser to the actual ip address brings up the page in it's splendour. My webcam picture is too big and not in the right place though...

Anyway that has given me enough to play with I'll see if I can decipher what's going on and go from there...

Thanks for your help...
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: Raspberry PI based ROV

Post by Moki »

The ip 0.0.0.0 is special, it means it listens on all network interfaces.
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: Raspberry PI based ROV

Post by perfo »

yep,, it was handy though if you didn't know the ip addy of your pi. I haven't got mine set up as a static IP so it does change from time to time..it's easy enough to make it static I just keep changing the software around and not getting around to it... Thanks

I'm actually thinking it maybe an option to have two markers on the heading and depth scales. One for actual and one for demand. Thus don't control the motors directly but rather set a demand value using the joy stick and let the controller and heading feed back, guide you in.. maybe even a PDI controller? Same for depth.. Just a thought...
Last edited by perfo on Feb 18th, 2015, 3:42 pm, edited 1 time in total.
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: Raspberry PI based ROV

Post by Moki »

Yes, controle by wire would be great... the water current moves your ROV, and it adjust itself, to keep steady.
I'll just add it to the wish-list ;)

Not sure, what a DPI controller is... didnt google. Is it, force feedback?

Just so you know, there is already some "hover"ing already in the control program.
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: Raspberry PI based ROV

Post by perfo »

ha I called it PDI and you called it DPI and it is actually a PID three term controller. its no wonder I confuse people. It's done in maths and alters motor speed depending on how far out the desired is from the actual and constantly adjusts as you close in to prevent over shoot.
Post Reply