Jump to content

[Tutorial] Soft-Docking Docking Ports


curtquarquesso

Recommended Posts

Sounds like it really adds to the realism though. I have a suspicion that the ISS would explode if they forgot to undock before re-arming the docking node. :)

Actually, the explodey part happens if you re-arm the port while docked, and then try to undock, or load the vessel in orbit.

Correct procedure is:

• Extend probe on approach to target

• When docking node acquires, a soft-dock will occur.

• While soft-docked, rotate to your liking. (You may physically time warp. If you time warp on rails, the two vessels will stop colliding, and instantly dock.)

• When ready, retract probe, and allow hard-docking to occur.

• When ready, just undock. You don't need to move the probe at all. When docked, the probe is already in the retracted state, so you just leave it that way when you undock.

It's only when you undock with the probe extended that it flings your spacecraft away violently.

Link to comment
Share on other sites

Is it clipped into the craft? Infernal robotics has a nasty reputation with being deeply clipped into stuff. Otherwise it looks really cool and sounds awesome.

Yes, but telescopic extendatron needs to be partially clipped anyway. Also I have no issues with IR hinges clipped into the shuttle rear tank. So... :)

Link to comment
Share on other sites

  • 3 weeks later...
[quote name='Mods_o_joy']Also the docking ports arent showing up

[COLOR="silver"][SIZE=1]- - - Updated - - -[/SIZE][/COLOR]

Nevermind, i had everything in the wrong directory[/QUOTE]

Beale has included my revamped version of his docking ports in Tantares for testing purposes. I'll be removing my download for the present.
Link to comment
Share on other sites

[quote name='curtquarquesso'][B]Soyuz Docking Mechanism Update:[/B] (Copy/paste from the Tantares thread.)

So, I've run into a road block.

As Beale pointed out, if you do not follow instructions, and extend the probe while docked, and then undock, or load the scene in that state, the spacecraft explodes[SIZE=1] just a little...[/SIZE] Because of that possibility, I've tried to dummy-proof the docking ports. Granted, it's really not that hard to use the docking ports properly, because if you dock normally, you'll never need to extend the probe while docked, and all will be fine, but, for the sake of safety, I've tried

The verdict is complicated: In the stock Shielded Clamp-O-Tron .cfg file, there's a parameter called [FONT=Courier New]deployAnimationController = 1[/FONT] When 1 is a value for this, the docking port will not be allowed to animate while docked. In game, this is why you can't open or close the inline, Mk2, and shielded docking ports while docked.

The issue is this: This parameter activates in the acquire/magnetism stage of docking, not in the docked stage. This means, that if I enable this parameter, once you're soft-docked, you can no longer retract the probe to hard-dock. I experimented with stock Clamp-O-Trons and confirmed my suspicions.

[url]http://i.imgur.com/2BtIZePl.png[/url]

As you can see here, the docking ports are trying to dock, but the I-Beams are in the way. While they're separated, I can't close the shields in the same way I can't retract the probe on my ports. Very frustrating.

Unfortunately, without writing a crazy plugin, there are limitations within the game that make dummy-proofing the ports difficult. As soon as the ports acquire, you can't retract the probe.

I'm actually thinking about sending a message to one of the KSP devs about this. If they made the [FONT=Courier New]deployAnimationController[/FONT] activate when ACTUALLY docked, instead of when you're in the acquire stage, it could allow further development of add-on soft-docking ports.

Any thoughts?[/QUOTE]

[s]Make the port [I]start [/I]extended, maybe?

That way it won't be a problem if the animation can't be played while docked.
It would seem that would solve all problems, unless I'm missing something obvious :)[/s]

Disregard that, I missed a very important part of the post.
"This parameter activates in the acquire/magnetism stage of docking, not in the docked stage." Edited by Beale
Link to comment
Share on other sites

[quote name='NathanKell']FYI I added a bunch of bools to ModuleDockingNode, per request. That should fix the problems mentioned there, try them out. :)[/QUOTE]

Oh wow!

I'll play around, thanks! :)

New KSPFields for ref.

Edit: Gendered ports! [B]NathanKell you are a star![/B]

[spoiler="Things"]
[IMG]http://puu.sh/lqrJe/eaa20fb490.png[/IMG]
[IMG]http://puu.sh/lqrKg/979eeda738.png[/IMG]
[IMG]http://puu.sh/lqrLL/e357c26ffe.png[/IMG]
[/spoiler] Edited by Beale
Link to comment
Share on other sites

[quote name='Beale']Oh wow!

I'll play around, thanks! :)

New KSPFields for ref.

Edit: Gendered ports! [B]NathanKell you are a star![/B]

[spoiler="Things"]
[URL]http://puu.sh/lqrJe/eaa20fb490.png[/URL]
[URL]http://puu.sh/lqrKg/979eeda738.png[/URL]
[URL]http://puu.sh/lqrLL/e357c26ffe.png[/URL]
[/spoiler][/QUOTE]

Wow! those are alot of variables!
Link to comment
Share on other sites

[quote name='NathanKell']FYI I added a bunch of bools to ModuleDockingNode, per request. That should fix the problems mentioned there, try them out. :)[/QUOTE]

[quote name='Beale']Oh wow!

I'll play around, thanks! :)

New KSPFields for ref.

Edit: Gendered ports! [B]NathanKell you are a star![/B]

[spoiler="Things"]
[url]http://puu.sh/lqrJe/eaa20fb490.png[/url]
[url]http://puu.sh/lqrKg/979eeda738.png[/url]
[url]http://puu.sh/lqrLL/e357c26ffe.png[/url]
[/spoiler][/QUOTE]

Holy mother of Korolev. Ok. I had no idea there were THAT MANY new docking port parameters. I knew about gendering, and acquire angle, but this is something else... Geez. Ok. I have to figure out how all this stuff works. Beale, do you want me to dive into this, or do you already have an understanding of how some of this works? This is all looking a bit Greek, so it'll take me some time. What's the plan with your docking ports in general? They're a bit of a mess at the moment, heh. Should we move conversation to your thread, or keep it here so it's subject to a bit less, ehrm, input. :P

[B]NathanKell, you are are blessing, and a wonderful, wonderful man.[/B]
Link to comment
Share on other sites

[quote name='curtquarquesso']Holy mother of Korolev. Ok. I had no idea there were THAT MANY new docking port parameters. I knew about gendering, and acquire angle, but this is something else... Geez. Ok. I have to figure out how all this stuff works. Beale, do you want me to dive into this, or do you already have an understanding of how some of this works? This is all looking a bit Greek, so it'll take me some time. What's the plan with your docking ports in general? They're a bit of a mess at the moment, heh. Should we move conversation to your thread, or keep it here so it's subject to a bit less, ehrm, input. :P
[/QUOTE]

Hehehe, I'm no expert here it will take some experimentation.

So far, the docking ports are gendered now, but no more. If I get a chance, will play around with the anim parameters and post results in Tantares thread :)
Link to comment
Share on other sites

The anim bools are new, as are the gendered bit (and the gender), and the snaprotation/snapoffset. The min dots are all old.

snap rotation takes a bit of explaining.
You can (and you have been able to, since forever) set a min roll dot. That checks the dot product of the two docking ports' up vectors, and if < this, will refuse to dock.

The new snap terms let that occur at multiple angles, i.e. if it's set to 45 degrees, and you set a min roll dot of 0.9, then when the docking port's up axis has a dot of >0.9 with (the up axis of the target port rotated to as near as possible your up axis, in 45 degree steps), you can dock.

That is to say, old-time docking ports only allowed one acceptable orientation, when minRollDot was used. Now you can set any number of them.

The anim bools should be self-explanatory, and are what's relevant for this thread's issues.

Oh, yeah, also: node type is now a comma and/or space-delimited string
so instead of
size0
you could do
size0, size1

and it would dock with either.
Link to comment
Share on other sites

[quote name='NathanKell']The new snap terms let that occur at multiple angles, i.e. if it's set to 45 degrees, and you set a min roll dot of 0.9, then when the docking port's up axis has a dot of >0.9 with (the up axis of the target port rotated to as near as possible your up axis, in 45 degree steps), you can dock.[/QUOTE]


Awesome, gonna add these to my CBMs now!
Link to comment
Share on other sites

[quote name='NathanKell']The anim bools are new, as are the gendered bit (and the gender), and the snaprotation/snapoffset. The min dots are all old.

snip-snip

and it would dock with either.[/QUOTE]

[quote name='Beale']Oh wow!

I'll play around, thanks! :)

New KSPFields for ref.

Edit: Gendered ports! [B]NathanKell you are a star![/B]

[spoiler="Things"]
[url]http://puu.sh/lqrJe/eaa20fb490.png[/url]
[url]http://puu.sh/lqrKg/979eeda738.png[/url]
[url]http://puu.sh/lqrLL/e357c26ffe.png[/url]
[/spoiler][/QUOTE]

So, I've figured out gendering ports because it's pretty self-explanatory, but some of the animation bools I'm having trouble with.

[B]Beale,[/B] where did you actually pull those screens of the new available cfg parameters?

[B]Nathan,[/B] is there any documentation explaining any of these booleans yet? They're brand-new, so I'm assuming not. Where should I look for breakdowns of how they work? This is a side of KSP I have little experience with
Link to comment
Share on other sites

[quote name='curtquarquesso']
[B]Beale,[/B] where did you actually pull those screens of the new available cfg parameters?[/QUOTE]

Visual studio (I'm using 2010) :)

Define a new ModuleDockingNode (In a class that extends the part module / in the KSP namespace, can't quite remember which), for example.
[CODE]
[COLOR="#0000FF"]public[/COLOR] [COLOR="#008000"]ModuleDockingNode[/COLOR] _thing;
[/CODE]

Right click ModuleDockingNode -> 'Go To Definition'.

Then you can see all the config-modifiable parameters with the [KSPField] Tag.

Hope this helps :) Edited by Beale
Link to comment
Share on other sites

No docs, but they should be fairly self-explanatory, i.e. you can set the default-true bools to false to disable the existing behavior regarding animations, and then set some of the false ones to true to enable the behavior you want.
They describe the state and then whether to enable/disable the animation toggle or prevent the state movement based on animation state, for that state.
Link to comment
Share on other sites

  • 1 month later...

@NathanKell It would be great if docking ports could straighten themselves inside some reasonable margin, so if port hits the target with dot somewhere above 0.999 the craft would dock with dot 1.  It would be fairly logical, since IRL docking ports have guide petals that force them to turn into correct position.

Link to comment
Share on other sites

  • 3 weeks later...

So this is a bit unrelated but I am working on a docking port for a mod of my own and can't seem to get it to function as a docking port. This seemed like an appropriate place to ask, I downloaded your mod and looked through the files, but what you did doesn't seem any different from mine. What did you have to do to get your mod working?

I made a stock-alike Sr. Docking Port with a central door for kerbals to pass through. I got everything working except half the docking functionality. I can set all the action groups for it, and right click in-flight to "control from here" and "disable fuel feed" but not "undock" or "decouple" even though I can set them in the action groups. When I do set up the action groups they do nothing. I also cannot actually dock with them, nor do the magnets work.

 

For screenshots and more info please click below.

Reddit post

Edited by Sticky32
Link to comment
Share on other sites

2 hours ago, Sticky32 said:

So this is a bit unrelated but I am working on a docking port for a mod of my own and can't seem to get it to function as a docking port. This seemed like an appropriate place to ask, I downloaded your mod and looked through the files, but what you did doesn't seem any different from mine. What did you have to do to get your mod working?

I made a stock-alike Sr. Docking Port with a central door for kerbals to pass through. I got everything working except half the docking functionality. I can set all the action groups for it, and right click in-flight to "control from here" and "disable fuel feed" but not "undock" or "decouple" even though I can set them in the action groups. When I do set up the action groups they do nothing. I also cannot actually dock with them, nor do the magnets work.

 

For screenshots and more info please click below.

Reddit post

Can you provide a screenshot of your unity setup? (Hierarchy, placement of the dockingNode empty, collision meshes, etc.) This sound really neat, and I'd love to help!

Link to comment
Share on other sites

11 minutes ago, curtquarquesso said:

Can you provide a screenshot of your unity setup? (Hierarchy, placement of the dockingNode empty, collision meshes, etc.) This sound really neat, and I'd love to help!

Hey, thanks for taking interest. I have to leave for work now but I'll upload screenshots and unity files when I get home. What do you mean by "placement of the dockingNode empty"?

Everything other than the unity files can be found through that link in my previous comment.

Link to comment
Share on other sites

7 hours ago, curtquarquesso said:

Can you provide a screenshot of your unity setup? (Hierarchy, placement of the dockingNode empty, collision meshes, etc.) This sound really neat, and I'd love to help!

Here's all my files :)

Nevermind the obscure download site, I use it all the time, works great for small stuff like this, just be sure to only click the green "Kerbal Tubes Debug Package.zip" text.

Nevermind, I just got it working! Thanks for your help :). The empty dockingnode was the issue, had never heard of such a thing, googled it, got one hit, a link to a forum discussing this same issue, then halfway down a link to instructions on how to fix it. Here's that link.

Wouldn't have figured it out with out you! Yet no one on the entire ksp subreddit had any useful suggestions on the issue...

Edited by Sticky32
Link to comment
Share on other sites

12 hours ago, Sticky32 said:

Here's all my files :)

Nevermind the obscure download site, I use it all the time, works great for small stuff like this, just be sure to only click the green "Kerbal Tubes Debug Package.zip" text.

Nevermind, I just got it working! Thanks for your help :). The empty dockingnode was the issue, had never heard of such a thing, googled it, got one hit, a link to a forum discussing this same issue, then halfway down a link to instructions on how to fix it. Here's that link.

Wouldn't have figured it out with out you! Yet no one on the entire ksp subreddit had any useful suggestions on the issue...

Excellent! Glad it worked.
I poked through the Unity file anyway, and I have some concerns about the colliders you're using. IMO, they're far too high-poly. The docking ring should be vastly simplified. You should really just be using box colliders for that. The iris colliders seem to poke out of the ring collider when in the opened state, and they're also much too detailed. I would vastly simplify the collision meshes.

Link to comment
Share on other sites

3 hours ago, curtquarquesso said:

Excellent! Glad it worked.
I poked through the Unity file anyway, and I have some concerns about the colliders you're using. IMO, they're far too high-poly. The docking ring should be vastly simplified. You should really just be using box colliders for that. The iris colliders seem to poke out of the ring collider when in the opened state, and they're also much too detailed. I would vastly simplify the collision meshes.

Thanks for the tips, I was wondering why the collision mesh seemed larger in-game when it was open. I lowered the poly counts of the colliders and remade the iris coliders so they match the animation exactly. I would be using box coliders but they don't provide the definition I need for something like this. I had to split the ring up into little pieces and use separate pieces for the iris so that the game sees it as hollow instead of just a solid object. I'll release them in the next update and try to improve the textures a bit.

Link to comment
Share on other sites

On 10/20/2015 at 1:50 PM, curtquarquesso said:

These are beta parts for the Tantares add on, so you're going to put them in the Tantares folder. Make sure it's installed. It's required. Place in Tantares/Parts/SOYUZ. I'll clarify in the front page.

Remember, this is really a demo of the whole idea of soft docking in general. The parts matter not really. I want to see if it's useful, if people like it, and more importantly, if it causes any grief that would make it a bad idea for add-on authors to implement in their own docking port designs.

Is there a way to make this work for the stock docking ports?

Edited by mattssheep4
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...