Jump to content

[0.90] Magic Smoke Industries Infernal Robotics - 0.19.3


sirkut

Recommended Posts

yeah have the latest. i used a hinge with some of the small strutal parts to build a arm to bend out on a sat after launch last ealier. left the game for a bit came back and started the game now all the small structal pieces have a gap between them and they all in the undeployed position

Link to comment
Share on other sites

yeah have the latest. i used a hinge with some of the small strutal parts to build a arm to bend out on a sat after launch last ealier. left the game for a bit came back and started the game now all the small structal pieces have a gap between them and they all in the undeployed position

what parts are you attaching to, because this could be a problem with it and not the hinge. can you give a pic?

Link to comment
Share on other sites

is there any way now to 'adjust' the parts so that they are at some point between initial and final deployment. for example, I am working on a rover, no actually it is a truck, that is folded up for easier transfer to bases. some of the hinges need to be at 90 deg for 'packing'..... Can this be set in the .cfg or something like that????

I really enjoy these mods. Makes it like a rubix cube to build stuff now.... to fit it into as small of a space as possible.

thanks.

Link to comment
Share on other sites

is there any way now to 'adjust' the parts so that they are at some point between initial and final deployment. for example, I am working on a rover, no actually it is a truck, that is folded up for easier transfer to bases. some of the hinges need to be at 90 deg for 'packing'..... Can this be set in the .cfg or something like that????

I really enjoy these mods. Makes it like a rubix cube to build stuff now.... to fit it into as small of a space as possible.

thanks.

I dont think this can be accomplished right now. you just have to choose the placement of the normally open or closed hinge. Maybe use a truss for alignment and placement to get the angles you want. But Sirkut can better answer your question.

Link to comment
Share on other sites

I dont think this can be accomplished right now. you just have to choose the placement of the normally open or closed hinge. Maybe use a truss for alignment and placement to get the angles you want. But Sirkut can better answer your question.

It all depends on the initial angle you are using when you make the model.

Link to comment
Share on other sites

im using the stock structal part the real small cube struss. im using the smallest hinge on it to make it so i have a straight up tress that can move down to face out. i have about 6 or so of them ontop of each other. its for a satalite so its small. what happened is i put up 4 sats np they stayed outlike they should. then had to exit game due to non working buttons. when come back ingame to rename the sats they all had the tress facing up in default postion and the tresses had spaces between them. i could still use the controls to move them but they where limited to 1/12th the angle it should have.

Link to comment
Share on other sites

Returning to my CoT/CoM alignment mod,

http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-7?p=581931&viewfull=1#post581931

I've reached the point where I need some 3d transformation help. How much help? I don't even posses the language required to express the problem so, probably quite a lot of help.

I have an IR rail, the rail has two positional components, an origin vector and a rotation vector which are expressed in Vessel coordinates.

It is a rail so it can only move along a single axis, in a positive direction or a negative direction.

When the rail is created in the SPH it is aligned along the Y axis (I think) with a rotation of (0,0,0) (X would be left to right and Z floor to ceiling). When extended a point on the rail will move in the negative direction (I think) and when retracted the point will move in the positive direction along the Y axis.

The tricky part:

Given the rotation vector of the rail how do I in C#...

1) Work out which axis the rail is parallel to, or the axis which the rail is 'most parallel' to when not at an exact 0,90,180,270 degree alignment?

2) Work out if extending the rail will move a point on it in a negative or positive direction?

I'm sure there is a neat 3d matrix solution. At the moment my 2 dimensional brain is working in 2 dimensional planes which is fine for my current, simple requirements, but just this morning I extended the code to work in a second plane - which is becoming messy, and also had to deal with an additional combination of Y an Z rotations - which is going to become very messy very quickly.

Any pointers gratefully accepted.

Edited by ecat
Link to comment
Share on other sites

Assuming that the thrust vector points outwards from the rail's surface (as it does in your past video) then all you need to do is convert the CoM and CoT to be relative to the adjustable rail's coordinate system, then calculate the difference along the primary axis. Converting those 'world' positions to be 'local' to the rail is usually a case of applying an inverse of the rails transformation matrix somewhere in the equation.

Hopefully that will get you started :). I'll have a propper think about it after work this evening.

Link to comment
Share on other sites

Assuming that the thrust vector points outwards from the rail's surface (as it does in your past video) then all you need to do is convert the CoM and CoT to be relative to the adjustable rail's coordinate system, then calculate the difference along the primary axis. Converting those 'world' positions to be 'local' to the rail is usually a case of applying an inverse of the rails transformation matrix somewhere in the equation.

Hopefully that will get you started :). I'll have a propper think about it after work this evening.

Thanks for the reply, though it may be a while before my 2d brain can understand it...

Yes, I too have to assume that the thrust vector points outwards from the rail's surface, if only for the sake of my sanity.

I think the Vessel, CoM, CoT and the rail all share a common coordinate system, at least that is the premise I've been working on and it appears to be working. So, I guess everything is already local. This also means that working out the distance is simple once I know 'which way the rail is pointing' and this is where I come unstuck. At the moment I use an ever growing collection of 'if' statements to determine the direction eg.


...
railYRot = railYRot - railZRot; // correct for Z rotation ???
if (railYRot >= 360)
railYRot = railYRot - 360;

if ((railYRot >= (90 - 45)) && (railYRot <= (90 + 45)))
posError = (partCoM.x - vesselCoM.x); //. for rail ( 90, 90, 0 )
else
if ((railYRot >= (180 - 45)) && (railYRot <= (180 + 45)))
posError = -(partCoM.z - vesselCoM.z); //. for rail ( 90, 180, 0 )
else...

which is fine for trivial cases.

The more complex case I was playing with is from this thread

http://forum.kerbalspaceprogram.com/showthread.php/47232-Mosquito-Kethane-Drone

where I have co-opted BahamutoD's excellent ship to experiment with (see post #9). I can get it working but using ever more complex 'if' statements is not the way forward. The rotation information I have on the rails in the above example is

Lower Horizontal (ish) Rails:

E rotation (83.66853, 270, 296.323)

E rotation (83.66856, 89.99957, 63.67655)

Vertical (ish) Rails:

E rotation (5.033035, 359.2179, 356.956)

E rotation (5.033036, 0.7820649, 3.044015)

All I really want is one out of the six +/-X, +/-Y, +/-Z. So the above horizontals would be -Y and the verticals would be +Z for example - assuming I have my + and - the right way around in my head.

Edited by ecat
Link to comment
Share on other sites

ZodiusInfuser sent me a few models. One of which is a new piston that is much smaller in profile if you have an OCD for space. I now had a chance to skin the low profile piston. Coming out soon.

qw9l70qdgfzqkajfg.jpg?size_id=5

Link to comment
Share on other sites

I think he means like a rotatron that you activate and it keeps spinning at a set rate indefinitely :o

So you can make rings that simulate artificial gravity, for example. Rather than sitting there, holding the direction button to make it spin, you just turn it on and it spins :o

Link to comment
Share on other sites

If you assign a Rotatrons "Move" command to an action group key, the rototron will spin forever (at least while the vessel has focus).

Bingo. Use the action groups move+ and move- for it to move endlessly until you press one of those keys again to toggle it. I debated making that part of the GUI but decided against it as it will get too crowded.

Link to comment
Share on other sites

Thanks for the reply, though it may be a while before my 2d brain can understand it...

Yes, I too have to assume that the thrust vector points outwards from the rail's surface, if only for the sake of my sanity.

I think the Vessel, CoM, CoT and the rail all share a common coordinate system, at least that is the premise I've been working on and it appears to be working. So, I guess everything is already local. This also means that working out the distance is simple once I know 'which way the rail is pointing' and this is where I come unstuck. At the moment I use an ever growing collection of 'if' statements to determine the direction eg.

Right, I'll try to explain the concept the best I can :)

All coordinate spaces are technically local to something. So a vessel may have it's own coordinate space that is local to Kerbin, but for the parts the vessels space is the world. What you are wanting to do for this problem is calculate the CoM and CoT to be local to the adjustable rail, so that applying an x,y,z offset will get you to those values. This sounds quite tricky, but is actually trivial as it's something that's done all the time in 3D programs.

You first need to get the WorldTransform of the rail. I'd be very shocked if Unity doesn't offer this! This will return a 4x4 matrix containing the position and orientation of the rail. As you want to get CoM and CoT relative to this you need to calculate it's inverse to effectively 'cancel out' the placement of the rail, imagining that it is at the origin instead. This should just be a case of writing = matrix.Inverse();. Then you multiply the CoT and CoM vectors by this matrix to give their coordinates relative to the rail.

From that you can treat it as a 2D problem again, removing all your if statements as the rail is always in the same orientation relative to itself. I can cover this more by PM if you wish but I'm confident that this will work, and allow you to place the rail in any position on the craft and have it work :D

Link to comment
Share on other sites

ZodiusInfuser sent me a few models. One of which is a new piston that is much smaller in profile if you have an OCD for space. I now had a chance to skin the low profile piston. Coming out soon.

qw9l70qdgfzqkajfg.jpg?size_id=5

Awesome! And thanks for letting me be a (small) part of this wonderful mod!

It's not clear from that image but this piston is my effort to introduce a telescopic arm such as those on mobile cranes:

450px-Truck-mounted_crane_building_a_bridge.jpg

There will (hopefully) be versions of different sizes that will fit together to allow you to extend the reach of the piston a significant way.

Bingo. Use the action groups move+ and move- for it to move endlessly until you press one of those keys again to toggle it. I debated making that part of the GUI but decided against it as it will get too crowded.

Oh, I didn't realise this was already a feature of the mod. I must try it!! Perhaps the UI wouldn't be too crowded if you went for toggleable << and >> buttons either side of the current button set?

Link to comment
Share on other sites

Awesome! And thanks for letting me be a (small) part of this wonderful mod!

It's not clear from that image but this piston is my effort to introduce a telescopic arm such as those on mobile cranes:

450px-Truck-mounted_crane_building_a_bridge.jpg

There will (hopefully) be versions of different sizes that will fit together to allow you to extend the reach of the piston a significant way.

Oh, I didn't realise this was already a feature of the mod. I must try it!! Perhaps the UI wouldn't be too crowded if you went for toggleable << and >> buttons either side of the current button set?

Well the GUI to me is already too crazy. I could try a release with it as a test.

Link to comment
Share on other sites

I would agree that the editor one can get quite crazy, but not the in-game one. All you have is a name, some controls and a speed multiplier.

I'd say there even space for an 'acceleration/deceleration time' text field, allowing you to specify the time it takes the parts to reach their top speed (based on the multiplier). This would be very useful for rotating or moving things with a large mass, as currently it's quite easy to break your craft by setting a large multiplier value. I don't know how feasible this would be as I've not had chance to compile the source yet, but I did read that Unity has such options for motors so maybe it's possible. A thought for version of this mod 3.0 perhaps :P

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...