KR2 ROV
Re: KR2 ROV
Hi Ryan,
Hopefully you can access this, it's a spreadsheet utilizing my calcs, if you change the numbers in the bottom section you should see the results at the thrusters
https://drive.google.com/file/d/0Bw71Vt ... sp=sharing
Hopefully you can access this, it's a spreadsheet utilizing my calcs, if you change the numbers in the bottom section you should see the results at the thrusters
https://drive.google.com/file/d/0Bw71Vt ... sp=sharing
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Got the spreadsheet! Thanks!
Just to verify... Surge and Sway are X and Y axis respectively?
Surge = Up / Down Axis
Sway = Left / Right axis
Heading = ? what am I missing...
Correct?
(Side Note: I've only managed to get one cup of coffee in me at the moment... and I am at work... )
Edit 2: Oh Duh! Now i get it! Read all the post Ryan... read ALL the post... then open mouth... off to the coffee machine now...
Just to verify... Surge and Sway are X and Y axis respectively?
Surge = Up / Down Axis
Sway = Left / Right axis
Heading = ? what am I missing...
Correct?
(Side Note: I've only managed to get one cup of coffee in me at the moment... and I am at work... )
Edit 2: Oh Duh! Now i get it! Read all the post Ryan... read ALL the post... then open mouth... off to the coffee machine now...
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Coffee has kicked in! Thought of a way to clean up this code even more! Have you considered the constrain function
Current Code:
New Code:
Current Code:
Code: Select all
//Take joystick values and mix to give vectored output.....
STBDFOR = (rxdata.surg - rxdata.sway - rxdata.head + 180); // See spreadsheet for calcs and results
STBDAFT = (rxdata.surg - rxdata.sway + rxdata.head); //
PORTAFT = (rxdata.surg + rxdata.sway - rxdata.head); //
PORTFOR = (rxdata.surg + rxdata.sway + rxdata.head - 180); //
// Thruster calcs would result in out of range results, restrict calcs to servo range
if (STBDFOR > 179) {
(STBDFOR = 178);
}
if (STBDFOR < 1) {
(STBDFOR = 2);
}
if (STBDAFT > 179) {
(STBDAFT = 178);
}
if (STBDAFT < 1) {
(STBDAFT = 2);
}
if (PORTAFT > 179) {
(PORTAFT = 178);
}
if (PORTAFT < 1) {
(PORTAFT = 2);
}
if (PORTFOR > 179) {
(PORTFOR = 178);
}
if (PORTFOR < 1) {
(PORTFOR = 2);
}
// Write commands to ESC's after mix calcs
stbda.write (STBDAFT);
stbdf.write (STBDFOR);
porta.write (PORTAFT);
portf.write (PORTFOR);
verta.write (rxdata.dept);
vertf.write (rxdata.dept);
// manip.write (rxdata.jaw);
Code: Select all
//Take joystick values and mix to give vectored output.....
STBDFOR = (rxdata.surg - rxdata.sway - rxdata.head + 180); // See spreadsheet for calcs and results
STBDAFT = (rxdata.surg - rxdata.sway + rxdata.head); //
PORTAFT = (rxdata.surg + rxdata.sway - rxdata.head); //
PORTFOR = (rxdata.surg + rxdata.sway + rxdata.head - 180); //
//Thruster calcs would result in out of range results, restrict calcs to servo range
STBDFOR = constrain(STBDFOR, 2, 178);
STBDAFT = constrain(STBDAFT, 2, 178);
PORTFOR = constrain(PORTFOR, 2, 178);
PORTAFT = constrain(PORTAFT, 2, 178);
//Write commands to ESC's after mix calcs
stbda.write (STBDAFT);
stbdf.write (STBDFOR);
porta.write (PORTAFT);
portf.write (PORTFOR);
verta.write (rxdata.dept);
vertf.write (rxdata.dept);
Re: KR2 ROV
Hi Ryan.
Yeah I'd only stumbled across constrain after I'd written the code (hence never bothered to implement it yet ). That looks a lot cleaner though! I'll be implementing that in the next version of my code.
Thanks!
Bindo
Yeah I'd only stumbled across constrain after I'd written the code (hence never bothered to implement it yet ). That looks a lot cleaner though! I'll be implementing that in the next version of my code.
Thanks!
Bindo
Re: KR2 ROV
I want to use this with ethernet, how do i go forward?
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
I have not played with Ethernet much... in which way do you mean that you want to use this with Ethernet? If you are talking for the tether.. i would think you would just have to look at the code regarding the RS485 coms... and replace this with the data handling code for the Ethernet coms... see the EASY TRANSFER section of my code...HwT wrote:I want to use this with Ethernet, how do i go forward?
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Oh YEA!
My shipment from BlueRobotics arrived today!
First impressions:
These thrusters are pretty solid! Feel a lot heavier and solid in the hand then I was expecting! Cables all appear very sound, and the build quality is GREAT! It is a shame it is going to be such a crazy week, or I would have these guys up and running already!
Rest assured, any free time I have will be spend getting these up and running! Watch this post for updates!
Best regards,
KR2_Diving
My shipment from BlueRobotics arrived today!
First impressions:
These thrusters are pretty solid! Feel a lot heavier and solid in the hand then I was expecting! Cables all appear very sound, and the build quality is GREAT! It is a shame it is going to be such a crazy week, or I would have these guys up and running already!
Rest assured, any free time I have will be spend getting these up and running! Watch this post for updates!
Best regards,
KR2_Diving
Re: KR2 ROV
Can't wait to see these puppies in action
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Status Update!
So... I have been so excited to get my BlueRobotics T100's up and running... that I haven't even touched them yet... sad... I know...
But I have had some time to tinker with some other stuff.
Today I got my Easytransfer Library back up and running, and tested. I wanted to make sure I understood the i2c Bus and EasyTransfer before I tackled the challenge of flashing all the firmware on the T100s to change addresses...
Anyway, you can see below the current layout of the system. All of the 7-seg displays are are the same i2c bus. I am using the LCD Backpacks from Adafruit.
Here is a link to the video of it all in action! Warning: the LED's get BRIGHT!
The Left and Right Sticks control the thrusters, the Left Pad UP/DOWN control the brightness of the LEDs, Start Turns them on, Select turns them off. The colon on the BLUE display will turn on when the LEDs are on.
All seems in order, so now I think I can tackle the T100's!
So... I have been so excited to get my BlueRobotics T100's up and running... that I haven't even touched them yet... sad... I know...
But I have had some time to tinker with some other stuff.
Today I got my Easytransfer Library back up and running, and tested. I wanted to make sure I understood the i2c Bus and EasyTransfer before I tackled the challenge of flashing all the firmware on the T100s to change addresses...
Anyway, you can see below the current layout of the system. All of the 7-seg displays are are the same i2c bus. I am using the LCD Backpacks from Adafruit.
Here is a link to the video of it all in action! Warning: the LED's get BRIGHT!
The Left and Right Sticks control the thrusters, the Left Pad UP/DOWN control the brightness of the LEDs, Start Turns them on, Select turns them off. The colon on the BLUE display will turn on when the LEDs are on.
All seems in order, so now I think I can tackle the T100's!
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Had a few minutes this evening to finally unpack my T100's and 4"hull to see how things laid out.
The creative juices are flowing... Hoping to gain some momentum on the build and move Version 1 from the drawing board to the diving board!