martinw
Community Member

Posts: 43
|
 |
« on: July 16, 2010, 06:18:32 AM » |
|
Hi, I have my ROV (Remotely Operated Vehicle, like the ones looking at the BP oil well in the Gulf) trainer at a certain point but am wondering if anybody could give me a pointer/opinion or two on the following. I've posted a video on YouTube on what I have so far. http://www.youtube.com/watch?v=yvXvTibF5hIThe yellow umbilical pays out and in from the drum on the top of the rectangular object (TMS, Tether Management System) via the traction wheel shown in the video. Does anybody have any ideas how I can increase and decrease the length of the yellow tether in real time? I've formed the tether with meshes that are physical entities joined by ball joints when the program initialises but I now need to be able to add and remove these meshes programatically (maybe with scaled objects?) so that it looks like the umbilical/cable is paying in and out. Any ideas would be appreciated  Thanks. Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #1 on: July 20, 2010, 05:20:57 PM » |
|
I might have an idea.
Adding and removing meshes seems to be a good way of doing it but I guess the question is when and how to the segments so that the cable behaves correctly.
In TVPhysics you can add and remove joints as you please so adding a new body and attaching it to first joint of the cable should work for extending the length. Likewise removing a segment can be done by destroying the body and removing joint.
To make it more dynamic you could turn the first joint into slider joint and every time the slider joint extends past the segment length, you can add another ball joint segment and push the slider back. The slider would just serve as spring pulling the cable.
You can then turn it the other way around retract the slider and remove segments when the slider is close enough.
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #2 on: July 20, 2010, 07:06:41 PM » |
|
That sounds like a good idea, I'll definitely give that one a try, thank you 
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #3 on: July 20, 2010, 07:33:30 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #4 on: July 21, 2010, 05:44:21 AM » |
|
Hi Mithrandir, That looks great, I presume it's easy enough to make it work in reverse too? If you would care to share your code for that I would appreciate it greatly, just so I know I'm doing it right, if not I understand  BTW you're a great asset to this forum, good on ya :> Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #5 on: July 21, 2010, 10:50:14 AM » |
|
Here you go.
There are no comments but it's only few lines of code.
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #6 on: July 22, 2010, 08:31:15 AM » |
|
Hi Mithrandir, Thankyou for that, I'll have a look at it when I get back from my holiday. I noticed you're in Edinburgh, I'm in Aberdeenshire normally, small world. Visiting Alcatraz today so you can guess my location at the moment  Than you again for your help in all this, TV3D are very lucky to have you on this forum  Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #7 on: July 22, 2010, 09:41:42 AM » |
|
We can grab a beer in Bobbys, maybe, some day 
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #8 on: July 22, 2010, 07:46:46 PM » |
|
Sounds good  Thanks again 
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #9 on: August 06, 2010, 04:53:45 AM » |
|
Hi Mithrandir,
I have the slider joint and ball joint working for my tether but I cannot seem to get the slider joint to work when the box (in your rope example) rotates programatically.
Do I have to set the slider axis in world space, it doesn't seem to work in local space?
i.e. I can set the slider joint to move OK at startup but once I start adding joints with the box rotated later on (which has to happen) it doesn't seem to work.
I've tried converting the box rotation to vector coordiantes but the slider joint doesn't seem to work with (-1,0,0) for the slider axis, but it does work with (1,0,0).
The other thing is if I set the vector to (-0.707, 0, 0.707) with the box at 45 degrees, which I would have thought would be a slider angle of 45 degrees it doesn't seem to work?
The other funny thing is the ball joints seem to work OK?
Any pointers/clarification on how the sliding axis is set would be appreciated.
Thanks.
Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #10 on: August 06, 2010, 06:04:43 AM » |
|
I don't think there is much to say about the axis. You check the newton forum though.
In terms of rotating the box: it is not working perhaps because the slider joint is connecting the world/static body with the rope. Try connecting it to the box itself and then use forces/torques to move the box.
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #11 on: August 09, 2010, 09:00:35 AM » |
|
Hi Mithrandir, I think what was confusing me was the axes of the joints likks to be a different polarity to the axes of the TV3D environment, unless I'm missing something, always a possibility  Thanks. Martin
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #12 on: September 04, 2010, 04:16:57 AM » |
|
Hi Mithrandir, I'd appreciate any ideas you may have with regards to the next part of my 3D ROV Trainer program development, as you were so quick to help me out with the first one of how to pay out the yellow cable, which works pretty well (thank you). http://www.youtube.com/watch?v=LHv2rTTAz1sBut now I need to get the cable back in ..........  I push and pull on the piece of cable that slides on the slider joint (with a force controlled from the keyboard) to move it out (as you can see the out bit works well) and in, but when trying to get it in, destroying the ball joints and destroying bits of cable and attaching the remaining bit at the end to a new slider joint and trying to pull it back in doesn't seem to work  Any ideas would be appreciated, Ta. Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #13 on: September 04, 2010, 11:33:32 AM » |
|
What exactly is happening when you retract the cable?
Nice work so far by the way. Keep it up.
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #14 on: September 06, 2010, 05:58:31 AM » |
|
Hi Mithrandir, Thanks for that, it's coming along nicely  I think this is the final (major) part of the puzzle. I'm basically trying to do the opposite of paying out, so in paying out I start off with two joints and three pieces of cable. Ignoring the joints at the far ends between the ROV and the TMS. Two of the pieces of cable are jointed to each other by a ball joint at their extremities. One piece of cable (on the cable drum side) is inside the other, picture attached. I just need to reverse the process, the problem seems to be when I try to create another slider joint, going back in the way, the slider joint is formed with one of the pieces of cable at its extremity and not in the middle. So going out it has an offset of say 5 units when it's going out and a new ball joint is created etc, but coming in at that point it has an offset of 0. I've tried setting it's minimum limit as -5 units to get it back in but it doesn't seem to want to enter the piece of cable on the far right. Hope this makes sense  Martin
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #15 on: September 06, 2010, 06:21:32 AM » |
|
Hi Mithrandir,
It seems to be semi-working, I was setting limits on the slider joint elsewhere which I've now disabled and it seems to have made a difference.
Fundamentaly do you think it sounds like it should work the way I'm doing it?
Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #16 on: September 06, 2010, 10:49:56 AM » |
|
Yes, believe it should work.
You might just do one more thing. When removing a link and adding new slider joint, the last link might be rotated. You should probably set the relative rotation between the last free link and the base to zero. When the last link is attached to the base by slider joint and the link is off the sliding axis it might create gaps in the cable.
Basically the last link should always be attached to the base the same way (both when extending and when retracting the cable). When extending, the link is always oriented properly because new links are added at specific position and without any rotation. This is not always true when removing links which are already floating around.
|
|
|
|
|
Logged
|
|
|
|
martinw
Community Member

Posts: 43
|
 |
« Reply #17 on: September 07, 2010, 05:27:56 AM » |
|
Hi Mithrandir, Good point, is there any way of setting the rotation of one object the same as another without PID? It's a bit of a pain trying to get the floating element to line up properly in my code  Martin
|
|
|
|
|
Logged
|
|
|
|
Mithrandir
Community Member

Posts: 325
|
 |
« Reply #18 on: September 07, 2010, 07:53:43 AM » |
|
True, it's pain.
But using PID or only proportional control is more natural for the engine than SetBodyRotation.
|
|
|
|
|
Logged
|
|
|
|
|