Jump to content

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


r4m0n

Recommended Posts

The last sentence made me go overboard. Re-reading today I see that I may have miss-interpreted it. This thread thread is getting under my skin easily those days, and it was a bad days/ That does not excuse me anyway :(

Sorry about that numerobis.

Let me retry with a more constructive post.

I'm trying to figure out why MechJeb consistently overcorrects roll and yaw on my aircraft (stock KSP aero). Yaw tends to stay fairly OK, but roll grows from perfectly OK on takeoff to +/- 30 degrees by 5km, sometimes earlier. It doesn't get worse than that, and by 15km the problem resolves itself, but that still means I'm doing S turns through the lower atmosphere.

I did not retest the whole aero surface code for a while, but afaik nothing changed on KSP side since I wrote it. The way you describe the problem I may be missing a Krakensbane somewhere.

I'm highly suspicious of this code: https://github.com/MuMech/MechJeb2/blob/dev/MechJeb2/VesselState.cs#L455

// TODO : Tweakable for ignorePitch / ignoreYaw  / ignoreRoll 
ModuleControlSurface cs = (pm as ModuleControlSurface);
Vector3d partPosition = p.Rigidbody.worldCenterOfMass - CoM;

Vector3d airSpeed = vessel.srf_velocity + Vector3.Cross(cs.part.Rigidbody.angularVelocity, cs.transform.position - cs.part.Rigidbody.position);

Quaternion airSpeedRot = Quaternion.AngleAxis(cs.ctrlSurfaceRange * cs.ctrlSurfaceArea, cs.transform.rotation * Vector3.right);

Vector3 ctrlTroquePos = vessel.GetTransform().InverseTransformDirection(Vector3.Cross(partPosition, cs.getLiftVector(airSpeedRot * airSpeed)));
Vector3 ctrlTroqueNeg = vessel.GetTransform().InverseTransformDirection(Vector3.Cross(partPosition, cs.getLiftVector(Quaternion.Inverse(airSpeedRot) * airSpeed)));
ctrlTorqueAvailable.Add(ctrlTroquePos);
ctrlTorqueAvailable.Add(ctrlTroqueNeg);

First off, that TODO is an issue with my planes: every single one of my control surfaces is limited.

Link to comment
Share on other sites

I'm sorry if this has been asked before (possibly over and over) but I can't seem to find an answer while searching.

Is MJ supposed to work properly with Remote Tech? I've been using RT with kOS for a long time, and just now considering switching to MJ as writing kOS scripts is starting to feel a bit too much like going to work in the morning ;)

The problem i'm having is that it seems that MJ can't control the craft if you don't have an active connection to KSP - even if you pressed the "execute" button (or whatever it says) while you had a connection.

Is this intended behavior, as in these are not compatible, or am I doing something wrong?

I'm just so sure that I have read somewhere that MJ is a good compliment to RT.

Anyway, thanks for the good job you are doing! :)

Link to comment
Share on other sites

I'm sorry if this has been asked before (possibly over and over) but I can't seem to find an answer while searching.

Is MJ supposed to work properly with Remote Tech? I've been using RT with kOS for a long time, and just now considering switching to MJ as writing kOS scripts is starting to feel a bit too much like going to work in the morning ;)

The problem i'm having is that it seems that MJ can't control the craft if you don't have an active connection to KSP - even if you pressed the "execute" button (or whatever it says) while you had a connection.

Is this intended behavior, as in these are not compatible, or am I doing something wrong?

I'm just so sure that I have read somewhere that MJ is a good compliment to RT.

Anyway, thanks for the good job you are doing! :)

It works for me. And that behavior is how it's supposed to work. If you don't have a connection the craft is essentially dead. Not even MJ will work. Your only hope is to program RT's autopilot before you lose the connection. In the end it's just easier to keep it connected at all times (unless you're doing a reentry and have to shut down your com devices).

Link to comment
Share on other sites

It works for me. And that behavior is how it's supposed to work. If you don't have a connection the craft is essentially dead. Not even MJ will work. Your only hope is to program RT's autopilot before you lose the connection. In the end it's just easier to keep it connected at all times (unless you're doing a reentry and have to shut down your com devices).

Hmm.. I don't really agree with "that's how it's supposed to work" :) I think it should work much like RT's autopilot itself - if I press execute while it has connection, it should be able to finish the "program" that it's running.

As for "keeping it connected at all times", that is easy once you have com networks setup everywhere. Less easy on your first satellite to wherever it is you are sending it :)

Oh well, if it's not supported i'll have to keep using kOS I suppose, thanks anyway!

Link to comment
Share on other sites

Hmm.. I don't really agree with "that's how it's supposed to work" :) I think it should work much like RT's autopilot itself - if I press execute while it has connection, it should be able to finish the "program" that it's running.

As for "keeping it connected at all times", that is easy once you have com networks setup everywhere. Less easy on your first satellite to wherever it is you are sending it :)

Oh well, if it's not supported i'll have to keep using kOS I suppose, thanks anyway!

I agree. My "that's how it's supposed to work" was just regarding the mechanics. I'm not saying that's the way it should work ;)

Link to comment
Share on other sites

Probably know about this but, I set a randevou autopilot for my space station 300km above kerbin, it went well and got to the point it should start to match the orbit, but suddenly it began to burn, used up all the fuel, I set cheat for inf fuel and the orbit went outside of Kerbin sphere and then stopped.

Link to comment
Share on other sites

Does anyone know if it's possible to tweak MJ's sensitivity to play nicely with FAR? It seems that MJ just can't handle any craft with aerodynamic surfaces without going nuts when using FAR.

See this http://forum.kerbalspaceprogram.com/threads/60933-Optional-MechJeb-Modules

It will help, but don't expect mechjeb to work as well with FAR as it does with stock.

Link to comment
Share on other sites

There seems to be a slight (But VERY annoying) incompatibility with all air intakes. Putting on mechjeb will result in all intakes other than the "pair" first placed to stop in-taking air. Took me hours disassembling,reassembling,uninstalling and restarting to pin point this issue. I am not sure if it is so in stock ksp but i'm am sure that it breaks B9 saber engine intakes at the very least(again, only one pair of intakes will actually work). BTW, thank you for all the hard work you put into this mod. I really enjoy using it to the point where I now dread actually performing maneuver nodes manually. Though it will be much appreciated if the issue is fixed soon as i really enjoy building ssto's and I hate to see all the designs that involve multiple intakes simply refuse to work.

Link to comment
Share on other sites

There seems to be a slight (But VERY annoying) incompatibility with all air intakes. Putting on mechjeb will result in all intakes other than the "pair" first placed to stop in-taking air. Took me hours disassembling,reassembling,uninstalling and restarting to pin point this issue. I am not sure if it is so in stock ksp but i'm am sure that it breaks B9 saber engine intakes at the very least(again, only one pair of intakes will actually work). BTW, thank you for all the hard work you put into this mod. I really enjoy using it to the point where I now dread actually performing maneuver nodes manually. Though it will be much appreciated if the issue is fixed soon as i really enjoy building ssto's and I hate to see all the designs that involve multiple intakes simply refuse to work.

That doesn't sound like a "slight incompatibility" and there are so many people using MJ that, if this was the case, I'm sure I would have seen it reported in this thread before, which I haven't. I suspect you will need to provide significantly more information about the problem before anyone will even bother thinking about investigating it. E.g. at the very least, the versions of KSP and MJ you are using, log files and screenshots and/or craft files that display the problem...

Link to comment
Share on other sites

There seems to be a slight (But VERY annoying) incompatibility with all air intakes. Putting on mechjeb will result in all intakes other than the "pair" first placed to stop in-taking air. Took me hours disassembling,reassembling,uninstalling and restarting to pin point this issue. I am not sure if it is so in stock ksp but i'm am sure that it breaks B9 saber engine intakes at the very least(again, only one pair of intakes will actually work). BTW, thank you for all the hard work you put into this mod. I really enjoy using it to the point where I now dread actually performing maneuver nodes manually. Though it will be much appreciated if the issue is fixed soon as i really enjoy building ssto's and I hate to see all the designs that involve multiple intakes simply refuse to work.

This may be an obvious question, but are you using the "Manage Air Intakes" utility in MechJeb? That function closes intakes when more intake air than required is available, at low altitude or throttle settings it might seem like most of the intakes are not working.

Link to comment
Share on other sites

hello all

can nayone tell me is there a possibility of stopping MJ from creating CFG file for every craft i launch? i just need one cfg the default one to be loaded and not to remember each and every one for all the different crafts i launch

thx

Link to comment
Share on other sites

This may be an obvious question, but are you using the "Manage Air Intakes" utility in MechJeb? That function closes intakes when more intake air than required is available, at low altitude or throttle settings it might seem like most of the intakes are not working.

Lol, thank you for the notice. I cant believe I got so frustrated because of this. I guess i really shouldn't be clicking on button whose function I don't know.

Link to comment
Share on other sites

Are there any smaller parts available, or would it be possible to scale the Mechjeb case down?

I'm having a hard time installing mechjeb on my interplanetary probe bodies.

If you have module manager installed, just paste the following text into a text editor, and save it in your gamedata folder as "mj_everywhere.cfg". It'll add MJ to all command pods and probe cores. You'll never need a case again.

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]] 
{
MODULE
{
name = MechJebCore
}
}

Link to comment
Share on other sites

Lol, thank you for the notice. I cant believe I got so frustrated because of this. I guess i really shouldn't be clicking on button whose function I don't know.

Managing air intakes is your friend. Open intakes contribute to drag. Closing them when not needed reduces drag.

Link to comment
Share on other sites

dtoxic : nope. I could add something do disable it and have only one global config. I ll need to look into the impact.

Edit : a quick look show that it would kill the flight recorder (aka Launch to rendez-vous) and impact the unlock module with tech tree stuff.

Edited by sarbian
Link to comment
Share on other sites

Okay, either I'm completely misunderstanding the RCS Balancer, or it's severely bugged for me.

I've tried using it with lots of crafts. Typically, they're small to medium drones with 4x RCS ports (at 0/90/180/270, i.e. cardinal directions, 4x symmetry, not off-axis) around a monopropellant tank, roughly around the center of mass (design permitting), and with ample SAS to correct an off-center burn. This should be an absolute piece of cake  I can RCS normally, without the balancer, and I get good control, and the torque is nothing SAS can't handle.

When I enable the RCS Balancer, the result is almost always the same: I can't RCS in at least two directions, often more. I poke all the different RCS directions, find that half of them do absolutely nothing, and so I give up and turn off the RCS Balancer and do it normally.

In my most recent example, I put 4x Vernor Engines at the center of mass of the ship, then 4x more at the top and 4x more at the bottom, again in the four cardinal directions. Without the RCS balancer: If I press up, all three down engines fire; if I press left, all three right engines fire; etc. With the RCS balancer on, left and right each fire only the top engine (leaving SAS to counter the visible torque), while up and down do absolutely nothing.

Honestly, the only reason I really want the RCS Balancer is to disable RCS for rotation. But I pretty much can't ever operate with the Balancer enabled, so I'm stuck just disabling RCS whenever I rotate and enabling it whenever I translate, which is annoying as hell.

Am I just using this feature wrong, or is there maybe some incompatibility with another mod? The only one I can think of would be RemoteTech, which does mess with controls for ships somewhat; but, the only thing I've ever seen it mess with re: MechJeb is preventing MechJeb from doing anything if the connection breaks (and I'm operating in very well-connected space, with low latency).

Link to comment
Share on other sites

dtoxic : nope. I could add something do disable it and have only one global config. I ll need to look into the impact.

Edit : a quick look show that it would kill the flight recorder (aka Launch to rendez-vous) and impact the unlock module with tech tree stuff.

ahh well we cant have everything now can we :)

thx for the answer

Link to comment
Share on other sites

So, I've searched and seen this asked a few times, but I don't know if it has ever been seriously considered:

It would be useful to have an option (probably in utilities) to INVERT GUIDANCE (upside-down pod syndrome). Yes, this can be worked around by better ship design/planning, but it would still be nice to have it there as an option for when you forget, or something breaks, or you forget :) Should requests go in here, or over on the ISSUES page.

.../me realizes he made the mj module attachable and gets out and flips it over.. :)

still, would be a useful option

Link to comment
Share on other sites

On the manoeuvre planner and editor, could it be possible to add in a 'Throttle Limiter' slider option? At the moment, MJ applies full 100% throttle which is nice and all, but for things like ion drives, 100% throttle may not be available or even intended (due to weight/size constraints etc) for long duration burns.

Link to comment
Share on other sites

On the manoeuvre planner and editor, could it be possible to add in a 'Throttle Limiter' slider option? At the moment, MJ applies full 100% throttle which is nice and all, but for things like ion drives, 100% throttle may not be available or even intended (due to weight/size constraints etc) for long duration burns.

The 'Utilities' window contains options for both 'Limit acceleration to xxxx m/s' and 'Limit throttle to xxxx %'

Link to comment
Share on other sites

Okay, either I'm completely misunderstanding the RCS Balancer, or it's severely bugged for me.

I've tried using it with lots of crafts. Typically, they're small to medium drones with 4x RCS ports (at 0/90/180/270, i.e. cardinal directions, 4x symmetry, not off-axis) around a monopropellant tank, roughly around the center of mass (design permitting), and with ample SAS to correct an off-center burn. This should be an absolute piece of cake  I can RCS normally, without the balancer, and I get good control, and the torque is nothing SAS can't handle.

When I enable the RCS Balancer, the result is almost always the same: I can't RCS in at least two directions, often more. I poke all the different RCS directions, find that half of them do absolutely nothing, and so I give up and turn off the RCS Balancer and do it normally.

In my most recent example, I put 4x Vernor Engines at the center of mass of the ship, then 4x more at the top and 4x more at the bottom, again in the four cardinal directions. Without the RCS balancer: If I press up, all three down engines fire; if I press left, all three right engines fire; etc. With the RCS balancer on, left and right each fire only the top engine (leaving SAS to counter the visible torque), while up and down do absolutely nothing.

Honestly, the only reason I really want the RCS Balancer is to disable RCS for rotation. But I pretty much can't ever operate with the Balancer enabled, so I'm stuck just disabling RCS whenever I rotate and enabling it whenever I translate, which is annoying as hell.

Am I just using this feature wrong, or is there maybe some incompatibility with another mod? The only one I can think of would be RemoteTech, which does mess with controls for ships somewhat; but, the only thing I've ever seen it mess with re: MechJeb is preventing MechJeb from doing anything if the connection breaks (and I'm operating in very well-connected space, with low latency).

There's a few possibilities

One is that they are firing but the FX are too faint or for some reason aren't coming on at all even though the RCS might be. You should probably able to confirm or dispel that theory fairly easily by turning SAS off. If it's really having to compensate then it'll get unbalanced very quickly. (warning though, the autopilot/smartass WILL get confused by the lack of reaction wheels so only test by using manual control with SAS off)

Second possibility is that the ship just got glitched and if you quicksave / quickload it back in, then it will fix itself. (that happens to me a lot especially with multiple MJ active ships within physics range of each other and even more especially if I've switched reference points like docking ports or if I undocked one recently)

Third possibility is an old long standing bug where RCS doesn't want to fire if you hold down one of the translating keys. This is real easy to test for. Zoom in closely on one of the faulty RCS and hold down the key that should activate it in translation. Watch what happens to that port when you release the key. You may see a puff from it. (might be faint so try tapping the key repeatedly). If you do see a puff on release then quicksave and quickload as above. I know it's frustrating and it hits me all the time :(

Link to comment
Share on other sites

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