Jump to content

[1.9.*, 1.10.*, 1.11.*] DockRotate - lightweight robotics - rotational control on docking ports (plus NodeRotate, make any part rotate)


peteletroll

Recommended Posts

2 minutes ago, Geonovast said:

Ok, this is what I was thinking.  I just had my terms confused.  They look to be the same size, I'm pretty sure they're stock models using different textures.  nodeType is what's different, and this is where I got size from.

Stock:

    MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        nodeType = size1
        stagingEnabled = False
    }

Konstruction:

MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        nodeType = ConSize1
        stagingEnabled = False
        snapRotation = true  
        snapOffset = 90     
        acquireForce = 2
        acquireTorque = 2
        acquireTorqueRoll = 2    
    }

 

If you change the nodeType on a stock docking port to its Konstruction counterpart's value, they'll dock together.  They won't be able to weld.

Here's a quick docking test.  Clamp-O-Tron Construction Port is untouched.

Inline Clamp-O-Tron Const is the stock inline docking port with the nodeType changed to ConSize1 from size1.  If you try to compress, you just get that error.

screenshot644.png

Partially right.  You can dock and undock them as many time as you like, using the forced rotation each time.  You can only weld them once, because it actually removes both ports from the ship when you do.  I did the above test so I could start using Konstruction port exclusively and still be able to dock the inline ones to them.


Why did you edit the inline clamp-o-tron?

Also, I think you're not properly understanding me. I realize that you can only weld them once (for obvious reasons). My point is that based on experience, once you undock the Konstruction port, you can't use it to dock to another port (unless something bugged out on my end, but I doubt it). With that in mind, unless you dock perfectly each time, you'd need this mod to accurately dock things before welding them.

Link to comment
Share on other sites

6 minutes ago, Grenartia said:

Why did you edit the inline clamp-o-tron?

So I could dock it to Konstruction ports.  I didn't want to mess with the Konstruction port config just in case the weld plugin needed a specific nodeType name.

6 minutes ago, Grenartia said:

My point is that based on experience, once you undock the Konstruction port, you can't use it to dock to another port

Not immediately, but that's what the Reset Acquire button is for.  Admittedly, that button can be buggy and sometimes needs to be mashed a few times.  I redock Konstruction ports all the time.  I do agree with you though, this plugin being compatible with them would be a huge improvement. 

Edited by Geonovast
Link to comment
Share on other sites

8 minutes ago, Geonovast said:

So I could dock it to Konstruction ports.  I didn't want to mess with the Konstruction port config just in case the weld plugin needed a specific nodeType name.

No immediately, but that's what the Reset Acquire button is for.  Admittedly, that button can be buggy and sometimes needs to be mashed a few times.  I redock Konstruction ports all the time.  I do agree with you though, this plugin being compatible with them would be a huge improvement. 

I mean, you could have docked the Konstruction port to the stock port without changing anything, at least I've managed to do it. 

Fair enough about the Reset Acquire button, though.

Link to comment
Share on other sites

1 minute ago, Grenartia said:

I mean, you could have docked the Konstruction port to the stock port without changing anything, at least I've managed to do it. 

Fair enough about the Reset Acquire button, though.

I never actually tried, but it's specifically mentioned in the Konstruction thread that it was written in a way to prevent that.

 

Link to comment
Share on other sites

@peteletroll, great mod thanks!

Would a future release utilise some form of alignment function, as when docking at say 89.5, you could align to the nearest 1 degree?

Also, do you have a way to make an IVA rotate as well?

Regardless of these two requests/issues, I like this very much!

Peace.

Edited by theJesuit
Link to comment
Share on other sites

A quick update: I'm working on extending DockRotate to all small docking ports, shielded and inline. This means I'm learning a lot about Unity transforms. And I'm having a lot of fun doing it. See the GitHub repository for proof. We KSP people like hard things. Stay tuned, and happy Sunday!

wsznroX.jpg

Edited by peteletroll
Added image
Link to comment
Share on other sites

On 2/11/2018 at 7:09 AM, peteletroll said:

A quick update: I'm working on extending DockRotate to all small docking ports, shielded and inline. This means I'm learning a lot about Unity transforms. And I'm having a lot of fun doing it. See the GitHub repository for proof. We KSP people like hard things. Stay tuned, and happy Sunday!

wsznroX.jpg


What about the Senior ports?

Link to comment
Share on other sites

On 2/8/2018 at 2:08 PM, theJesuit said:

That says exactly what it means. :)

Peace.

For me, a small issue with "snap" is that the wording is often used when the user knows or sees the value, increment, edge, guide (etc.) something is being snapped to - as in the editor, where symmetry "snap" is shown in degrees. When you use the "Rotate to Snap" button, it's not obvious what the mod considers "snap" - what does it actually try to do? Round up or down to the nearest 1 degree and rotate there? nearest 5? nearest 90?

Link to comment
Share on other sites

1 hour ago, AccidentalDisassembly said:

Round up or down to the nearest 1 degree and rotate there? nearest 5? nearest 90?

It rotates to the closest multiple of the rotation step.

 

2 hours ago, Grenartia said:

What about the Senior ports?

They will be worked on too. The plan is:

1. Support all tiny and small ports;

2. Publish on CKAN;

3. Work on Sr.

Link to comment
Share on other sites

Feeling like bragging about my reference system change utilities: much shorter and readable than obscure sequences of TransformDirection() and InverseTransformDirection().

https://github.com/peteletroll/DockRotate/blob/807366d9b045cc54b12a24251d1f2f2854c4afbf/DockRotate/DockRotate.cs#L717

Edited by peteletroll
spelling
Link to comment
Share on other sites

On 2/15/2018 at 4:34 AM, peteletroll said:

Feeling like bragging about my reference system change utilities: much shorter and readable than obscure sequences of TransformDirection() and InverseTransformDirection().

https://github.com/peteletroll/DockRotate/blob/807366d9b045cc54b12a24251d1f2f2854c4afbf/DockRotate/DockRotate.cs#L717

What does this mean, for those of us who don't speak programmer?

Link to comment
Share on other sites

Great mod!

But a bit cheaty for my taste. :P

On the other hand, I see huge potential for more realism here. Stock docking module has angle restrictions.  You can see my MM patch here under "Angled Docking Ability":

But stock does not snap, it only restricts ranges at which docking can occur. So if you set a 1 degree margin and dock at 0.7 degree offset, that's it, your ship is twisted by 0.7 degrees. If you set a very thin margin, it becomes near impossible to dock. Mechanically it does not make much sense, since IRL docking latches would probably do the actual snapping-to-correct-angle work.

So, my suggestion: realism mode. If a port has stock snapping enabled, disable arbitrary rotation, but autocorrect angle upon docking. This would make possible to set wider magin in captureMinRollDot. (i wonder if multiport docking would work if actual docking occurred with ports misaligned and corrected later). Maybe a separate angle autocorrector module? It could be assigned via MM on parts that have 'snapRotation = true'.

Link to comment
Share on other sites

@Psycho_zs, the alignment function of DockRotate is basically a byproduct of the original concept of rotating docking ports. What I wanted to have was a very simple way to move stuff.

I could easily disable the rotation when snapRotation is true, and leave only the "rotate to snap" option active. But your patch sets snapRotation to true for all ports, so it would be impossible to use the module in the intended way.

Edited by peteletroll
typo
Link to comment
Share on other sites

I thought more of non-interactive mandatory "rotate to snap" in case of restricted ports. My patch is just an example of stock feature usage.

You have a module that gives ability to rotate nodes. It has enormous potential if its usage would be determined by MM patches.

Consider a couple of changes to the module:

  • add 'rotateNode' parameter that would allow to manually select a specific node of the part. By default it would get value from ModuleDockingNode/referenceAttachNode if present.
  • If part has ModuleDockingNode/snapRotation = true, rotation would become non-interactive automatic snapping to the nearest ModuleDockingNode/snapOffset simulating a realistic docking port.

Default patch would do just what it does now: add free rotation ability to docking ports.

But more advanced usage would be possible by adding optional MM patches. Like making realistic docking ports, or creating re-purposed parts for acting like rotational actuators. I would gladly use a patch to copy FL-A10 Adapter and turn it into a rotating base by applying ModuleDockRotate with rotateNode=bottom.

 

Link to comment
Share on other sites

@Psycho_zs, your suggestion of generalizing the rotation capabilities is actually intriguing: it could help a lot of part designers to come up with new things. There's still much to do though: mostly the correct handling of autostruts. Without proper autostrut management, any kind of moving part can be made useless by a landing leg.

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...