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

7 hours ago, Atlas Gaming said:

Sweet! Looking forward to kOS control once they release the patch that makes kOS not work with wind tunnel.

That's a weird way to phrase it.  kOS not working with Wind Tunnel is *already* how it is.

I think you added a "not" in there by accident that flipped the meaning.

Also, just to make it clear, getting an update to kOS that has this fixed *still* doesn't mean you'd have a working Wind Tunnel mod.  The problem happened because Wind Tunnel's DLL file won't load in KSP 1.7, and kOS can be broken by any other mod's DLL failing to load because I didn't know how weirdly Microsoft implemented its reflection GetTypes() call (When a DLL didn't load one of its classes, GetTypes() still works anyway but it does so by throwing an exception and moving its return value into that exception's fields instead).

Link to comment
Share on other sites

I'm adding surface attachment capabilities to NodeRotate. @Psycho_zs, @Tonka Crash, @fitemesquirrel, you may be interested. Expect release soon™.

For the brave, here's a test dll: https://drive.google.com/file/d/1WjvK77zCTImkXsdbXjijFUnYX0ycGtB8/view?usp=sharing

Use "rotatingNodeName = srfAttach" in the ModuleNodeRotate configuration to move the surface attachment joint.

Edited by peteletroll
added link to test dll
Link to comment
Share on other sites

Hm, surface attachment is tricky... now rotation works only when you attach the NodeRotate part to another part, so the NodeRotate part srfAttach node connects to the surface of the other part. If you attach the other part to the NodeRotate part, then the srfAttach node of the other part connects to the surface of the NodeRotate part, and the srfAttach node of the NodeRotate part stays unconnected and can't rotate. Back to the drawing board...

Edited by peteletroll
phrasing
Link to comment
Share on other sites

36 minutes ago, peteletroll said:

Hm, surface attachment is tricky... now rotation works only when you attach the NodeRotate part to another part, so the NodeRotate part srfAttach node connects to the surface of the other part. If you attach the other part to the NodeRotate part, then the srfAttach node of the other part connects to the surface of the NodeRotate part, and the srfAttach node of the NodeRotate part stays unconnected and can't rotate. Back to the drawing board...

ugghhh... my head hurts after trying to logic that out... lol
I'm glad youre smarter than I am... :P

Link to comment
Share on other sites

I'll find a way to fix it, @Stone Blue! The real problem is that when you dock/undock stuff, the root part moves and you can find your rotating joint reversed. THAT'll be hard to debug... ;.;

I think it's worth it though. Rotating surface attachments open a lot of possibilities. Like, adjustable AoA wings...

Edited by peteletroll
Link to comment
Share on other sites

Defintely worth the possibilities... ;)
I've been keeping an eye on this, as well as Katten's AnimatedAttachment mod. ;)

Actually, speaking of which, @peteletroll , do you forsee any conflicts or issues with running both mods at the same time? ... not necessarily on the same *nodes*, tho... lol
But just having them in-game together?

Link to comment
Share on other sites

14 minutes ago, Stone Blue said:

do you foresee any conflicts or issues with running both mods at the same time?

Best way to know is to try. If motions of the two modules don't overlap themselves in time (i.e. never happen at the same time) and in parts (i.e. no part moves because of a combination of DR and AA motion), there could be no conflict. If @Katten is available and willing to discuss it, I'm here! There's a lot of subtleties involved in moving vessel parts... and at the moment, one mod to debug is enough for me :P

Edited by peteletroll
Link to comment
Share on other sites

6 hours ago, peteletroll said:

Hm, surface attachment is tricky... now rotation works only when you attach the NodeRotate part to another part, so the NodeRotate part srfAttach node connects to the surface of the other part. If you attach the other part to the NodeRotate part, then the srfAttach node of the other part connects to the surface of the NodeRotate part, and the srfAttach node of the NodeRotate part stays unconnected and can't rotate. Back to the drawing board...

Everything you described is perfectly logical and expected, I see no problem here.

Never mind, I forgot about possible reroots in flight.

Edited by Psycho_zs
Link to comment
Share on other sites

Are you sure about this?  *** ) DockRotate can be compatible with Kerbal Joint Reinforcement: 

I had to remove KJR because it broke DockRotate just a week ago. The same truss which was in the video I did above just broke apart with KJR installed.

Link to comment
Share on other sites

I followed the instructions and added the exception lines in KJR config. I can confirm that it does NOT work and makes the Dock part start rotating and fall out of its attachment. 

 

<?xml version="1.0" encoding="UTF-8"?>

-<config>

<bool name="reinforceAttachNodes">1</bool>

<bool name="multiPartAttachNodeReinforcement">1</bool>

<bool name="reinforceDecouplersFurther">1</bool>

<bool name="reinforceLaunchClampsFurther">1</bool>

<bool name="clampJointHasInfiniteStrength">1</bool>

<bool name="useVolumeNotArea">1</bool>

<bool name="debug">0</bool>

<float name="angularDriveSpring">5e12</float>

<float name="angularDriveDamper">25</float>

<float name="angularMaxForceFactor">-1</float>

<float name="decouplerAndClampJointStrength">-1</float>

<float name="breakForceMultiplier">1</float>

<float name="breakTorqueMultiplier">1</float>

<float name="breakStrengthPerArea">1500</float>

<float name="breakTorquePerMOI">6000</float>

<float name="massForAdjustment">0.01</float>

<float name="upperMassForLockedJoint">0</float>

<string name="exemptPartType0">MuMechToggle</string>

<string name="exemptPartType1">MuMechServo</string>

<string name="exemptModuleType0">WingManipulator</string>

<string name="exemptModuleType1">SingleGroupMan</string>

<string name="exemptModuleType2">KerbalEVA</string>

<string name="exemptModuleType3">MuMechToggle</string>

<string name="exemptModuleType4">ModuleKerbetrotterHitch</string>

<string name="exemptModuleType5">ModuleGrappleNode</string>

<string name="exemptModuleType6">ModuleDockRotate</string>

<string name="decouplerStiffeningExtensionType0">ModuleEngines</string>

<string name="decouplerStiffeningExtensionType1">ModuleEnginesFX</string>

<string name="decouplerStiffeningExtensionType2">ModuleHybridEngine</string>

<string name="decouplerStiffeningExtensionType3">ModuleHybridEngines</string>

<string name="decouplerStiffeningExtensionType4">ModuleEngineConfigs</string>

<string name="adecouplerStiffeningExtensionType5">ModuleDecouple</string>

<string name="adecouplerStiffeningExtensionType6">ModuleAnchoredDecoupler</string>

<string name="adecouplerStiffeningExtensionType7">ProceduralFairingBase</string>

<float name="stiffeningExtensionMassRatioThreshold">5</float>

</config>

Edited by Atlas Gaming
update
Link to comment
Share on other sites

@Atlas Gaming, could you please try replacing ModuleDockRotate with ModuleBaseRotate in KJR's config.xml?

EDIT: From what I can see from your video, you use NodeRotate parts, so you should add ModuleNodeRotate to the exemptions too. But both ModuleDockRotate and ModuleNodeRotate inherit from ModuleBaseRotate, so this could be enough.

Edited by peteletroll
Link to comment
Share on other sites

3 hours ago, peteletroll said:

@Atlas Gaming, I'm not a KJR user myself, but many people reported in this forum page DockRotate working with KJR when configured. There's many KJR forks now, so the situation is more complex. I suggest you to ask on your KJR forum page for advice.

How does Dock Rotate work with Autostruts?

I find the FullAutoStrut mod to be a simple alternative to KJR?

Link to comment
Share on other sites

I have a request for two modes to be added.

-Constant rotation: Once a rate and direction is set, the Port will keep spinning until stopped. Would be great for making rotating stations.

-Free wheeling / spinning: No setting supplied, yet allows the Port to move or twist freely. Would be good for Harvester ships attached to Asteroids by allowing the Load to rotate independently of the craft.

Side note: None of the DR feature cost EC's to maneuver the Ports, IMO this should be considered.

 

Link to comment
Share on other sites

1 hour ago, Redacted said:

 

-Constant rotation: Once a rate and direction is set, the Port will keep spinning until stopped. Would be great for making rotating stations.

This is already a thing. You just have to set the rotation step to zero and it'll spin until you tell it to stop.

Link to comment
Share on other sites

1 hour ago, Redacted said:

Free wheeling / spinning

It will happen. But this involves joint manipulation I'm not experienced with yet.

1 hour ago, Redacted said:

None of the DR feature cost EC's to maneuver the Ports

Actually it does. It's very primitive: rotating joints consume a fixed amount of energy per second, regardless of the actual torque they produce. I experimented with ConfigurableJoint.currentTorque, but it was always zero. Currently, rotating joints consume 1EC/s, but this can be changed via the electricityRate parameter in the cfg file. I realize this is very low, so it may be unnoticeable. I could make it proportional to part mass (a heavier engine consumes more energy), I'm open to suggestions!

47 minutes ago, RealKerbal3x said:

This is already a thing. You just have to set the rotation step to zero and it'll spin until you tell it to stop.

I should find a way to make it more visible in the UI, without cluttering the PAW too much...

Edited by peteletroll
Link to comment
Share on other sites

  • 2 weeks later...

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