Jump to content

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


r4m0n

Recommended Posts

I asked on a seperate thread, but others suggested I ask here - has anyone tried to add support to mechjeb landing guidance for parachutes? I am about to start hacking up some suppoprt for it, but did not want to if others already have, and I also wondered if there were ideas for features in this areas before I start.

In theory, it should be valid already (unless you're using FAR), since it's just increasing drag, biggest issue is that if you get velocity to near zero, the chutes will cut themselves off,

Link to comment
Share on other sites

MechJeb is the best mod of the game, but have just one problem, the part is big, and some probes becomes a little awkward with this. A smaller version would be perfect.

You can get other mods that have MJ incorporated into all the capsules and probe cores without need of the external part. Or maybe you can do this yourself.

Link to comment
Share on other sites

In theory, it should be valid already (unless you're using FAR), since it's just increasing drag, biggest issue is that if you get velocity to near zero, the chutes will cut themselves off,

I thought he was asking if the autopilot could deploy them. as far as using them with retros in landing I do that all the time, but I set landing speed to about 6 or highher depending on how sturdy the part is that has to make ground contact

Link to comment
Share on other sites

In theory, it should be valid already (unless you're using FAR), since it's just increasing drag, biggest issue is that if you get velocity to near zero, the chutes will cut themselves off,

The codebase I am working on (2.0.9) asumes that the drag coefficent is the same at all altitudes, whereas what will actually happen is that the parachutes will semi-inflate at one point and then fully inflate a bit later, which I believe results in mechjeb currently dropping you short of your target.

I was working on it lastnight (until 2am) and will have a little look later once I have dealt with RealLife.

Link to comment
Share on other sites

I have been having a problem with MechJeb 2.0.9 - let me explain:

<clip>There is an assumption that if a stage is not being removed from the craft, then it is OK to stage even if it has not spent all its fuel. (as a side issue this has always annoyed me as it means that if I have a stage for seperating fairings, and another for releasing the cargo, the fairings will get released as soon as the previous stage is active). In this scenario the problem that it causes is that the fuel flow simulation fires the seperatrons as soon as the electric engine becomes active. As a consequence it considers that the craft is going to have a much higher TWR than it will with just the ion engine, and so it does not start the manuover until it is too late.<clip>

I've run into this several times and had to redesign the rocket to work around it. I've even had it light up engines on upper stages with them burning away in the middle of the stack *without instantly blowing up the rocket*. With the exhaust blocked it doesn't add to the thrust.

The latest instance was when I wanted to use some seperatrons as the final stage of my Armed Guard kinetic kill vehicles, to be lit up *after* the two Oscar B tanks were empty. But MechJeb insisted on re-arranging the staging and lighting the seperatrons with the orbital insertion/maneuvering stage engine and KABOOM. Seperatron exhaust is quite effective for carving bits off your rocket, or when properly placed, blowing the whole thing up.

The trick seems to be that MechJeb will not re-stage engines from stages that have at least one separator or decoupler. It seems to consider engines in a stage with only engines as resources to reassign as it sees fit to make up enough thrust for the current weight. For Armed Guard I had to swap the positions of the liquid fuel engine and the seperatrons so they'd become the first stage, but then MechJeb won't automatically light the liquid engine. I guess that gives me a "Nahh, I don't want to smash that leftover booster." moment to abort rather than hitting spacebar.

What is odd though is that MechJeb *doesn't* grab the single 48-7S down to the LV-909 with it being the second stage on the projectile, without a decoupler in its stage.

The fix would simply be to not allow MechJeb to re-arrange the staging. I can't see where this would ever be a "feature" rather than a bug when you've painstakingly built a rocket and arranged its staging in a way that works when launched manually and serially staged using the spacebar.

Where it does work perfectly is in correctly triggering stages that have only decouplers or separators, when fuel tanks connected to them are empty and only have fuel flowing *out*. I built a large SSTO rocket to put a two stage lander into Kerbin orbit, with pipes going in and out everywhere. All the fuel drained first from the outer, smaller tanks rather than dropping evenly in them all, but nothing dropped off because fuel was also flowing out to the outer engines.

Once I finally got it to reach orbit without having to drop any pieces on the way up, the launcher was easy to convert to asparagus by changing the fuel pipes and moving decouplers in the staging, then sent it to the Mun just to test the lander there. Of course the lander also can land on Kerbin, no parachutes. Alan Aerospace Recycling and Packaging prefers the solid, controlled thrust of rocket exhaust over a piece of flimsy fabric. :wink:

Link to comment
Share on other sites

I've run into this several times and had to redesign the rocket to work around it. I've even had it light up engines on upper stages with them burning away in the middle of the stack *without instantly blowing up the rocket*. With the exhaust blocked it doesn't add to the thrust.

The latest instance was when I wanted to use some seperatrons as the final stage of my Armed Guard kinetic kill vehicles, to be lit up *after* the two Oscar B tanks were empty. But MechJeb insisted on re-arranging the staging and lighting the seperatrons with the orbital insertion/maneuvering stage engine and KABOOM. Seperatron exhaust is quite effective for carving bits off your rocket, or when properly placed, blowing the whole thing up.

The trick seems to be that MechJeb will not re-stage engines from stages that have at least one separator or decoupler. It seems to consider engines in a stage with only engines as resources to reassign as it sees fit to make up enough thrust for the current weight. For Armed Guard I had to swap the positions of the liquid fuel engine and the seperatrons so they'd become the first stage, but then MechJeb won't automatically light the liquid engine. I guess that gives me a "Nahh, I don't want to smash that leftover booster." moment to abort rather than hitting spacebar.

What is odd though is that MechJeb *doesn't* grab the single 48-7S down to the LV-909 with it being the second stage on the projectile, without a decoupler in its stage.

The fix would simply be to not allow MechJeb to re-arrange the staging. I can't see where this would ever be a "feature" rather than a bug when you've painstakingly built a rocket and arranged its staging in a way that works when launched manually and serially staged using the spacebar.

Where it does work perfectly is in correctly triggering stages that have only decouplers or separators, when fuel tanks connected to them are empty and only have fuel flowing *out*. I built a large SSTO rocket to put a two stage lander into Kerbin orbit, with pipes going in and out everywhere. All the fuel drained first from the outer, smaller tanks rather than dropping evenly in them all, but nothing dropped off because fuel was also flowing out to the outer engines.

Once I finally got it to reach orbit without having to drop any pieces on the way up, the launcher was easy to convert to asparagus by changing the fuel pipes and moving decouplers in the staging, then sent it to the Mun just to test the lander there. Of course the lander also can land on Kerbin, no parachutes. Alan Aerospace Recycling and Packaging prefers the solid, controlled thrust of rocket exhaust over a piece of flimsy fabric. :wink:

First: Autostaging can be turned off or limited to stop at a certain stage.

Second: I've NEVER had MJ rearrange anything in my rocket. Do you mean things flick around in the staging list in the editor or mid-flight? Or do you mean by "rearranging staging" just that it fires stages in an unwanted way?

If you got stages that MJ can't understand just tell it after which stage to stop autostaging and do them manually then.

Link to comment
Share on other sites

I have the same problem with my stages not set up properly, but that could very well be due to the fact that I also run subassembly manager, which is know to leave a few bist and pieces out when parts are loaded...

I got a few question regarding the maneuver autopilots:

1. what´s a safe distance for the "encounter"-maneuver ? (can I set it to 20 m also and be safe ?)

2. there´s a "security threshold" to set up docking speed. It seems Machjeb never goes beyond that becaue docking takes FOREVER.

I don´t mind waiting because it ´s better than me crashing my ship every time or taking even longer myself, but 2 hours for a 150m approach ? thats just insane...

I am really needing help to increase the docking time (hence those two questions)

thx in advance (oh and great mod!! )

Link to comment
Share on other sites

I have the same problem with my stages not set up properly, but that could very well be due to the fact that I also run subassembly manager, which is know to leave a few bist and pieces out when parts are loaded...

I got a few question regarding the maneuver autopilots:

1. what´s a safe distance for the "encounter"-maneuver ? (can I set it to 20 m also and be safe ?)

2. there´s a "security threshold" to set up docking speed. It seems Machjeb never goes beyond that becaue docking takes FOREVER.

I don´t mind waiting because it ´s better than me crashing my ship every time or taking even longer myself, but 2 hours for a 150m approach ? thats just insane...

I am really needing help to increase the docking time (hence those two questions)

thx in advance (oh and great mod!! )

What do you mean by 'encounter'

Do you mean the Rendezvous Autopilot?

If so, the answer is "It depends."

How maneuverable is the ship you're piloting? How big is the target vessel? If you've got something like a big tanker that is going to take longer to turn 180 deg on its final approach than it takes to actually get there and the other ship is something big like a space station then you'll slam into it if you set the final distance to something like 20. Leave it at default for cases like that.

If they're both small agile ships then you probably won't have a problem.

Edit:

Answer to question #2. Get the latest build from Sarbian's thread. (sorry I have no time to search for it for you, so you'll have to do some work here). That version will pretty much respect the docking speed limit you set, unless you set it to 0 in which case it will try to finish the docking as fast as possible however it can. (I have had it guzzle down 600 units of monoprop and not finish so keep an eye on the situation. If it looks like it's having trouble then set limits for it. It's not perfect and can't always deal with unbalanced designs)

Edited by Starwaster
Link to comment
Share on other sites

You can get other mods that have MJ incorporated into all the capsules and probe cores without need of the external part. Or maybe you can do this yourself.
Incredibly easily. Add this to the part.cfg file right before the last }


MODULE
{
name = MechJebCore
}

Thanks! Works great! But will I have any problem with this mods on the future when update them?

Edited by Carneiro
Link to comment
Share on other sites

Thanks! Works great! But I'll have any problem with this mods on the future when update them?

you will not have problems from MechJeb being updated.

you will have problems if the part that you edited is updated and the part file is overwritten by the update and you would have to edit those files again. directly editing those files is not a good thing to do for that reason.

the best thing to do is get ModuleManager if you don't already have it. (you might, especially if you already use mods that rely on module manager)

what modulemanager does is apply changes to parts without actually altering the files those parts are loaded from. there are ModuleManager configuration files for most command module type parts that will add MechJeb to those parts.

if you do it that way (install modulemanager then install the configuration files that add mechjeb) then you will always have it available no matter if mechjeb or any parts mods you have are updated.

Link to comment
Share on other sites

I have the same problem with my stages not set up properly, but that could very well be due to the fact that I also run subassembly manager, which is know to leave a few bist and pieces out when parts are loaded...

I got a few question regarding the maneuver autopilots:

1. what´s a safe distance for the "encounter"-maneuver ? (can I set it to 20 m also and be safe ?)

2. there´s a "security threshold" to set up docking speed. It seems Machjeb never goes beyond that becaue docking takes FOREVER.

I don´t mind waiting because it ´s better than me crashing my ship every time or taking even longer myself, but 2 hours for a 150m approach ? thats just insane...

I am really needing help to increase the docking time (hence those two questions)

thx in advance (oh and great mod!! )

Usually the rendezvous autopilot leaves the ships with a bit of closing speed. If they both have a decent turn rate you can just set Smart A.S.S. on both to TGT+ and they'll eventually dock (assuming you've set both ports to control from here and as each other's targets) completely hands off. Leave RCS off, it can make the ships chase each other's docking ports and they'll just rub around instead of going straight to connecting.

To speed up docking, I tick up the throttle just a little for a very short time, then when the ports are close together I enable the docking autopilot on one ship, click off on its Smart A.S.S. and set the other ship to Kill Rot. Leave it on TGT+ and it'll delay the docking by trying to chase the other ship's port around.

You can also hit H to use RCS with the docking autopilot (or with both on TGT+, RCS on and autopilot off) to boost the forward speed a little (the autopilot will reverse thrust to slow it back down when you let off H). That helps for shoving it forward that last tiny bit it sometimes takes a few minutes to move to dock.

With MechJeb, docking is the easiest part of KSP. :)

Link to comment
Share on other sites

First: Autostaging can be turned off or limited to stop at a certain stage.

Second: I've NEVER had MJ rearrange anything in my rocket. Do you mean things flick around in the staging list in the editor or mid-flight? Or do you mean by "rearranging staging" just that it fires stages in an unwanted way?

If you got stages that MJ can't understand just tell it after which stage to stop autostaging and do them manually then.

Yes, it moves engines around in the list during flight. The issue seems to be that MechJeb sees engines not paired up with a decoupler or separator as "fair game" to assign as needed to lower stages if it calculates there's not as much thrust in the current stage as it figures there should be.

I know auto staging can be shut off completely, and also stopped after any stage, but it should also be able to automatically run any staging setup that works fine when manually staged - simply by following the list as it's assigned in the editor.

Setting it to 0 and going through a large number of launches to make an SSTO rocket put a heavy lander into orbit (on the default ascent path) was how I knew when I'd finally achieved my goal of having it finish the circularization burn with just a wisp of fuel left in the booster. Until that point it'd run out, stage off then fire the lander's engines to finish.

Link to comment
Share on other sites

Yes, it moves engines around in the list during flight. The issue seems to be that MechJeb sees engines not paired up with a decoupler or separator as "fair game" to assign as needed to lower stages if it calculates there's not as much thrust in the current stage as it figures there should be.

I know auto staging can be shut off completely, and also stopped after any stage, but it should also be able to automatically run any staging setup that works fine when manually staged - simply by following the list as it's assigned in the editor.

Setting it to 0 and going through a large number of launches to make an SSTO rocket put a heavy lander into orbit (on the default ascent path) was how I knew when I'd finally achieved my goal of having it finish the circularization burn with just a wisp of fuel left in the booster. Until that point it'd run out, stage off then fire the lander's engines to finish.

that's not really what's happening. it only appears that way. it's just advancing to the next stage. KSP collapses the two stages together. Stock KSP does that anytime you advance to a stage that has engines from a stage that has engines.

but MJ does not literally re-arrange your stages. It's just advancing to the next stage when you don't want it to.

Link to comment
Share on other sites

.....

Answer to question #2. Get the latest build from Sarbian's thread. (sorry I have no time to search for it for you, so you'll have to do some work here). That version will pretty much respect the docking speed limit you set, unless you set it to 0 in which case it will try to finish the docking as fast as possible however it can. (I have had it guzzle down 600 units of monoprop and not finish so keep an eye on the situation. If it looks like it's having trouble then set limits for it. It's not perfect and can't always deal with unbalanced designs)

thx mate. will take a look into it.

on another side note:

i recently tried to dock my new space-Tug to my orbiting station to get that into Mun orbit soon.

the Tug-Ship has two docking ports: forward and aft

(because I read that pulling stuff is much more stable then pushing tuff)

so I chose the rear docking port, clicked "control fom here" but Mechjeb keeps docking witht he front docking port. am I missing something ?

thanks in advance

Link to comment
Share on other sites

thx mate. will take a look into it.

on another side note:

i recently tried to dock my new space-Tug to my orbiting station to get that into Mun orbit soon.

the Tug-Ship has two docking ports: forward and aft

(because I read that pulling stuff is much more stable then pushing tuff)

so I chose the rear docking port, clicked "control fom here" but Mechjeb keeps docking witht he front docking port. am I missing something ?

thanks in advance

Either it didn't actually shift control (watch the navball when you do it, it should shift)

or the port is on backwards. There's a part that has a little handle thing, that should be facing outwards. See below. That's the side that needs to be facing away from the ship.

YVd7op2.jpg

Link to comment
Share on other sites

I added the MechJebCore module statement to the part.cfg of all my pods. I now find that this seems to cause all control to be lost the instant that ship loses the focus. For example if there are 2 craft 50 meters apart (well within the physics unload distance) and I switch between ships the ship that lost focus loses direction, thrust and nearly any other type of control. By this I mean all vanilla KSP control (except SAS hold it seems), not just MechJeb control. I am still investigating but it looks like I am going back to using the AR202 part because of this. If I remove the MechJebCore statement and use the AR202 then I can do things like, for example, instruct both ships to SmartASS orient towards each other as target while I observe at a distance on EVA or have the ship without the focus to move in and dock to the ship with the focus. I can only report this bug, I have no clue as to why adding MechJeb to the part.cfg should be behaving differently to slapping an AR202 part on the outside of the command pod. I have tried different dev versions and forks of MechJeb2 and they all behave exactly the same way. Linux 64 bit but I don't think that makes any difference.

Edited by Kaa253
Still investigating. Something about this is not right. Perhaps I have an odd clash between two mods.
Link to comment
Share on other sites

I hate to be *that* guy, but I'm having problems installing this. I run Steam, and it's on the latest version that's on Steam, which I assume is .21.

I've put Mechjeb into the Gamedata folder, tried copy/pasting the contents of the individual folders into the parts/plugin folders......still nothing works. On the Steam forums they said there was another .dll needed for Steam, but the link I found was out of date.

Help?

Link to comment
Share on other sites

I hate to be *that* guy, but I'm having problems installing this. I run Steam, and it's on the latest version that's on Steam, which I assume is .21.

I've put Mechjeb into the Gamedata folder, tried copy/pasting the contents of the individual folders into the parts/plugin folders......still nothing works. On the Steam forums they said there was another .dll needed for Steam, but the link I found was out of date.

Help?

your comment about pasting individual files is raising a red flag. copying the mechjeb folder into gamedata is all that's needed.

try the version in this thread... http://forum.kerbalspaceprogram.com/threads/47317-MechJeb-2-Patch-test-bed-release-%28October-10%29

I added the MechJebCore module statement to the part.cfg of all my pods. I now find that this seems to cause all control to be lost the instant that ship loses the focus. For example if there are 2 craft 50 meters apart (well within the physics unload distance) and I switch between ships the ship that lost focus loses direction, thrust and nearly any other type of control. By this I mean all vanilla KSP control (except SAS hold it seems), not just MechJeb control. I am still investigating but it looks like I am going back to using the AR202 part because of this. If I remove the MechJebCore statement and use the AR202 then I can do things like, for example, instruct both ships to SmartASS orient towards each other as target while I observe at a distance on EVA or have the ship without the focus to move in and dock to the ship with the focus. I can only report this bug, I have no clue as to why adding MechJeb to the part.cfg should be behaving differently to slapping an AR202 part on the outside of the command pod. I have tried different dev versions and forks of MechJeb2 and they all behave exactly the same way. Linux 64 bit but I don't think that makes any difference.

I want to say that that capability was removed but I'm not sure it has... and as far as I know, AR202 is only different in that it has code to animate the red/green lights. Can someone else confirm or deny that part?

on the other hand though, I had two ships docking last night and the approach was botched and the target was bumped and sent into a gentle spin so I hurriedly switched and killed rotation. Then I noticed that the other ship still firing RCS so I continued to watch, still focused on the target ship. The first ship finished docking clearly under MJ control. MJ functionality added via modulemanger, no AR202. I havent seen it do that in a while. It's Conti's branch I think with no changes from myself save cosmetic. (changed smartASS name for another user on thr forum)

so you might want to try his branch.

Edited by Starwaster
Link to comment
Share on other sites

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