peteletroll

[1.7.*, 1.6.*, 1.5.*, 1.4.*] DockRotate - lightweight robotics - rotational control on docking ports (plus NodeRotate, make any part rotate)

Recommended Posts

I've tested with debug dll.

Most of the time autosnap works fine, but sometimes something fails, angle is reported as NaN, and angle is not autocorrected.

eosIZ1J.png

A couple of successful dockings, last one produced NaN.

Spoiler

# successful dockings
[LOG 19:57:01.241] [DR:d:54019] JM:-1220114:dockingPort2:4272916510:Host>dockingPort2:964508452:None.updateOrgRot(): 0.02797646°
[LOG 19:57:01.241] [DR:d:54019] MDR:dockingPort2:964508452:Target.doSetup(): joint PJ:dockingPort2:4272916510:Host>dockingPort2:964508452:Target
[LOG 19:57:01.241] [DR:d:54019] JM:-1220114:dockingPort2:4272916510:None>dockingPort2:964508452:Target.updateOrgRot(): 0.02797646°
[LOG 19:57:01.241] [DR:d:54019] MDR:dockingPort2:4272916510:Host.doSetup(): joint PJ:dockingPort2:4272916510:Host>dockingPort2:964508452:Target
[LOG 19:57:01.264] [DR:d:54020] V:964508452:dockingPort2.KJRNextCycleAllAutoStrut()
[LOG 19:57:01.264] [DR:d:54020] JM:-1220114:dockingPort2:4272916510:Host>dockingPort2:964508452:Target: enqueueRotation((0.00, 1.00, 0.00), -0.0280°, 5°/s, 0°/s), added
[LOG 19:57:01.264] [DR:d:54020] MDR:dockingPort2:4272916510:Host.updateFrozenRotation(CHECK): (0.0, 5.0, 0.0) -> (0.0, 0.0, 0.0)
[LOG 19:57:01.265] [DR:d:54020] V:964508452:dockingPort2.KJRNextCycleAllAutoStrut()
[LOG 19:57:01.492] [DR:d:54027] JM:-1220114:dockingPort2:4272916510:Host>dockingPort2:964508452:Target.updateOrgRot(): 0°
[LOG 19:57:01.492] [DR:d:54027] P:dockingPort2:4272916510:Host: rotation stopped [1], 0.22 electricity
[LOG 19:57:01.514] [DR:d:54028] JM:-1220114:dockingPort2:4272916510:Host>dockingPort2:964508452:Target: removing rotation (done)
[LOG 19:57:01.514] [DR:d:54028] VMM:-1204700:964508452:dockingPort2: securing autostruts
[LOG 19:57:01.514] [DR:d:54028] V:964508452:dockingPort2.KJRNextCycleAllAutoStrut()
[LOG 19:57:01.514] [DR:d:54028]     ... .KJRNextCycleAllAutoStrut()
[LOG 19:57:34.081] [DR:d:55498] DockRotate.VesselMotionManager+StructureChangeInfo.isRepeated(): set Part after reset BeforeChange
[LOG 19:57:34.081] [DR:d:55498]     ... .reset() BeforeChange after Part
[LOG 19:57:34.174] [DR:d:55499] JM:-1220114:null.OnDestroy()
[LOG 19:57:45.015] [DR:d:55965] DockRotate.VesselMotionManager+StructureChangeInfo.isRepeated(): set Ids after reset BeforeChange
[LOG 19:57:45.015] [DR:d:55965]     ... .reset() BeforeChange after Ids
[LOG 19:57:45.015] [DR:d:55965]     ... .isRepeated(): repeated JointUpdate after reset BeforeChange
[LOG 19:57:45.015] [DR:d:55965]     ... .isRepeated(): repeated Action after reset BeforeChange
[LOG 19:57:45.045] [DR:d:55965] JointMotion.get(): created JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:None
[LOG 19:57:45.046] [DR:d:55965] JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:None.updateOrgRot(): -57.68753°
[LOG 19:57:45.046] [DR:d:55965] MDR:dockingPort2:964508452:Target.doSetup(): joint PJ:dockingPort2:4272916510:Host>dockingPort2:964508452:Target
[LOG 19:57:45.046] [DR:d:55965] JM:-1230154:dockingPort2:4272916510:None>dockingPort2:964508452:Target.updateOrgRot(): -57.68753°
[LOG 19:57:45.046] [DR:d:55965] MDR:dockingPort2:4272916510:Host.doSetup(): joint PJ:dockingPort2:4272916510:Host>dockingPort2:964508452:Target
[LOG 19:57:45.046] [DR:d:55965]     ... .autoSnapStep() = 30 from snapOffset
[LOG 19:57:45.047] [DR:d:55965]     ... .autoSnapStep() = 30
[LOG 19:57:45.047] [DR:d:55965] MDR:dockingPort2:964508452:Target.autoSnapStep() = 30 from snapOffset
[LOG 19:57:45.047] [DR:d:55965]     ... .autoSnapStep() = 30
[LOG 19:57:45.047] [DR:d:55965] JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:Target: autosnap at 30
[LOG 19:57:45.047] [DR:d:55965] MDR:dockingPort2:4272916510:Host.enqueueFrozenRotation(): (0, 0, 0) -> (-2.31, 5.00, 0.00)
[LOG 19:57:45.224] [DR:d:55965] JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:None.updateOrgRot(): -57.68753°
[LOG 19:57:45.224] [DR:d:55965] MDR:dockingPort2:964508452:Target.doSetup(): joint PJ:dockingPort2:4272916510:Host>dockingPort2:964508452:Target
[LOG 19:57:45.224] [DR:d:55965] JM:-1230154:dockingPort2:4272916510:None>dockingPort2:964508452:Target.updateOrgRot(): -57.68753°
[LOG 19:57:45.224] [DR:d:55965] MDR:dockingPort2:4272916510:Host.doSetup(): joint PJ:dockingPort2:4272916510:Host>dockingPort2:964508452:Target
[LOG 19:57:45.262] [DR:d:55966] V:964508452:dockingPort2.KJRNextCycleAllAutoStrut()
[LOG 19:57:45.263] [DR:d:55966] JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:Target: enqueueRotation((0.00, 1.00, 0.00), -2.3125°, 5°/s, 0°/s), added
[LOG 19:57:45.263] [DR:d:55966] MDR:dockingPort2:4272916510:Host.updateFrozenRotation(CHECK): (-2.3, 5.0, 0.0) -> (0.0, 0.0, 0.0)
[LOG 19:57:45.263] [DR:d:55966] V:964508452:dockingPort2.KJRNextCycleAllAutoStrut()
[LOG 19:57:47.217] [DR:d:56048] JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:Target.updateOrgRot(): -60°
[LOG 19:57:47.217] [DR:d:56048] P:dockingPort2:4272916510:Host: rotation stopped [1], 1.94 electricity
[LOG 19:57:47.233] [DR:d:56049] JM:-1230154:dockingPort2:4272916510:Host>dockingPort2:964508452:Target: removing rotation (done)
[LOG 19:57:47.233] [DR:d:56049] VMM:-1204700:964508452:dockingPort2: securing autostruts
[LOG 19:57:47.233] [DR:d:56049] V:964508452:dockingPort2.KJRNextCycleAllAutoStrut()
[LOG 19:57:47.233] [DR:d:56049]     ... .KJRNextCycleAllAutoStrut()
[LOG 19:58:59.463] [DR:d:59245] DockRotate.VesselMotionManager+StructureChangeInfo.isRepeated(): set Part after reset BeforeChange
[LOG 19:58:59.464] [DR:d:59245]     ... .reset() BeforeChange after Part
[LOG 19:58:59.556] [DR:d:59246] JM:-1230154:null.OnDestroy()


# final docking
[LOG 19:59:17.201] [DR:d:60014] DockRotate.VesselMotionManager+StructureChangeInfo.isRepeated(): set Ids after reset BeforeChange
[LOG 19:59:17.201] [DR:d:60014]     ... .reset() BeforeChange after Ids
[LOG 19:59:17.201] [DR:d:60014]     ... .isRepeated(): repeated JointUpdate after reset BeforeChange
[LOG 19:59:17.201] [DR:d:60014]     ... .isRepeated(): repeated Action after reset BeforeChange

 

I was able to reproduce it only a couple of times, most attempts were successful.

Share this post


Link to post
Share on other sites

By the way, @Psycho_zs, when the angle is NaN It means that DockRotate thinks the port is not docked. What happens if you time warp or save/reload in this case?

 

Share this post


Link to post
Share on other sites

Timewarp does nothing.  Upon loading a quicksave everything goes back to normal and angle correction happens.

Share this post


Link to post
Share on other sites

Just tried with a clean game, same.

It seems the game does not report docking. 7:39:12 messages are from successful proper docking, with the first message here from stock game, I presume. Then just silence, despite a couple of dockings happened since.

[LOG 07:39:12.491] Docking to vessel Docktest
[LOG 07:39:12.493] [DR:d:13108] DockRotate.VesselMotionManager+StructureChangeInfo.isRepeated(): set Ids after 
[LOG 07:39:12.493] [DR:d:13108]     ... .reset() BeforeChange after Ids
[LOG 07:39:12.493] [DR:d:13108]     ... .isRepeated(): set Ids after reset BeforeChange
[LOG 07:39:12.494] [DR:d:13108]     ... .reset() BeforeChange after Ids
[LOG 07:39:12.494] [DR:d:13108]     ... .isRepeated(): repeated JointUpdate after reset BeforeChange
[LOG 07:39:12.494] [DR:d:13108]     ... .isRepeated(): repeated JointUpdate after reset BeforeChange
[LOG 07:39:12.497] [DR:d:13108]     ... .isRepeated(): repeated Action after reset BeforeChange
[LOG 07:39:12.499] [DR:d:13108]     ... .isRepeated(): repeated Action after reset BeforeChange
[LOG 07:39:12.511] [DR:d:13108] JointMotion.get(): created JM:-463244:dockingPort2:1929589575:None>dockingPort2:1321144049:None
[LOG 07:39:12.511] [DR:d:13108] JM:-463244:dockingPort2:1929589575:None>dockingPort2:1321144049:None.updateOrgRot(): -0.04845664°
[LOG 07:39:12.512] [DR:d:13108] MDR:dockingPort2:1321144049:Target.doSetup(): joint PJ:dockingPort2:1929589575:None>dockingPort2:1321144049:Target
[LOG 07:39:12.512] [DR:d:13108] JM:-463244:dockingPort2:1929589575:None>dockingPort2:1321144049:Target.updateOrgRot(): -0.04845664°
[LOG 07:39:12.512] [DR:d:13108] MDR:dockingPort2:1929589575:Host.doSetup(): joint PJ:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target
[LOG 07:39:12.512] [DR:d:13108]     ... .autoSnapStep() = 30 from snapOffset
[LOG 07:39:12.513] [DR:d:13108]     ... .autoSnapStep() = 30
[LOG 07:39:12.513] [DR:d:13108] MDR:dockingPort2:1321144049:Target.autoSnapStep() = 30 from snapOffset
[LOG 07:39:12.513] [DR:d:13108]     ... .autoSnapStep() = 30
[LOG 07:39:12.513] [DR:d:13108] JM:-463244:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target: autosnap at 30
[LOG 07:39:12.514] [DR:d:13108] MDR:dockingPort2:1929589575:Host.enqueueFrozenRotation(): (0, 0, 0) -> (0.05, 5.00, 0.00)
[LOG 07:39:12.515] Camera Mode: AUTO
[LOG 07:39:12.519] [DR:d:13108] JM:-463244:dockingPort2:1929589575:Host>dockingPort2:1321144049:None.updateOrgRot(): -0.04845664°
[LOG 07:39:12.519] [DR:d:13108] MDR:dockingPort2:1321144049:Target.doSetup(): joint PJ:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target
[LOG 07:39:12.519] [DR:d:13108] JM:-463244:dockingPort2:1929589575:None>dockingPort2:1321144049:Target.updateOrgRot(): -0.04845664°
[LOG 07:39:12.519] [DR:d:13108] MDR:dockingPort2:1929589575:Host.doSetup(): joint PJ:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target
[LOG 07:39:12.647] [DR:d:13109] V:1889886728:probeStackSmall.KJRNextCycleAllAutoStrut()
[LOG 07:39:12.658] [DR:d:13109] JM:-463244:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target: enqueueRotation((0.00, 1.00, 0.00), 0.0485°, 5°/s, 0°/s), added
[LOG 07:39:12.658] [DR:d:13109] MDR:dockingPort2:1929589575:Host.updateFrozenRotation(CHECK): (0.0, 5.0, 0.0) -> (0.0, 0.0, 0.0)
[LOG 07:39:12.660] [DR:d:13109] V:1889886728:probeStackSmall.KJRNextCycleAllAutoStrut()
[LOG 07:39:12.919] [DR:d:13118] JM:-463244:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target.updateOrgRot(): 0°
[LOG 07:39:12.919] [DR:d:13118] P:dockingPort2:1929589575:Host: rotation stopped [1], 0.26 electricity
[LOG 07:39:12.950] [DR:d:13119] JM:-463244:dockingPort2:1929589575:Host>dockingPort2:1321144049:Target: removing rotation (done)
[LOG 07:39:12.950] [DR:d:13119] VMM:-437648:1889886728:probeStackSmall: securing autostruts
[LOG 07:39:12.951] [DR:d:13119] V:1889886728:probeStackSmall.KJRNextCycleAllAutoStrut()
[LOG 07:39:12.951] [DR:d:13119]     ... .KJRNextCycleAllAutoStrut()
[LOG 07:39:15.239] [AsteroidSpawner]: No new objects this time. (Odds are 1:2)
[LOG 07:39:22.865] [DR:d:13435] DockRotate.VesselMotionManager+StructureChangeInfo.isRepeated(): set Part after reset BeforeChange
[LOG 07:39:22.865] [DR:d:13435]     ... .reset() BeforeChange after Part
[LOG 07:39:22.934] [DR:d:13436] JM:-463244:null.OnDestroy()
[LOG 07:39:29.570] [PlanetariumCamera]: Focus: Docktest

 

Share this post


Link to post
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.