Jump to content

[WIP] Infernal Robotics - Next


Rudolf Meier

Recommended Posts

12 hours ago, mexorsu said:

Hey Rudolf, can you please add (back) the IRWrapper.cs attached below? Not sure if its used in many mods but for sure KOS uses it and i miss that integration. I changed the code of original IRWrapper.cs from MagicSmokeIndustries/InfernalRobotics to accomodate new namespace, property/class name changes and other crazy "refactorings" you did :wink:

hi... I need to go through that. I think we will find a good solution but it needs some work. That's something I can say already.

And my "refactoring" ... well, it was more a "start with an empty class, rewrite the code but copy parts of the old code" ... this means that the interface is similar, but internally those joints are 100% new from scratch with just some ideas that are still similar... I learned from the old code and then wrote the new one.

But since I tried to keep the interface, there is a good chance that we can make it working again... this was also possible for the sequencer... more or less :) 

Link to comment
Share on other sites

10 hours ago, tbankstemp said:

Ok, so I tested out some things and here are my findings.

*The below were the only parts I've tested*

Working:
Rails are good. :)
Extendatron - Basic and Half
Joint Pivotron - Basic and half

Not Working:
Rotatron - Basic
Rotatron - Uncontrolled
Joint Pivotron - Narrow angle
 

I assume it would be the same/similar issue as the Rails were. Same explodey thingy happens. I can provide logs and crash.dmp if needed.

Thanks.

the dump doesn't help much, but... tell me how you connected those parts... I cannot find a configuration that explodes... do you have a picture?

6 hours ago, Getsome2030 said:

The other issue I have about the Gantry Rail part and some of the other parts, Rotatron parts. Why are the bottom attach nodes inverted? I change mine from: node_stack_center = 0.0, -0.05, 0.0, 0.0, 1.0, 0.0, 2 to node_stack_center = 0.0, -0.05, 0.0, 0.0, -1.0, 0.0, 2 this works great...

I'm looking into what you sayed, but this one is a very interesting point. I also wondered why some points sometimes don't work... but I'm not making the models and never looked into those values. But I will do now... maybe with a debug-function showing all nodes a little bit different so that I can see the wrong ones.

Very good point!

Link to comment
Share on other sites

7 hours ago, Getsome2030 said:

Gantry Rails, tested the patch and the craft doesn't explode, yeah! But trying to build a gantry craft with 1x Gantry Rail part moving north/south and another moving east/west it not working out that well. Gantry Rail moving east/west has no issue but then trying to move north/south cause the whole craft to move instead of the Gantry Rail part.

cannot reproduce this... do you have a picture of how you built it?

Link to comment
Share on other sites

ok, what do I have so far?

Gantry Rail explosions -> they occur after modifying the node position (that's a model problem, not a coding problem and here I'm not the expert... I need to ask @ZodiusInfuser)

Gantry Rail moving the craft instead of the parts... I haven't found a configuration in which this happens... I'm waiting for more information on that

Explosions in 1.4.2 when using Gantry Rails: I can only see this when the nodes are modified, I guess it's the same model problem

Problems with Rotatrons... I cannot reproduce them... I'm waiting for more information

... I think there's nothing I need to fix or that I could fix (code) ... :) ... what I will do is working on the kOS integration ... or did I miss something? :rolleyes:

14 hours ago, mexorsu said:

Hey Rudolf, can you please add (back) the IRWrapper.cs attached below?

I don't know if I fully understood the idea behind this class... I thought that this is just an example of how to do it in other projects and that those classes need to be built inside your project? An example of this class (which may or may not work, because I never tested more than the compiling) is in the latest IR-Sequencer. ... or, did I missunderstand something?

Link to comment
Share on other sites

10 hours ago, Rudolf Meier said:

the dump doesn't help much, but... tell me how you connected those parts... I cannot find a configuration that explodes... do you have a picture?

Here is the image of what I'm building with IR. Once I launch the top piston part sheers off and explodes the whole craft out of the KSP universe.  The only mods I have installed is IR and TweakScale.  Tried without TweakScale also, same problem.
https://imgur.com/a/gvO1l
 

Edited by tbankstemp
added better link.
Link to comment
Share on other sites

49 minutes ago, tbankstemp said:

Here is the image of what I'm building with IR. Once I launch the top piston part sheers off and explodes the whole craft out of the KSP universe.  The only mods I have installed is IR and TweakScale.  Tried without TweakScale also, same problem.
https://imgur.com/a/gvO1l
 

and you are using Beta3 Patch1 ? because that was the problem of Beta3... that's why I built Patch1 ... and I think this should be fixed... or not?

anyway... I'm trying it

9 minutes ago, Rudolf Meier said:

and you are using Beta3 Patch1 ? because that was the problem of Beta3... that's why I built Patch1 ... and I think this should be fixed... or not?

anyway... I'm trying it

going into time warp destroys the universe... ok, that's nice :) ... must see if that's a new one or an old one I didn't get up to now...

but it's not the error you describe... but, who knows, maybe this is different because I didn't set it on wheels... anyway, I have something to fix now

Edited by Rudolf Meier
Link to comment
Share on other sites

49 minutes ago, Rudolf Meier said:

ok, I see it now... and I think I know where it happens... (it's the same function as always... the newest...) ... strange, but in a way interesting :wink: 

it is this special type of rotatron that is the problem... but I haven't found the exact problem... for some reason the internal rotation starts spinning even though it's not moving... this is causing the rotational calculation to freak out and flood everything with NaN's ... that's not so good :) ...

and that's because of rounding problems because of a not so optimal angle between several things I'm using to calculate the rotation... I need to find a better way to do this... and maybe it's wrong anyway (because of bending that I'm not taking into account for rotational joints) ... anyway... we will find the solution...

I think exactly like "George Phelps" ... you don't know him? ... really not? ... https://www.youtube.com/watch?v=Vop2OOCpwiQ 

 

Edited by Rudolf Meier
Link to comment
Share on other sites

2 hours ago, Rudolf Meier said:

and you are using Beta3 Patch1 ? because that was the problem of Beta3... that's why I built Patch1 ... and I think this should be fixed... or not

 

Yup, beta3 patch 1. Probably doesn't matter but just in case, I also have the making history expansion.

Link to comment
Share on other sites

I decided to make a video of the Gantry Build because I deleted the failed craft file. Unfortunately I am unable to make the craft move as reported before? but I think this demonstrates what goes on and also  shows how it was built. The default Gantry Rail part mass is 0.8 if that is changed to 0.02 and the other IR parts used are 0.02 it makes a huge difference in movement transitions but ultimately to have a feasible working Gantry I think it needs to be able to pickup at least 2.5 tonne on Kerbin.

 

Link to comment
Share on other sites

50 minutes ago, Getsome2030 said:

I decided to make a video of the Gantry Build because I deleted the failed craft file. Unfortunately I am unable to make the craft move as reported before? but I think this demonstrates what goes on and also  shows how it was built. The default Gantry Rail part mass is 0.8 if that is changed to 0.02 and the other IR parts used are 0.02 it makes a huge difference in movement transitions but ultimately to have a feasible working Gantry I think it needs to be able to pickup at least 2.5 tonne on Kerbin.

That's the old Unity-PhysX-Strength-Is-Related-To-Mass crap... can be improved in 1.4.x a little bit, but in the end... it's difficult. If I add enourmous strengths to everything, every joint is so strong, that everything becomes highly unrealistic... if I don't do it, those things you do here don't work...

Link to comment
Share on other sites

1 hour ago, Rudolf Meier said:

That's the old Unity-PhysX-Strength-Is-Related-To-Mass crap... can be improved in 1.4.x a little bit, but in the end... it's difficult. If I add enourmous strengths to everything, every joint is so strong, that everything becomes highly unrealistic... if I don't do it, those things you do here don't work...

Oh well. Guess there will never be a stable Gantry craft in KSP to move things around on the surface of planets and moons.

Cheers.

Link to comment
Share on other sites

36 minutes ago, Getsome2030 said:

Oh well. Guess there will never be a stable Gantry craft in KSP to move things around on the surface of planets and moons.

Cheers.

that's not sure... maybe we only need more than 1 joint... maybe a translational joint like the rail joint needs to be 3 joints or something... I was thinking about this for some time... but... don't know yet if it's a good idea

Link to comment
Share on other sites

Hi,

I just started to use this new IR version and i have a problem to make my craft working (if i can call that a craft).

I just tested an Adaptron (Basic) with one beam on it, on a new game. Result : the beam fell (like the adaptron has no lock) on the ground, and the world disappear.

I downloaded the lastest version of IR and your KRJ version :/

Your mod is awesome but i can't get it to work :'(...

Link to comment
Share on other sites

1 hour ago, Rudolf Meier said:

that's not sure... maybe we only need more than 1 joint... maybe a translational joint like the rail joint needs to be 3 joints or something... I was thinking about this for some time... but... don't know yet if it's a good idea

So what your thinking is to have the rail attached at the ends and the center is able move the full length without pivoting in the center, that would be the way to go if it is possible?

Link to comment
Share on other sites

49 minutes ago, Getsome2030 said:

So what your thinking is to have the rail attached at the ends and the center is able move the full length without pivoting in the center, that would be the way to go if it is possible?

somehow... it may be difficult to do and maybe we would need new models or whatever... but... could be an idea. There is also something like a... no idea how it's called... re-dock re-attach something? that is connecting parts in a way KSP doesn't allow it normally... this would be an option maybe. It could be a problem if you form a circle (for the Unity engine), but... still something to think about. And maybe it could be solved without circles.

I think this is for a later version, maybe 3.1 or something, but still something to keep in mind...

Link to comment
Share on other sites

we are on 'hold' ... Beta 3 (together with KJR) has some big problems that need to be fixed first

Bugs found so far:

1) KJR, when locking an extendatron, it shoots out to its middle position

2) the NaN flooding -> could be, that this comes from an optimization... I'm calculating something like rot = a * b * c * oldRot for every part in the vessel that is connected via IR part... and, I thought it would be an idea to precalculate a * b * c ... but when I do this, sometimes the values are too small and then the floating point calculation freaks out and returns infinite and in the next Step NaN ... maybe I cannot optimize this... wouldn't be a big problem then and a first test shows, that I could be right...

and next tests show me, that it's better, but not solved... it still happens...

I learned, that floating point numbers are like KSP... they often explode :) 

Edited by Rudolf Meier
Link to comment
Share on other sites

@Rudolf Meier Hi, i've a stack of robotics parts scattered around in my mods, cranes boat lifts, bridges (even a full mech kit)  ,  and was wondering if there are any setup changes,  cfg differences between legacy IR and Next IR .  Any advice you can offer would be appreciated.
I see you're having trouble with the latest build so worry about that first  :) 

Cheers

 

 

Link to comment
Share on other sites

7 minutes ago, SpannerMonkey(smce) said:

@Rudolf Meier Hi, i've a stack of robotics parts scattered around in my mods, cranes boat lifts, bridges (even a full mech kit)  ,  and was wondering if there are any setup changes,  cfg differences between legacy IR and Next IR .  Any advice you can offer would be appreciated.
I see you're having trouble with the latest build so worry about that first  :) 

hi, ... I'm glad to see that more and more are interested in the mod :) .... and to answer your question: yes, there are differences. I tried to name the new values in a logical way and pretty descriptive like "canHaveLimits" and things like that. I would recommend to look at one of the cfgs included in the mod, and then I can answer your remaining questions.

those rounding problems are new... I hope I can work around them soon... but, if you don't use the Rotatrion Basic, it should work (I normally tested with the Pivotrons) ... and, dont lock Extendatrons at the moment :wink: ...

Link to comment
Share on other sites

 @Rudolf Meier Do you mind opening issuing on the github repository ? I know that's still WIP but it can be handy to file issue there :)

I play in a CCK career so I didn't yet unlock lots of stuff, but I already encountered some issue and I believe that github is a better place to report things than a forum thread, even if it's still in beta.

 

Also, is this mod has to be considered as an Infernal Robotics replacement (with author's blessing) ? According to its forum's title, it's 1.1.2 compatible and we are now at 1.4.2 ... I just wonder ...

 

Thanks for the hard work !

Edited by Gurki
Link to comment
Share on other sites

1 hour ago, Gurki said:

 @Rudolf Meier Do you mind opening issuing on the github repository ? I know that's still WIP but it can be handy to file issue there :)

I play in a CCK career so I didn't yet unlock lots of stuff, but I already encountered some issue and I believe that github is a better place to report things than a forum thread, even if it's still in beta.

hi... well, I wouldn't, but at the moment I think the rate of bugs is a little high and sometimes there are still discussions about other things like strength of the joints and things like that... because of those I think it's not the worst idea to keep it in one place, at least for some time... but it would be a good idea to switch to it when we are in a slightly more stable situation. But thank you in advance for every input...

and, yes, the idea was to replace IR in the future... and I also had discussions with the original developers about that when I started the project

---

updates on the bug... the NaN bug... it is a rotational problem and we only have it when multiple joints are linked together... it is some floating point overflow, but I haven't found exactely why it happens

Edited by Rudolf Meier
Link to comment
Share on other sites

the NaN problem comes from the fact, that my quaternions do something that they shound't do ... and when I try to correct it, it's getting worse... :) again something I don't understand with quaternions... ok... thought I finally understand them, but nope... :mad:

Link to comment
Share on other sites

 Hi, that all seems fairly straight forward,  all seems  logical.   All seems fine in SPH though still need to retune the limits .  Problems aside i see no trouble adapting everything to the "Next" method

An explanation of the following would be handy , as in what they do

Speed is still degrees/sec

factorSpeed = 20
factorTorque = 35
zeroNormal = 0
zeroInvert = 0
pointer = 0, 1, 0
 

Given your quarternion induced suffering i apologise for this next bit
Ive converted the first couple of parts for testing and although everything works just peachy in the SPH  when tested ,   performing the same test in flight scene results in RUD,  very little showing in the log , mainly a host of collider punch throughs and collisions, for ref, testing in 1.4.2 (in the hope that one day we'll get a fixed 1.4x)

I initially thought the cause  was my interpretation of the new module and I'd applied far too much speed or torque, so i reduced these to a minimum value,.  What appears to be happening is that the rotational force is being applied to the whole craft causing the craft to flip forward violently,  this became apparent when i minimized the speed and torque and it happened slow enough to see.  The side to side rotation seen is likely as result of the supplied torque being unable to flip an 11 tonne vehicle , causing the tracks to slide instead. 

  video unlisted

Spoiler

 

 

Despite their outward appearance both parts are pivotrons ,  the main part being a large A frame crane boom, and the smaller, a stabilizing blade for when the crane is loaded and lifting .  

Spoiler

eEYBnUX.png

 

Link to comment
Share on other sites

22 minutes ago, Rudolf Meier said:

and, yes, the idea was to replace IR in the future... and I also had discussions with the original developers about that when I started the project

No worries, I just wondering if I would expect updates from the former mod or if this new one is the new go-to :)

 

Regarding "issue" it's a mix between tuning and bug :

  • Rotatron - Basic : (maybe other too) Above the max roration limit (+/- 177°) , keeping the button pressed seem to continue the rotation value but not the actual part rotation. Pressing the button in of the opposite rotation consume the "extra" rotation before actually rotation the part (let say I press the "forward" button for 2 seconds above max limit, I have to press the backward button for 2 seconds before the part start rotating).
  • Join Pivotron - Uncontrolled : Allow contraption above its current model (rotation above +/- 120~130° from visual estimation). I think this one is harder to fix as it should depend on attached part hitboxes ...
  • From rotatrons I've tested,  they should hardset their rotation value above limits to corresponding opposite angle. Let say I have a rotation of 190° on a part that allow +/- 180°, it should be hardset to -170° and be able to keep rotating to 0° then 180° then above, following the same hardset.
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...