Jump to content

[PART, 1.0.2] Anatid Robotics / MuMech - MechJeb - Autopilot - Historical thread


r4m0n

Recommended Posts

ive actually done stuff like that in other games. im not sure if the engine would let you but you could probibly require() luasocket with autom8, and you would be able to pass info from autom8 to other programs, or in my case (and in another game) i talked to an arduino with an ethernet shield and some 7 segment displays (a raspberry pi with a small touchscreen would be better). the result -> HARDWARE GAUGES! of course any game dev with an eye to security would lock down module loading facilities for securities sake to keep hackers out of the system.

Link to comment
Share on other sites

Well this is just C# code, and they didn't use a code obfuscator, so it's pretty easy to see the code itself using ILSpy or Reflector. Some of the stats are actually calculated on the fly during the Gui methods. If mechjeb exposed the stats through a service facade on the dll at the very least, I could code against that. Ideally though, a web service running from the MechJeb plugin would be the best, then anyone could code up an outside gui, or drive hardware against it.

Link to comment
Share on other sites

lua lets you be kind of sneaky. i have the beginnings of a lua standalone game engine that you can program while its running. the things you can do with it are actually quite amazing. ive got an opengl renderer, freetrack support, and a whole lot of other cool things implemented, without a line of compiled code. its quite impressive.

Link to comment
Share on other sites

So, I actually started implementing a JSON TCP stream out of the MuMechLib that will return stats when onPartFixedUpdate() is called. I'll have to see if the MuMech guys like it or not - it's their code, they'd have to commit it of course. Curious to see what could be done in LUA however. I'm thinking about having a stand-alone http.sys console app that will consume the TCP stream and allow you to browse to the stats.

Link to comment
Share on other sites

maybe this has been asked before, but with the autom8 command line, is there a delay function?

say, I want my mechjeb controlled rocket to land on the mun

I drive off in my rover

I want the rocket to wait 10 minutes, then close up the landing gear (important, if there's a seperate command available awesome)

then plot a course for KSP...

and maybe there are ways around this with the auto flight

but what are the available programmable commands?

Link to comment
Share on other sites

timestamps are your friend:


function initTimeStamp(t)
return whateverfunctiongetscurrenttime() + r
end

function evaluateTimeStamp(ts)
if whateverfunctiongetscurrenttime() > ts then return true else return false end
end

just call initTimeStamp() before a while loop, and evaluateTimeStamp() each iteration.


initTimeStamp(500)
while not evaluateTimeStamp() do
--do nothing
end

granted you should use a coroutine so you can do other things while waiting for the loop to end.

disclaimer: this is generic code and does not reflect the proper usage in autom8.

Link to comment
Share on other sites

I seem to be having some issues with Smart ASS and the ascent autopilot. Throttle and staging are fine on ascent but Mechjeb seemingly won't pilot the rocket anymore, also the ship will just spin endlessly when I use any of the options on Smart ASS. I didn't change anything recently so I'm wondering what happened.

EDIT: Fixed by deleting and replacing mechjeb parts.

Edited by Arkasai
Link to comment
Share on other sites

I may be being blind, but I can't find the kill relative velocity button in 1.9.1. Is there an equivalent function that uses RCS to kill low speed in any direction? I found that really useful before, I'm not so good at rendezvous without it!

Will the extra info about velocity on each axis etc come back in a future version or has that been taken for good?

Link to comment
Share on other sites

I may be being blind, but I can't find the kill relative velocity button in 1.9.1. Is there an equivalent function that uses RCS to kill low speed in any direction? I found that really useful before, I'm not so good at rendezvous without it!

Will the extra info about velocity on each axis etc come back in a future version or has that been taken for good?

These are really useful functions which have been removed from the current version..... many many of us are hoping to see them return in version 1.9.2 :-)

Link to comment
Share on other sites

What are the tricks to getting mechjeb to work with "probes"? I've created a spacecraft with a mechjebAR202 on the main capsule and a detachable probe, also with a mechjebAR202. The probe is lower in the stack then the capsule, and attached via a stack decoupler, rcs tank and 4 thrusters.

When I detach the probe, mechjeb will close, and often I can't end the flight or switch sessions. I have to <cmd>-q the app to close it. did i mention i'm on a mac, .16, mechjeb 1.9.1, and no other plugins, though I do have an extra part or two? And exiting and going back seems to be busted as well as going to the spacecraft or the debris which is now in the tracking pick list results in the hang. I then need to remove the debris with the mechjeb from the persistance file by hand to get things to work again.

What am I doing wrong, or what can I do better to improve my chances of getting a controllable probe, which seems like it must be possible since I've seen Scott Manley do it in a video.

Thanks in advance for the help or pointers.

-e

Link to comment
Share on other sites

No, it's just a problem in the current Mechjeb version. It worked fine before on 1.9 and will work again in an upcoming release.

Very well, I guess I'll attempt to patiently await the next release, or is there any wisdom in trying to find version 1.9?

Link to comment
Share on other sites

ive been trying to compile mumech for a week now. i want to attempt to add freetrack support to hull cameras. but before i can do that i need to compile a build that works. ive tried both visual studio 2010 and monodev. both manage to compile the dll just fine. but the dll never wants to work in game. i always get the following error:


Being asked to load D:/KSPdev/KSP_Data/../Plugins\MuMech.dll

(Filename: C:/BuildAgent/work/300357e52574df36/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)

Non platform assembly: D:\KSPdev\Plugins\MuMech.dll (this message is harmless)
Loading assembly: MuMech, Version=1.9.1.0, Culture=neutral, PublicKeyToken=null

(Filename: C:/BuildAgent/work/300357e52574df36/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)

Exception when loading MuMech, Version=1.9.1.0, Culture=neutral, PublicKeyToken=null: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at ModuleLoader.LoadAssembly (System.Reflection.Assembly asm) [0x00000] in <filename unknown>:0

am i missing something in my build configuration or something? i followed all the setup instructions on the wiki and have spent the better half of the last week searching the forum for a solution.

Link to comment
Share on other sites

What are the tricks to getting mechjeb to work with "probes"? I've created a spacecraft with a mechjebAR202 on the main capsule and a detachable probe, also with a mechjebAR202. The probe is lower in the stack then the capsule, and attached via a stack decoupler, rcs tank and 4 thrusters.

When I detach the probe, mechjeb will close, and often I can't end the flight or switch sessions. I have to <cmd>-q the app to close it. did i mention i'm on a mac, .16, mechjeb 1.9.1, and no other plugins, though I do have an extra part or two? And exiting and going back seems to be busted as well as going to the spacecraft or the debris which is now in the tracking pick list results in the hang. I then need to remove the debris with the mechjeb from the persistance file by hand to get things to work again.

What am I doing wrong, or what can I do better to improve my chances of getting a controllable probe, which seems like it must be possible since I've seen Scott Manley do it in a video.

Thanks in advance for the help or pointers.

-e

I've spent several days battling similar issues, couldn't switch crafts, phantom crafts (blank screen claiming to be a craft), unable to end flight or exit (without hitting it). It seemed that mechjeb on both 'mothership' and the probe (in my case a manned vessel) caused issues, I'm not 100% what caused the issues but I seem to have found a stable solution. I added the remote tech plugin and put the SAS and 'RC antenna' from it on the probe . This enabled me to using it as a manned vessel (the RC antenna is not used as antenna, is takes the role of the command pod (i think)).

I tried the remote tech without mech jeb first. I think (not 100% sure, gonna go check again) that I was able to re-attach the mechjeb module and now coupled with remote tech it seems ok. I need to double check that thou.

The other weird thing I have is certain objects loose their position on the mother ship and probe. This only happens after launching the probe(s) and then switching from a distance. In my case the only objects to get messed up are the EVA ladders. I'd left mechjob off to see if it had anything to do with this and as far as I can see it does not.

all issues aside thou, I really like this mod!

Link to comment
Share on other sites

there are two command modules already with mechjeb.

a mechjech command module was not my request, my request was to make a mechjeb part a command module and keep its mechjeb features.

I wanted the process, not the outcome

Link to comment
Share on other sites

ive been trying to compile mumech for a week now. i want to attempt to add freetrack support to hull cameras. but before i can do that i need to compile a build that works. ive tried both visual studio 2010 and monodev. both manage to compile the dll just fine. but the dll never wants to work in game. i always get the following error:


Being asked to load D:/KSPdev/KSP_Data/../Plugins\MuMech.dll

(Filename: C:/BuildAgent/work/300357e52574df36/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)

Non platform assembly: D:\KSPdev\Plugins\MuMech.dll (this message is harmless)
Loading assembly: MuMech, Version=1.9.1.0, Culture=neutral, PublicKeyToken=null

(Filename: C:/BuildAgent/work/300357e52574df36/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)

Exception when loading MuMech, Version=1.9.1.0, Culture=neutral, PublicKeyToken=null: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at ModuleLoader.LoadAssembly (System.Reflection.Assembly asm) [0x00000] in <filename unknown>:0

am i missing something in my build configuration or something? i followed all the setup instructions on the wiki and have spent the better half of the last week searching the forum for a solution.

Try building the DLL for .NET version 3.5.

a mechjech command module was not my request, my request was to make a mechjeb part a command module and keep its mechjeb features.

I wanted the process, not the outcome

Just change the module of your part to MuMechJebPod.

Link to comment
Share on other sites

I'm finding that getting MechJeb to accurately land on the Mun is near-impossible. It always ends up in the "braking burn" phase with the engine throttled down, and the projected landing site is always about 100km west of wherever I actually wanted to land, and it never manages to correct the course. It's annoying because I've previously used the landing autopilot on Minmus to try to rescue the crew of a downed lander, and it was so accurate I had to veer off at the last second to avoid landing on the crashed debris.

Link to comment
Share on other sites

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