Jump to content

[WIP] Infernal Robotics - Next


Rudolf Meier

Recommended Posts

21 minutes ago, Rudolf Meier said:

then it crashes... but I don't know yet who's doing the calculation that crashes... 

One of those nasty things that is hard to narrow down. Maybe it would be necessary to add some more writtings in log on both, IR and tweakscale code. To find out exact command that is witten last in log just before crash. Probably just temporary additional logs that would not be needed anymore once you nail culprit, but would be hard to find it without it. And adding those additional loging lines in code can be tedious and time consuming too, but can't give you better advice than that.

Link to comment
Share on other sites

26 minutes ago, Rudolf Meier said:

When a model scales down (localScale) to < 0.25 then it crashes... but I don't know yet who's doing the calculation that crashes...

This is a bit vague, but I seem to remember a long time ago that scales above 4x also caused problems with IR, possibly because of node sizing, or something... or node number after a particular node size? Perhaps there's something with dividing by or multiplying by 4 somewhere... probably not helpful, but who knows!

Link to comment
Share on other sites

2 hours ago, Rudolf Meier said:

When a model scales down (localScale) to < 0.25 then it crashes... but I don't know yet who's doing the calculation that crashes...

NaN can be issued by division by zero. Check first anything that is being used to divide something.

My guess is a rounding error somewhere. Too small numbers can suffer underflows, and they are very common when using floats instead of doubles.

Edited by Lisias
forum bug!
Link to comment
Share on other sites

1 minute ago, Lisias said:

NaN can be issued by division by zero. Check first anything that is being used to divide something.

My guess is a rounding error somewhere. Too small numbers can suffer underflows, and they are very common when using floats instead of doubles.

Yes, and my guess is, that it's inside the KSP code... that will be a little bit difficult to find...

Link to comment
Share on other sites

3 hours ago, kcs123 said:

Partly due to tweakscale, partly due to new IR code

It's not cleat at this time what code is really suffering or causing the problem. There's a chance that the code would be all right in the algorithm, but is suffering a float point idiosyncrasy .

See my previous post.

3 minutes ago, Rudolf Meier said:

Yes, and my guess is, that it's inside the KSP code... that will be a little bit difficult to find...

Probably. But we could do a good educated guess, and then try a workaround on the code to overcome it.

One thing that I think TweakScale lacks is a metadata that would tell the code when a number should not be negative, not zero, etc - and his happening, plain refuses to scale the part and that's it.

It's essentially that Sanity Checks I'm implementing on the DryCostWrite on the prefab, but on runtime this time.

But without metadata, such stunt can cause as much harm as the problem. Still thinking on this specific problem, by the way.

Link to comment
Share on other sites

Hello, I am new to KSP and modding. I have KSP version 1.7 and have been trying to get Infernal Robots working. I first installed the version here but couldn't get it running: 

Even when I followed the directions on the post saying to install a recompiled .dll

The, I found Infernal Robotics - Next version in this topic and installed it and the Infernal Robotics Sequencer. This worked and now IR shows up in my game however there are only 2 parts. Did I miss a download? Should I wait for a 1.7 update?

 

 

 

 

 

Link to comment
Share on other sites

Hello again :)

I have also a savegame, vehicle and procedure to consistently trigger the bug (at least in my setup). Interested?

Also I did some research myself ... or let's say poking around with a stick in complete darkness. ^^
For whatever magical reason, the referenceBody of the vessel changes to the sun! Something (another mod? the game?) wants to recalculate the orbit and finishes with a recalculated orbit for the sun (which is all NaN).

Spoiler

[LOG 20:02:44.880] recalculating orbit for mk2Cockpit.Standard: Kerbin ( Update mode TRACK_Phys )
rPos: [-277790.089960787, 1.37974952571073, 580172.697083754]   rVel: [-1909.90253950091, -0.207168568789447, -1119.56931618038] |2213.85708821582|
[LOG 20:02:44.880] recalculated orbit for mk2Cockpit.Standard: Sun ( UT: 11750688.0237838 )
rPos: [NaN, NaN, NaN]   rVel: [NaN, NaN, NaN] |NaN|
Delta: [NaN, NaN, NaN] / [NaN, NaN, NaN]
[ERR 20:02:44.885] Infinity or NaN floating point numbers appear when calculating the 

Also sometimes i see some of the servos moving right before the crash (like 1s within). maybe it is always the case, and it is only visible sometimes (because the vessel disappears).

 

Sorry if these are old news/informations for you ;)

Link to comment
Share on other sites

@stargazer424

Did you try a fresh reinstall after changing to the next version? (remove the old folder before extracting the next version). As Rudolf stated in the first post, they are not compatible.
Also note: there is also a next version of the sequencer linked some pages before. Did you use that? Look here

I directly started with the next versions and could use it directly without a problem (well, at least before i tried to warp *g*)

Link to comment
Share on other sites

@FragtalityI figured out my "problem".  As I said I got the IR Next version working but only saw 2 parts.  I didn't know that the parts were Technology Tree dependent! LOL! I only saw 2 parts because they were from tech that I already unlocked! I went into a Sandbox game and they were all there! 

Thanks anyway! Now for more science so I can get the other parts!

Edited by stargazer424
Link to comment
Share on other sites

I made som progress. The calculation of the positions should (could ?) work now. Under normal conditions... but sometimes after loading everything is strangely turned into completely wrong directions. I did see this only after loading, not while warping. I'm now working on this one...

... oh, cool. I'm behaving like a Kerbal already... "calculate value... throw away... use uninitialized variable" ... and, never forget step 4 "wonder why it doesn't work" ... :)

Edited by Rudolf Meier
Link to comment
Share on other sites

20 hours ago, Rudolf Meier said:

... oh, cool. I'm behaving like a Kerbal already... "calculate value... throw away... use uninitialized variable" ... and, never forget step 4 "wonder why it doesn't work" ... :)

You are lucky, it is way much better to wonder why something does not work than to wonder why somethng work while it should not work on purpose :D

Link to comment
Share on other sites

the gui is a mess... I need to rebuild the concept behind it

by the way... did the old IR allow controlling the servos, even when there was no signal? ... that's something I never remarked...

anyway, I will implement this now a well (but of course allow other mods to controll IR even without signal, like e.g. kOS)

Link to comment
Share on other sites

ok, Beta 4 is online... https://github.com/meirumeiru/InfernalRobotics/releases/tag/v3.0.0-beta4

I didn't try out everything intensively, so, it might still not work perfectly. I modified it quite a lot internally and it might be, that I didn't always use the right variables ;) ...

Anyway, I hope the base is better now and that we can build up on this now. I will at least install this now and try to play with it...

 

If you are loading crafts or savegames from Beta 3, make sure that the servos are all in their 0-position. Otherwise it won't load correctly.

 

I tried to go through all the reported bugs of the last year, but I decided to ignore them and to wait for new reports. Many of them could have been caused by things I fixed. Some probably not. But it's too difficult to find out if it's still happening. So... sorry for that and I wait for reports.

Edited by Rudolf Meier
Link to comment
Share on other sites

Just wanted to drop in and mention, for what it might be worth, that even using linuxgurugamer's fork of KJR that comes bundled with KSPI-E, the recent betas of IR Next have been working great for me so far. Previously, trying to actuate any of the servos outside of the VAB/SPH caused an instant kraken attack and game crash (realized after launching an expensive space station with IR parts...oops). I haven't done a great deal of testing yet, but whatever improvements you've been making definitely seem to be working. It's totally awesome being able to use IR alongside Interstellar again. Thanks for keeping this awesome mod going! :D

 

Link to comment
Share on other sites

@whale_2, what is status of your InnerLock mod ?  Old WIP thread was not updated for a while and I was not being active in KSP for a long time.
Does it still work for KSP 1.7 ?

I have some unusual ideas for new IR crafts that might benefit a lot from your mod.

Link to comment
Share on other sites

KSP 1.7 Note - 

IR Beta 3 worked fine with all mods installed. Animated in SPH and at launch. Simple F-14 with two flat hinges with wings attached. 

Removed Janitors Closet and some other ui mods, installed Quantum Struts (but don't have the part on this craft) and Kerbal Joint Reinforcement. 

IR Beta 4. Craft still animates in SPH but not in flight. New craft or saved craft. Regardless of hinge settings, the hinge moves out (X-axis) about half a unit then revert. Wings don't move. 

Maybe Medium- hinge doesn't play nice with KJR? I'm away from my machine for a day or two but thought I'd pass this on. 

Link to comment
Share on other sites

9 minutes ago, faulk_wulf said:

KSP 1.7 Note - 

... installed Quantum Struts (but don't have the part on this craft) and Kerbal Joint Reinforcement.  

IR Beta 4. Craft still animates in SPH but not in flight. New craft or saved craft. Regardless of hinge settings, the hinge moves out (X-axis) about half a unit then revert. Wings don't move.

That is expected. IR next have different modul names from old IR plugin. With old KJR fork, direct origin from ferram original KJR mod would not work unless you add new values in XML config file.

You need to either, be patient for few days more, for KJR next mod to be released or to use KJR fork from @Lisias, if you are not comfortable to change XML files for yourself.

Link to comment
Share on other sites

Ok, found small issue. Happened due to user error, but should be handled regardless.

  1. In VAB/SPH start building craft with structural part, without any command probe(that was my user mistake realised after found issue)
  2. put some motorized IR part on craft
  3. try to open IR group/part editor - it throws nullreference object error because craft missing command module

After last step game start to behave wierd, seems to whole GUI is affected somehow. You can't pick any new part from list, rigt click doesn't work etc.
I fixed it somehow temporary by grabing attached IR part and removing from craft and after that placing command probe on craft. From that point it seems to work fine, but I would not try to risk anything further. I exit game to desktop and to write report about it.

Link to comment
Share on other sites

5 hours ago, kcs123 said:

@whale_2, what is status of your InnerLock mod ?  Old WIP thread was not updated for a while and I was not being active in KSP for a long time.
Does it still work for KSP 1.7 ?

I have some unusual ideas for new IR crafts that might benefit a lot from your mod.

It was released not so long ago, but before 1.7 was out. Most likely it would work out of the box, however I'm going to update it soon-ish.

[1.3.1, 1.5.1, 1.6.1] Inner Lock - lock your inner parts

 

It is really a niche mod, so I'm glad it sparks some interest :)

Link to comment
Share on other sites

18 minutes ago, whale_2 said:

It was released not so long ago, but before 1.7 was out. Most likely it would work out of the box, however I'm going to update it soon-ish.

[1.3.1, 1.5.1, 1.6.1] Inner Lock - lock your inner parts

 

It is really a niche mod, so I'm glad it sparks some interest :)

Thanks a lot, I was watching old WIP thread, but failed to notice complete release. And could not agree more, it is quite nice mod that would probably one of "must have" for those who use IR mod too.

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