-
Posts
145 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Dr_Goddard
-
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
`lock wheelsteering to...` eg: 'lock wheelsteering to 205.1.' (compass heading is slightly broken in the current release and needs a decimal number) or `lock wheelsteering to target` -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
You can't call a function in a separate script or on a separate processor. A limited workaround is to run a script on a separate core, and have it watch for some condition like a change in the nametag of a part. Script 1 changes the nametag, script 2 sees the change and runs it's routine. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
the gamepath folder is complicated with Steam. /Users/myname/Library/Application Support/Steam/SteamApps/common/Kerbal Space Program/Ships/script is the folder where my k-OS scripts are stored on my Mac. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
Everything you need to start your robot domination of the Kerbal system. https://github.com/pgodd/Petes-Craft-Repository -
1.1.2 Magic Smoke Industries Infernal Robotics 2.0.2
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Everything you need to start your robot domination of the Kerbal system. https://github.com/pgodd/Petes-Craft-Repository -
1.1.2 Magic Smoke Industries Infernal Robotics 2.0.2
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Hexabot progress. Thanks to all the guys at kOS and the fine fellows who produce Infernal Robotics and the Infernal Robotics Model reworks. This was a heck of a big job. -
1.1.2 Magic Smoke Industries Infernal Robotics 2.0.2
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Docking washers are just swivel joints. They are not docking ports. -
1.1.2 Magic Smoke Industries Infernal Robotics 2.0.2
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Now here's something you're really gonna like. Wow, major headaches getting the video to post. Third time lucky? -
1.1.2 Magic Smoke Industries Infernal Robotics 2.0.2
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Quick inverse kinematic hexapod update. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
This is the first part of the code I am porting from C# Thanks to lunarnexus at: http://forums.trossenrobotics.com/archive/index.php/t-1605.html for the original code. This is for my hexapod robot craft. With functions it should be possible to make a leg subroutine for each leg. This will greatly simplify the programming required for complex movements. THIS CODE IS COMPLETELY UNTESTED AND IS PROBABLY FULL OF ERRORS. declare function FootPosition{ declare x is 0. declare y is 0. declare z is 0. declare coxaAngle is 0. declare shoulderAngle is 0. declare elbowAngle is 0. SET servoGet to ship:partsdubbed("RFFoldatron1 "). SET servoMods To List(). for L In servoGet{servoMods:add(L:getmodule("mumechtoggle"))}. SET shoulderAngle to servoMods:GETFIELD("Rotation:"). SET radshoulderAngle to (Constant():PI / shoulderAngle * 180). //value of 2 is random. normally is length of spars, in my case even #s SET x to 2*SIN(radshoulderAngle). SET y to 2*COS(radshoulderAngle). declare ElbowPos2Dx is x. declare ElbowPos2Dy is y. SET theta3 to 180 - shoulderAngle. SET servoGet1 to ship:partsdubbed("RFFoldatron2"). SET servoMods1 To List(). for L In servoGet1{servoMods1:add(L:getmodule("mumechtoggle"))}. SET theta to (servoMods1:GETFIELD("Rotation:") - theta3). SET radTheta to (Constant():PI / shoulderAngle * 180). SET x to (2*COS(radTheta)+ElbowPos2Dx). SET y to (2*SIN(radTheta)+ElbowPos2Dy). declare FootPos2Dx is x. declare FootPos2Dy is y. SET shoulderDistanceOffset to FootPos2Dx. SET servoGet2 to ship:partsdubbed("RFRotatron"). SET servoMods2 To List(). for L In servoGet2{servoMods2:add(L:getmodule("mumechtoggle"))}. SET coxaAngle to servoMods2:GETFIELD("Rotation:"). SET radCoxaAngle to (Constant():PI / coxaAngle * 180). SET z to FootPos2Dx * COS(radCoxaAngle). SET FootPos3D to List(). FootPos3D:ADD(x). FootPos3D:ADD(y). FootPos3D:ADD(z). return FootPos3D. }. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
Dunbaratu: Can you assist to demo how to make a 3D array? I want to extend this array to add a dimension for mod lists for each tagged part. Is there a better way to state the size of the array than adding lists one at a time? SET TAGS TO LIST(). // Empty list. TAGS:ADD( LIST() ).//0 TAGS:ADD( LIST() ).//1 TAGS:ADD( LIST() ).//2 TAGS:ADD( LIST() ).//3 TAGS:ADD( LIST() ).//4 TAGS:ADD( LIST() ).//5 TAGS[0]:ADD( "FR ROTATRON" ).//0,0 front right leg hip, and 1,2,3 knees TAGS[0]:ADD( "FR FOLDATRON1" ).//0,1 TAGS[0]:ADD( "FR FOLDATRON2" ).//0,2 TAGS[0]:ADD( "FR FOLDATRON3" ).//0,3 TAGS[1]:ADD( "FL ROTATRON" ).//1,0 front left leg hip, and 1,2,3 knees TAGS[1]:ADD( "FL FOLDATRON1" ).//1,1 TAGS[1]:ADD( "FL FOLDATRON2" ).//1,2 TAGS[1]:ADD( "FL FOLDATRON3" ).//1,3 TAGS[2]:ADD( "MR ROTATRON" ).//2,0 mid right leg hip, and 1,2,3 knees TAGS[2]:ADD( "MR FOLDATRON1" ).//2,1 TAGS[2]:ADD( "MR FOLDATRON2" ).//2,2 TAGS[2]:ADD( "MR FOLDATRON3" ).//2,3 TAGS[3]:ADD( "ML ROTATRON" ).//3,0 mid left leg hip, and 1,2,3 knees TAGS[3]:ADD( "ML FOLDATRON1" ).//3,1 TAGS[3]:ADD( "ML FOLDATRON2" ).//3,2 TAGS[3]:ADD( "ML FOLDATRON3" ).//3,3 TAGS[4]:ADD( "RR ROTATRON" ).//4,0 rear right leg hip, and 1,2,3 knees TAGS[4]:ADD( "RR FOLDATRON1" ).//4,1 TAGS[4]:ADD( "RR FOLDATRON2" ).//4,2 TAGS[4]:ADD( "RR FOLDATRON3" ).//4,3 TAGS[5]:ADD( "RL ROTATRON" ).//5,0 rear left leg hip, and 1,2,3 knees TAGS[5]:ADD( "RL FOLDATRON1" ).//5,1 TAGS[5]:ADD( "RL FOLDATRON2" ).//5,2 TAGS[5]:ADD( "RL FOLDATRON3" ).//5,3 //thirdsegs are required at most times to be perpendicular to the terrain. //firstsegs and secondsegs are at most times required to mirror each other. //when walking, only first segment raises, second segment stays put, or is //proportional. //walking requires two set of tripods in mirrored motion. //other walk profiles are quite elegant to watch and should be programmed. //"wave" and "ripple" gaits are possible. But tripod is fastest. -
//KOS //CC attribution Peter Goddard (2015) //Servo routine with position seek // command structure: run seek(1,55) this will seek 55 degrees for all parts named "Rotatron - Right-Angle" declare parameter sel. declare parameter seek. // Title Name if sel = 1 SET part to "Rotatron - Right-Angle". //IR_Rotatron_Right min -360 max 360 if sel = 2 SET part to "Foldatron - Wide Angle (180 degrees)". //IR_Foldatron_ExtendedRange min 0 max 180 if sel = 3 SET part to "Foldatron - Hinge". //IR_Foldatron_Hinge min 0 max 180 if sel = 4 SET part to "Foldatron - Inset (Start)". //IR_Foldatron_Inset min -360 max 360 if sel = 5 SET part to "IR-M Rover Movatron - Large". //IR_LargeWheel min -360 max 360 set speed to 2. SET HALTLIST TO LIST(). //sets up part list and sets list of PartModules for those parts Set Servoget To Ship:PARTSDUBBED(part). Set Servomods To List(). for L In Servoget{servomods:add(L:getmodule("mumechtoggle")).}. //loops through list, sets the range of travel to currentpos & seekpos set x to 1.5. Until x = 0{ set Index To 0. HALTLIST:CLEAR(). until Index = Servomods:length{ set Servo To Servomods[index]. set position to Servo:GetField("Rotation:"). if seek < position {set minimum to seek. set maximum to position.} else {set maximum to seek. set minimum to position.} Servo:SETFIELD("Min Rotate", minimum). Servo:SETFIELD("Max Rotate", maximum). //find the direction to move, and move if seek < position {servo:DOACTION("move -", true).} else {servo:DOACTION("move +", true).} //accel and decel experimental uncomment to try it //if abs (position - seek) > 15 {set speed to speed * 1.15.} //else {set speed to speed * .5.} Servo:SETFIELD("coarse speed", speed). //stop movement if seek = position {servo:DOACTION("move +", FALSE). servo:DOACTION("move -", FALSE). HALTLIST:ADD(INDEX).} set Index To Index + 1. } if HALTLIST:length >= Servomods:length {Break.} }
-
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
I think your message may have gotten off the bus a couple of stops early. It's impossible to say what the problem might be without knowing the craft you are trying to use. If the parts were actually missing, the craft wouldn't load. So it's a bit confusing how you can open it and some parts don't appear. Give us a few more hints and we can definitely help. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
Yeah, tried a new dropbox app for picture sharing. I think it sucks. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
Putting the final touches on a new toy for kOS. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
What's that old saying? "You got a hundred problems kid, but rolling ain't one of them." I tried your script and it worked fine. Did you turn SAS off? That's what would happen if it was on. Good luck! -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
I found a bug in the routine for choosing boot files. I commented on this a while ago, and i guess everyone was non-plussed. But I found the little buggy and squashed him. It turns out it's not true bug in the code, but a little varmint called .DS_Store which is a system file sprinkled here and there by OS X and you cannot turn it off. The file handling override code counts the files in the archive folder which returns a number including the hidden files, then an index is created for the files beginning with "boot". But the way the index is created, the initial count including the .DS_Store file throws the index off by 1, so the last file can't be shown in the control, and the first file is repeated. If you are on a MAC you can duplicate this by creating a subdirectory in the scripts folder. Another file sneaks into the folder as well, no idea where it came from, but it is a system file called .swp same issues. The cure? Delete the hidden files. They do practically nothing for you. you can expose them with instructions found here: http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/ -
[0.90] Magic Smoke Industries Infernal Robotics - 0.19.3
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
A little preview of a function I'm going to push to Sirkut. It's terrific! -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
I have a new idea for integration with IR. One of the big problems with robotics traditionally is it is very difficult to imagine/convey the precise movements required to do anything. You add multiple legs or multiple arms to coordinate and you have a real conceptual difficulty. In robotics they get around that by having a training mode. You physically move the robot through the motions and they simply learn it and repeat it. Now, I don't think we can do that... too many hurdles. But if you think of stop-motion as an analogy for what we want... What we can do is move a robotic to incremental positions, and record the incremental translations of the various servos, maybe through the log function. I'm thinking a machine could be trained to follow my servo script and the results could be spectacular. I delayed any effort to make my robot bug-walk because I hadn't thought of an elegant way till now. I didn't want it clanking around stumbling over every obstacle, I want it to walk properly and turn, etc. negotiate obstacles and maybe even automatically load cargo or some other task. O man, what am I getting into now? -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
I'm literally squealing like a little girl. -
[0.90] Magic Smoke Industries Infernal Robotics - 0.19.3
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Hey Twiget, glad you solved your problem. It made me think I should post some suggestions on Robotic Symmetry based on my experience. In the very badly drawn diagram it shows the normal expectations from symmetrical robotic parts moving axially from a ship. In radial symmetry all the parts move in the same direction around a common axis. Because they are symmetrical you would have to reverse the rotation of one of each pair to have them move in opposing manner. This will require you to remove symmetry with a tool called "strip symmetry" http://www.curse.com/ksp-mods/kerbal/220656-stripsymmetry. Otherwise when you change the rotation of one you change them all. This will get you going if you use the Infernal Robotics controls or Action Groups to control your parts. (more on the effects with Kerbal Operating System kOS later) In mirror symmetry you can install pairs of parts and they will operate in opposing motion from the get go. Mirror symmetry will still obey snapping to angles so getting them lined up is no problem. I still suggest stripping symmetry. If you are making a multiple joint legs. Build one, and get it positioned and rotated to where you want it. Then save it as a subassembly and add multiples back with symmetry. This is not so crucial with IR controls but MAJORLY important with robotics controlled by kOS. Especially if you are going to use acceleration curves. Not getting the legs identical attracts Krakens. For kOS controlled robotics, it is important to ALWAYS use mirror symmetry. This is because invert axis does not do what you think it does. It reverses the direction via the built in IR controls, but + and - directions remain the same. By adding parts in mirror mode you are making servos with mirrored +- directions. If you attach the parts in radial mode your +- are all facing the same direction axially. There's no way to change it. Maybe Sirkut will add another control or change the way reverse rotation works. (I don't think it would be game save breaking). That's all I got. G -
[0.90] Magic Smoke Industries Infernal Robotics - 0.19.3
Dr_Goddard replied to sirkut's topic in KSP1 Mod Releases
Hey Sirkut. There was one more thing I needed to do before I dispatch some poor Kerbals on a mission with this beast. Sound pitch linked to the speed of the servos (and my own sound file stolen from a SkyLift) makes it so much more "robot-ish" I hope you enjoy. It's just one line of code added to your methods. -
[1.3] kOS Scriptable Autopilot System v1.1.3.0
Dr_Goddard replied to erendrake's topic in KSP1 Mod Releases
I'm really looking forward to this because the big terminal screen in the way all the time really detracts from the experience. I've been thinking we need a script command to close the terminal window. Poor man's autorun.