Jump to content

[1.4+] BETA: Kerbal Attachment System (KAS) v1.0 Release Candidate 1


Recommended Posts

I think that the TB-60 would work better if the rear connector didn't have a rotator. Then it would work much better for towing vehicles without them sidling off to either side, and you could build proper caravans and such.

Nice job though, gonna have to put this on my install asap

Link to post
Share on other sites
12 minutes ago, PowderPhysics said:

I think that the TB-60 would work better if the rear connector didn't have a rotator. Then it would work much better for towing vehicles without them sidling off to either side, and you could build proper caravans and such.

With rear end fixed it will be impossible to connect vessels without shifting vessels from the script (link port will have to be exactly aligned with the link). Plus, link still need to be flexible in vertical plane to compensate surface roughness. I was thinking to add a spring to keep link aligned at the rear end but it raises another question: what spring force will be good? For heavy vessel the force should be strong, but it will drag light vessels right on connection.

This part was born spontaneously, it wasn't in the original design. I just liked the idea to tow vehicles and figured out TJ-2 can be used for this. But now I liked TB-60 as a design, so I'll continue working on it. In the tests attaching vessels without docking improved stability a bit. If I figure out how to control wheels rotation then the problem with stability will be solved.

Link to post
Share on other sites

Disclaimer that I haven't played with this mod yet, I'm just kind of lurking here until it gets a bit less beta.

From my experience with dynamics, I'm not convinced the stability of towed trailers has something to do with being part of the same vessel. I think it's mostly due to the trailer being on a two-joint link because this introduces a degree of freedom that lets its steering angle diverge from the direction of travel, leading to the oscillation @Space Scumbag's video showed. There could be a few solutions: somehow figure out a way to make one of the endpoints fixed (although you've already pointed out the problem of initialization. Maybe add a button to lock the horizontal angle of the tow bar when it next passes through zero?); dampen the sideways motion of the trailer with a spring in the link (as mentioned); or dampen the sideways motion by increasing the tension in the connection by increasing the friction in the trailer's wheels. Squad's wheels have impressively low rolling friction which isn't helping us in this case. I also haven't played around with the new wheels much yet, but is there a slider for friction or something? If so, increasing this on the trailer should make it a bit more stable.

Link to post
Share on other sites
18 hours ago, IgorZ said:

I was thinking to add a spring to keep link aligned at the rear end but it raises another question: what spring force will be good?

Make it a Tweakable?

Anyway, great work so far. I hope it won't take AKI Surface Experiment Pack too long to hop onto the bandwagon - it looks like this has the potential to vastly improve the extremely wonky physics of that mod's connectors...

Link to post
Share on other sites
On 10/24/2016 at 1:43 PM, Booots said:

From my experience with dynamics, I'm not convinced the stability of towed trailers has something to do with being part of the same vessel. I think it's mostly due to the trailer being on a two-joint link because this introduces a degree of freedom that lets its steering angle diverge from the direction of travel, leading to the oscillation @Space Scumbag's video showed.

Tried it. It helps a little but not more than making an undocked connection. Real solution is both: one pivot joint and wheels friction increase. And the friction setting is the most significant. See the demo:

Note that most significant axle is the closest one to the joint. That's where Unity assumes the two vessels have a pivot. With low friction settings regardless to the part configuration the vessel being towed tends to rotate the tow vessel. And increasing friction at tow vessel improves stability dramatically.

There can be only two good solutions to overcome the stability issue:

  1. Better friction on the tow vessel.
  2. Active steering on the vessel being towed (I have no idea how to do it as of now).
Edited by IgorZ
Link to post
Share on other sites

An update. @winn75 who is author of old models and textures in KAS has kindly agreed to release them under Public Domain license in KAS 1.0 package. That said, KAS 1.0 is now fully under this type of license. Now supporting and extending the mod will be much easier. Also, if you want making your own mod and going to borrow pieces of KAS 1.0 you can do it now. Reference to the authors is appreciated but according to the license is not required. See updated license here.

 

Edited by IgorZ
Link to post
Share on other sites

So, I'm having difficulty replicating @IgorZ's and @Space Scumbag's demos of towing videos. It seems all of my wheels (stock) are being autostrutted to the heaviest part of the (now linked) vessel, and my tow joint will not articulate.

Spoiler

b8eecc1939.jpg348108d017.jpg

How do I overcome this?

edit: I am actually having this rigid connection behavior even when the attached vessel (trailer) has no wheels. Odd indeed. (.071 patch)

Thanks,

Falap

Edited by FlyingFalap
additional info
Link to post
Share on other sites
On 30.10.2016 at 10:58 PM, FlyingFalap said:

So, I'm having difficulty replicating @IgorZ's and @Space Scumbag's demos of towing videos. It seems all of my wheels (stock) are being autostrutted to the heaviest part of the (now linked) vessel, and my tow joint will not articulate.

  Hide contents

b8eecc1939.jpg348108d017.jpg

How do I overcome this?

edit: I am actually having this rigid connection behavior even when the attached vessel (trailer) has no wheels. Odd indeed. (.071 patch)

Thanks,

Falap

Hmm. It looks like a mods conflict. Do you have any mod that deals with autostruts? By default game creates autostruts for the wheels, but when joint is marked as "pivot" then they are not crossing it. TB60 and TJ2 are pivot joints and stock game reacts to them as expected. I'd suggest you have a mod that doesn't respect this setting. And it would be great if we could figure out the name.

On 26.10.2016 at 2:11 PM, Space Scumbag said:

Hey IgorZ,

maybe lo-fi, the dev of the Kerbal Foundries mod, can help you with the towing stuff.

He made similar stuff in the past. Just read his old posts and send him a pm.

 

I've actually figured out how to controls the wheels. It's very easy when you know how :) In the next release there will be TB-60 with active steering option. It gives good stability on two vehicles. Though, for the steering to work properly the bar must be attached at the proper location.

Link to post
Share on other sites
10 hours ago, IgorZ said:

Hmm. It looks like a mods conflict. Do you have any mod that deals with autostruts? By default game creates autostruts for the wheels, but when joint is marked as "pivot" then they are not crossing it. TB60 and TJ2 are pivot joints and stock game reacts to them as expected. I'd suggest you have a mod that doesn't respect this setting. And it would be great if we could figure out the name.

You're right @IgorZ, it was a mod conflict. It seems that the flexible joints are not compatible with @ferram4's Kerbal Joint Reinforcement.

I had this suspicion, so I temporarily removed that mod for testing and sure enough, the joints move as expected now.

Only issue is, I think quite a few people find KJR to be a necessary mod so this will probably have to be fixed one one of your ends. At least we know what the conflict is though.

Link to post
Share on other sites
3 minutes ago, FlyingFalap said:

Only issue is, I think quite a few people find KJR to be a necessary mod so this will probably have to be fixed one one of your ends

Respecting pivot joints cannot be fixed at my end because this type is assumed by the game's design: when part has a module implementing "IJointLockState" interface it's used to determine if it's a pivot joint. KSP does respect this requirement but looks like KJR doesn't.

Though, the generic idea of re-enforcement may need some support from KAS side. I'm not ready to start investigating it right now but I'll keep it in mind. My goal for now is to release a minimum viable product which needs to provide only basic functionality.

Link to post
Share on other sites

I don't know enough about the underlying mechanics of how the joint system works unfortunately, but I know Ferram has worked through a number of solutions for his mod to get to the point where it is now. As I recall reading the release notes and thread for KJR, he has recently redesigned how some types of joints are reinforced in his mod, so I don't know if a fix for this particular issue would be easy or not. I get that it's not easy (or something modders want to do) to chase down mod conflict issues.

Regardless, I do enjoy what you are trying to achieve with the beta of KAS here, and I'm gonna play around with it for a bit and build some cool things! :) As for how you proceed, it's your mod and I think people appreciate the work that you are putting in to it.

Link to post
Share on other sites

After playing around with the tow bar and other towing mechanisms the things that gave the best stability are:

1 Undocked vessels

2 Single pivoting joint

3 No friction on front trailer wheels (or no front axle)

Docked vessels caused the CoM to shift, changing the steering on the towing vehicle, while undocked vessels have no change to steering despite the link.  A single pivot joint does not let the trailer move as much as having two joints or a winch cable.  Decreasing the friction on the front axle of the trailer to zero, or removing those wheels altogether, gave better stability than increasing the friction on the towing vehicle.  Trailers irl do not have a front axle for this reason, so I do understand letting the second joint have some motion in the one axis to cover this possibility.  Using the winch gave me the ability to choose whether the two vessels were docked or undocked, allowing control over the trailer.  In docked I could change the brakes, steering, etc., and undocked worked best to move since it would not change the steering.

Anyway liking it so far, will have to keep an eye on this.

Link to post
Share on other sites

TB-60 has been re-designed significantly:

  • No docking mode. It increases stability and physics a lot. Pivot joints ibn scope of a single vessel behave awkward in KSP when wheels or legs are involved: dragging, shaking, unmotivated drifting, etc.
  • Joint can be linked with vessels that are poorly aligned, and then the towed vessel joint auto-locks when the angle reaches zero.
  • Source/target are reversed. Now TB60 part must be attached to the source (towing) vessel. It gives an ability to monitor link status while towing.
  • Active steering mode. Once link is locked you may enable active steering mode which will steer for the towed vessel. It makes stability almost perfect! But don't worry, you still can create crazy setups which won't work :)

I was going to release a new version before going to vacation but it's not going to happen :(  So far I can only show a demo clip:

 

Link to post
Share on other sites
9 hours ago, Rory Yammomoto said:

Will there still be winches? KAS used to be the go-to for winches, such that it's practically the standard for anyone who wishes to do so.

They are planned. Though, the design will change. One thing which will likely go away is switching between docked/undocked modes without actual re-attaching (game doesn't like direct manipulations with parts hierarchy).

Link to post
Share on other sites
  • 2 weeks later...
On 11/16/2016 at 5:22 PM, MK3424 said:

Any words about the grappling hook function?

I currently can't grab parts with a Infernal Robotics grabber...

Hooks, harpoons and grapples require rethinking. As for now you can use harpoon to hook a part in space which is weird. In real world you'd damage or destroy either the harpoon or the part. And grappling hook is no different to the magnet, except the latter is consuming electricity. In new KAS the physics reality is an important feature, and such situation is not acceptable.

This functionality will be implemented for sure. The questions are how and when. For now I have just rough ideas to answer question "how":

  • Harpoon will only work for planet/asteroid surface. Being used against a vessel it will produce just an impact which may damage or destroy the part (and you'll finally get a space weapon).
  • Magnets will be controllable from the vessel, i.e. no EVA kerbal is needed to activate/deactivate the connection. It may be handy for using on drones.
  • Grappling hooks attach on impact but require EVA kerbal to be detached. Though, it's not a big difference to the magnet, so new ideas are wanted. May be grapple should have better connection strength and greater mass/price? Or the opposite, it may be a cheaper and weaker alternative to the magnet. If you have better ideas, please, do not hesitate to suggest :)

As for "when" the answer is "after the winches". And winches go after TB-60, RTS-1, and PCB-1.

Edited by IgorZ
Link to post
Share on other sites

So, a couple of points. My real life hobby is Military vehicles. There are, in the US service a number of aframe type tow bars of various weight capacities. They attach to a towed vehicle at two points and can handle a single axis of motion (up down) off the front of the towed vehicle. The towing vehicle connects to the towbar with its towing hook which swivels and because its a pintle hook on the towing truck, the eye on the tow bar can pivot left right snd up down so it has three axis of movement. 

Towing a disabled truck, like a 2.5 ton truck towing another can be done with thhe a frame and has the advantage of getting some automatic steering at low angles due to caster of the front wheels of the towed truck. 

Trailers work out to two main forms in rough terrain service in MVs. Tag trailers which have a fixed structure presenting a lunette eye to the towing vehicle's pintle hook and 5th wheel configurations. There are also, to some limited use, wagon trailers. Wagon trailer are very hard to back up as you have two pivot points. 

Tag trailers work well with part of the load on the trailer's wheels and part on the towing vehicle's axles and, unlike more common ball type hitches you see on civilian stuff, the Pintle hooks are good for FAR higher load ratings. (tens of tons vs hundreds or thousands of pounds). 

Articulated vehicles like a MK48 LVS might be a thing for your towing mechanisms. Note how the front power unit has 4 wheel steering but the whole vehicle is articulated and the rear trailer unit's wheels are also powered. In Military service, the trailer units CAN be swapped out but it's about a 30 minute process as you have to undo bolts and clear some hydraulic lines. 

You generally want articulation in one or two axis with articulated vehicles where the rear unit is also powered. Another example with a different axis of articulation is the Gammagoat. I've driven one of these a bit as a friend has one. The rear 'trailer' is not a trailer and is in fact also a steering unit. The articulation you can see in the link allows a rolling difference and a pitching difference but not a yawing difference. 

Depending on some things, a yawing difference can force the cab to turn over if it ALSO has a rolling function to the joint. The Landrover 101 FC truck had a possible powered trailer in prototype format which was found to push the truck over in some situations, so the powered trailers were not used.  

 

Edited by Montieth
moar info.
Link to post
Share on other sites
2 hours ago, Montieth said:

They attach to a towed vehicle at two points and can handle a single axis of motion (up down) off the front of the towed vehicle. The towing vehicle connects to the towbar with its towing hook which swivels and because its a pintle hook on the towing truck, the eye on the tow bar can pivot left right snd up down so it has three axis of movement. 

TB60 which I have in my dev branch (it's shown in the latest video) does exactly this: the towed vessel joint has only one degree of freedom (up/down), and the towing vessel joint has two (up/down - left/right). TB60 has one bar but it's just a game approximation. IRL we use two bars to form a triangle which makes link more sturdy while in the game I can simply adjust a joint setting  :)

2 hours ago, Montieth said:

There are also, to some limited use, wagon trailers. Wagon trailer are very hard to back up as you have two pivot points. 

Not going to happen in KAS of any version. The vessel itself has to be designed so what it has a pivoted front wheel axle. IR can help here. Once it's done normal TJ-1 can be used to connect wagon to the towing vessel.

2 hours ago, Montieth said:

Articulated vehicles like a MK48 LVS might be a thing for your towing mechanisms.

Again, not the right candidate for KAS. In KAS we join two independent vessels in EVA. Can MK48LVS halves move independently to each other? I doubt so. Though, articulated joint may be a good idea for some other mod design (e.g. IR). As a side note: it would be a really changeling task :) I've spent days polishing my rather simple steering algorithm, and it's still very far from perfect.

2 hours ago, Montieth said:

The Landrover 101 FC truck had a possible powered trailer in prototype format which was found to push the truck over in some situations, so the powered trailers were not used.  

In my tests I also figured out that controlling towed vessel drive may be a good idea. I'm going to check if it can be done easily. If not then it will not be a part of the first release version.

Link to post
Share on other sites

I was not so much suggesting these as KAS modes, but giving you a survey of real towing methods which work on rough terrain in RL. The weird and problematic issues you were havivng map to real life. 

The triangular tow bars are with a flexible connection between towing and towed segments are mostly best for low speeds. There have been some notable accidents where MV collectors as well as soldiers have lost control and died when flat towing a truck with another truck.  The tow bars are also not so good for backing over rough terrain and break at the wrist points.

For realism purpises, those towbars should be the weakest link. Either breaking near the end of a towbar or at the attachment point of the towed vehicle  

 

The single fixed point, with a movable point at the towing vehicle configuration is most apropriate and useful for higher speeds and rough terrain. (Tag trailer configuration) Brakes on the towed vehicle are useful having a touch more fiction in the back as better breaking force helps keep things under control under heavy braking load. Having a bit of distance between the towbar and the wheels (towards the center of the trailer) avoids most of the tire scrub issues you see with non steering tires close to the front of the trailer vehicle. This just requires a simple landing leg for when the trailer isn't connected.

 

In the MK48s, modules both can't move independantly, but thats because the power unit is the front unit. Having a cab unit that contains crew and power systems and a towbar connection that is articulated in one or two ranges (toggle them)  pulling a 'trailer' unit that is also powered -when connected- would be handy. In RL the power transmission is a drive shaft that can be disconnected along with hydraulics for the crane and other components if the 'trailer' unit has such. In KSP,power transmission would be presumptively a power cable + controls for the powering of wheel motors for the cab and 'trailer' unit. 

 

I take it one can still make two connections with the KAS system right? Via two of the towbar assemblies? Mount one above the other, fix the rear point, and you have the power transmission and motion methods of the MK48 LVS. 

From a KSP design perspective, for my mun base vehicles, if i can get away with a trailer thats minimal as possible allowing a cab unit to perform construction tasks and later drop what anounts to a wrecker (a hitch, frame truss, two winches and 2 axles) for dragging modules around the base for assembly, I tend not to bother sticking remote control, power and guidance parts on such a trailer. I've been using the wild Blue buffalo, but it can result in rather long vehicles that, without any articulation, have a gigantic turning radii. Being able to articulate a trailer unit (like a fuel trailer to drag over to the landing area) would be handy. 

Link to post
Share on other sites
11 minutes ago, Montieth said:

There have been some notable accidents where MV collectors as well as soldiers have lost control and died when flat towing a truck with another truck.  The tow bars are also not so good for backing over rough terrain and break at the wrist points.

Yeah, there are real troubles with this joint at the high speeds (more than 10 m/s) in KPS too. I tried to compensate it with adaptive steering algorithms but failed to find a good solution. That said, TB-60 is not for racing even in active steering mode.

14 minutes ago, Montieth said:

Either breaking near the end of a towbar or at the attachment point of the towed vehicle  

For this to work joint strength must depend on both vessels mass, speed and a lot of other variables. There is no a golden value which would work. In KSP default wheel settings define low friction, so worst issue you may face is unstable steering and sliding of the vessels. Though, with non-stock wheels you may witness overturns.

19 minutes ago, Montieth said:

I take it one can still make two connections with the KAS system right? Via two of the towbar assemblies? Mount one above the other, fix the rear point, and you have the power transmission and motion methods of the MK48 LVS. 

It won't work, and not because of KAS. Game has own logic of controlling the wheels. Steering vessels on the ground in the game is not exactly what you may think of comparing with the real vehicles in RL. Most of what you see is an approximation and not real-real physics simulation. Long story short, unless game supports articulated joints in vessels it won't be possible to implement the feature in KAS.

Link to post
Share on other sites

But what about this:

i?id=76ec150a3d499105d9ce332a7bc31735&n=

or this:
upload_f36f8403bbe70d047b6403c4d259a631.farkop-f651428.jpg
which allows to build this:
image-krd-050-122-png.png or  zvuuchp7cmrxkbcajyhcqcxyncwcfmk4.jpg

which are "unstable_when_disconnected" types. I guess there is needed some mechanism, other than "click-establish connection" that is in KAS now, cause the trailer can't stand still, waiting for connection.

 

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...