Space Engineers

Space Engineers

MArmOS (Mechanical Arm Operating System) v3.1
Agent 0815 Mar 7, 2018 @ 8:20am
The good old solids
Thanks for your help. My problem is more about the correct definition of the solids. I wanna build some kind some sliding crane. works well.. so far.. the controls are felling like the "shape" of the arm isnt correct. Here's the part that makes trouble for me:

var P1_1 = new Piston( Name: "armKolbenY1_1", Axis: "Y" , Home: 0 , MaxSpeed: 5);
var P1_2 = new Piston( Name: "armKolbenY1_2", Axis: "Y" , Home: 0 , MaxSpeed: 5 );
var P2_1 = new Piston( Name: "armKolbenY2_1", Axis: "Y" ,Home: 0 , MaxSpeed: 5 );
var P2_2 = new Piston( Name: "armKolbenY2_2", Axis: "Y" , Home: 0 , MaxSpeed: 5 );
var S1 = new SolidLG( 0, -5, 0); // The solid for compensating the pistons ( can i use 1 solid for the 2 pistons? 2 for each piston and 1 block between them = Y-5)
var S2 = new SolidLG( 0, 8, 2 +2 ); // From there go 2 up, 8 back (to the right) and 2 up again ( i assumed 8 because i think the piston class itself should be 3 blocks? So 2 Pistons (-6?), 1 block between(-1) and the Y-5 from the S2 solid is Y-12. That means for me that when i use Y8 i am 4 blocks left to the center of Y
var R1 = new Rotor( Name: "armZ1", Axis: "Z", OriMode: 1 , Home: 0 ); // there is the Z rotor
var S3 = new SolidLG( 0, 0, 2 ); // 2 up from there

My arm = (P1_1*P1_2 + P2_1*P2_2) + S1 + S2 + R1 + S3;

The main problem are this S1 and S2 solids. I bet you can reduce it to 1 but im too stupid xD

and maybe you can tell me about the "F" in the coordinates from your excavator. i mean this line:
var S3 = new SolidLG( 7.1F, 0, 0 );

Thanks a lot for your work! Can i buy you a beer? :D

Edit: Sorry wanted it in the help thread.. And this control issue you have in mp must have something to do with stationary cockpits are not accepting control inputs. Because you can move. but only by changing the home position in the code and then rehome
Last edited by Agent 0815; Mar 7, 2018 @ 8:32am
< >
Showing 1-6 of 6 comments
Agent 0815 Mar 8, 2018 @ 1:59am 
Okay i give up. I can't get this thing working parallel. they are going in the right direction but not in parallel. here's what is left of my code. i've deleted the rest of the arm for testing:

var P1_1 = new Piston( Name: "armKolbenY1_1", Axis: "Y" , Home: 0 , MaxSpeed: 3);
var S1 = new SolidLG( 0, -3, 0 );
var P1_2 = new Piston( Name: "armKolben-Y1_1", Axis: "-Y" , Home: 10 , MaxSpeed: 3 );
var S2 = new SolidLG( 0, 3, 0 );
var P2_1 = new Piston( Name: "armKolbenY2_1", Axis: "Y" ,Home: 0 , MaxSpeed: 3 );
var S3 = new SolidLG( 0, -3, 0 );
var P2_2 = new Piston( Name: "armKolben-Y2_1", Axis: "-Y" , Home: 10 , MaxSpeed: 3 );
var S4 = new SolidLG( 0, 3, 0 );
var P3_1 = new Piston( Name: "armKolbenY3_1", Axis: "Y" , Home: 0, MaxSpeed: 3 );
var S5 = new SolidLG( 0, -4, 0 );
var P3_2 = new Piston( Name: "armKolben-Y3_1", Axis: "-Y" , Home: 10 , MaxSpeed: 3 );
var S6 = new SolidLG( 0, 4, 0 );



var MyArm = (P1_1+S1+P2_1+S3+P3_1+S5)*(P3_2+S2+P2_2+S4+P1_2+S6);



in top view it looks like:

ground-piston-block-piston-block-piston-block-block-block-block-piston-block-piston-block-piston-ground


https://steamuserimages-a.akamaihd.net/ugc/933807031686206225/F9003FD306132B5961C4A6623617D6441D54E7F0/


are the coordinates absolute or relativ when no reference frame is set?

Feel free to meet me on my server :)

84.155.38.245
Last edited by Agent 0815; Mar 8, 2018 @ 2:13am
Timotei~  [developer] Mar 8, 2018 @ 10:11pm 
@Agent 0815 Sorry for the late answer.

It look's like you where atempting to make two colums of pistons facing each others to move a central piece. Like a rail. I like that and I believe this should be possible.
I think you where close to the solution but lacked some knoledges about the Solids which would have helped you to simplify the desing process.

Those knoleges are the folowing:
First: retracted Pistons have no solid shape for MArmOS.
Second: Yes, Solids do not need to be split by Pistons. Only Rotors does that. This mean in your case that you can simplify all your solids into a single one (since there are no rotors).

Time for some maths:
Each pistons can extend 10m or 4 LG
So 3 pistons = 4LG *3 = 12 LG
We add 1 LG for the conveyor cube in the midle.
This mean there should be 13 LG separating your pistons.


All of this means your definition should look like this:

var S1 = new SolidLG( 0, -13, 0 );
var P1_1 = new Piston( Name: "armKolbenY1_1", Axis: "Y" , Home: 0 , MaxSpeed: 3);
var P2_1 = new Piston( Name: "armKolbenY2_1", Axis: "Y" ,Home: 0 , MaxSpeed: 3 );
var P3_1 = new Piston( Name: "armKolbenY3_1", Axis: "Y" , Home: 0, MaxSpeed: 3 );
var P1_2 = new Piston( Name: "armKolben-Y1_1", Axis: "-Y" , Home: 10 , MaxSpeed: 3 );
var P2_2 = new Piston( Name: "armKolben-Y2_1", Axis: "-Y" , Home: 10 , MaxSpeed: 3 );
var P3_2 = new Piston( Name: "armKolben-Y3_1", Axis: "-Y" , Home: 10 , MaxSpeed: 3 );
var MyArm = (S1+P1_1+P2_1+P3_1)*(P1_2+P2_2+P3_2);


And it should look like this in game(I like to draw stuff):

█═════¦▓¦█ Full right
|---------------|
13 LG

█═══¦▓¦══█ Centered

█¦▓¦═════█ Full left

caption:
█ fixed point
═ piston's extention
¦▓¦ piston's heads and conveyor cube



Q. "and maybe you can tell me about the "F" in the coordinates from your excavator."
A. About the F thing. It is just a relic of the past from when MArmOS was using Single precision Matrix calculations. Back then, all numerical values needed an F to specify they where float values. Now, it is not needed and I thought I removed them all. This one passed under my radar apparently. It should have no impact thouh.


Q. "are the coordinates absolute or relativ when no reference frame is set?"
A. The reference frame is absolute by default.
Agent 0815 Mar 9, 2018 @ 6:49am 
That's exactly what i want to do. But i have a conveyorblock after every piston and in the "center" they are seperated by 4. So -21 for me. And... i just realised that Y has to be positive. I'm going to the the left ^^. It works so far.. as soon as i connect both sides, this thing is getting crazy... so i seperated one side again. have a look by yourself:
This is full right (Home)
http://steamcommunity.com/sharedfiles/filedetails/?id=1325144311 marmos coords
http://steamcommunity.com/sharedfiles/filedetails/?id=1325144545 real position
http://steamcommunity.com/sharedfiles/filedetails/?id=1325144498 real positon2
http://steamcommunity.com/sharedfiles/filedetails/?id=1325144392 piston coords
http://steamcommunity.com/sharedfiles/filedetails/?id=1325144348 piston coords2
http://steamcommunity.com/sharedfiles/filedetails/?id=1325144449 Code

Mid position:
https://steamuserimages-a.akamaihd.net/ugc/933807031691148406/04359829719281E472A2A219DEF3430307E40CCE/


They are still not working parallel and i think the "tension" it produces make the hole thing freak out. I have no idea why the first pistons are not going to zero. its not blocked. via toolbar controlling the pistons directly works well. But even with that, the pistons expand slightly more then 10m. with 6 pistons its about 0.5LG difference. At the moment i have more a clang powered base destroyer then a crane xD

Thanks again!
Timotei~  [developer] Mar 10, 2018 @ 5:55pm 
@Agent 0815 I just made a copy of your setup and did some tests on it.
I think I found a solution to the pistons going too far. I've set the Pistons maximum limit to rougly 9.5 m and it seems to do the job.
I also tried checking the "Share inertial tensors" button and it seems to have got rid of the fantom forces.
I tried it on a floating piece of armor in space and there is no spinning at all (no gyroscopes).
BTW, I'm in SP. Maybe it's diferent in MP.
Agent 0815 Mar 11, 2018 @ 7:00am 
You're great! I tried that solution too but i have not that good results. But i have it working now(the rail..). The key for me was to set the min and max forces of the pistons to max, add a gyro on every conveyor between the pistons and bridge their controlls with 0.2 rpm in roll. Now its perfectly stable. I think the pistons have some kind of clearence with the standard power. decreasing the more torque you give them and the gyros pushing it to one side of the left clearance. So it can't "bounce" in its clearance. And i have added a 3rd column of pistons. That's the good part. The bad part is, that the arm is heavier to do then i thought it's crumbling in itself when i move. Sorry for being so stupid ^^. But wheres my mistake?
https://steamuserimages-a.akamaihd.net/ugc/933807335270459668/41E297D11F9F0CF6B064203D4E111B3FC4A990D9/
Last edited by Agent 0815; Mar 11, 2018 @ 7:03am
Agent 0815 Mar 11, 2018 @ 7:23am 
var S1 = new SolidLG( 0, 21, 0 );
var P1_1 = new Piston( Name: "armKolbenY1_1", Axis: "Y" , Home: 0 , MaxSpeed: 5);
var P2_1 = new Piston( Name: "armKolbenY2_1", Axis: "Y" ,Home: 0 , MaxSpeed: 5 );
var P3_1 = new Piston( Name: "armKolbenY3_1", Axis: "Y" , Home: 0, MaxSpeed: 5 );
var P1_2 = new Piston( Name: "armKolben-Y1_1", Axis: "-Y" , Home: 10 , MaxSpeed: 5 );
var P2_2 = new Piston( Name: "armKolben-Y2_1", Axis: "-Y" , Home: 10 , MaxSpeed: 5 );
var P3_2 = new Piston( Name: "armKolben-Y3_1", Axis: "-Y" , Home: 10 , MaxSpeed: 5 );
var P1_3 = new Piston( Name: "armKolben-Y1_2", Axis: "-Y" , Home: 10 , MaxSpeed: 5 );
var P2_3 = new Piston( Name: "armKolben-Y2_2", Axis: "-Y" , Home: 10 , MaxSpeed: 5 );
var P3_3 = new Piston( Name: "armKolben-Y3_2", Axis: "-Y" , Home: 10 , MaxSpeed: 5 );
var S2 = new SolidLG( 0, -17 , 5);
var R1 = new Rotor( Name: "armZ1_1", Axis: "Z", OriMode: 0 , Home: 0, MaxSpeed:1 );
var R2_1 = new Rotor( Name: "armY1_1", Axis: "Y", OriMode: 0 , Home: 0, MaxSpeed:1 );
var R2_2 = new Rotor( Name: "armY1_2", Axis: "-Y", OriMode: 0 , Home: 0, MaxSpeed:1 );
var S3 = new SolidLG( 0, 1 , 4 );
var S3_1 = new SolidLG( 0, -1, 4 );
var P4_1 = new Piston( Name: "armKolbenX1_1", Axis: "X" , Home: 0);
var P4_2 = new Piston( Name: "armKolbenX1_2", Axis: "X" , Home: 0);
var R3_1 = new Rotor( Name: "armY2_1", Axis: "-Y", OriMode: 0 , Home: 0, MaxSpeed:1 );
var R3_2 = new Rotor( Name: "armY2_2", Axis: "Y", OriMode: 0 , Home: 0, MaxSpeed:1 );
var S4 = new SolidLG( 3, 0, 0 );
var P5 = new Piston( Name: "armKolbenX1", Axis: "X" , Home: 0);
var R4 = new Rotor( Name: "armX1", Axis: "X", OriMode: 1 , Home: 0 );
var S5 = new SolidLG( 2, 0, 1 );
var R5 = new Rotor( Name: "armZ2", Axis: "-Z", OriMode: 1 , Home: 0 );
var S6_1 = new SolidLG( 0, 2, -2 );
var S6_2 = new SolidLG( 0,- 2, -2 );
var R6 = new Rotor( Name: "armY3_1", Axis: "-Y", OriMode: 1 , Home: 0 );
var R7 = new Rotor( Name: "armY3_2", Axis: "Y", OriMode: 1 , Home: 0 );



var MyArm = (S1+P1_1+P2_1+P3_1)*(P1_2+P2_2+P3_2)*(P1_3+P2_3+P3_3)+S2+R1+R2_1*R2_2+(S3+P4_1+R3_1)*(S3_1+P4_2+R3_2)+S4+P5+R4+S5+R5+(S6_1+R6)*(S6_2+R7);

new UserControl( Arm: MyArm , Speed: 5, Softness: 5);
< >
Showing 1-6 of 6 comments
Per page: 1530 50