Open gavanderhoorn opened 3 years ago
@Sagexs: it would be very helpful if you could experiment a bit and see whether any of these bits (or perhaps some of the undocumented ones) make raycastClosest(..)
also detect vegetation.
I do expect there to be a rather large performance penalty if it would be possible, but at least then we'd know.
@tckarenchiang: perhaps we could see whether we'd want to make the collisionMask
configurable, so users who have a need could tweak it for their specific use-case.
Oh, and AFAIU: if collsionMask
is not set, it will default to hitting everything.
Oh, and AFAIU: if
collsionMask
is not set, it will default to hitting everything.
I've tested: if collisionMask
is not set, crops still can't be detected (with laser scanner pointing down)
And just to make sure: if you set all bits of the collisionMask
, does that change anything? So set it to 0xFFFFFFFF
.
I'm not sure where I read that not providing collisionMask
equates to a fully enabled collisionMask
.
And just to make sure: if you set all bits of the
collisionMask
, does that change anything? So set it to0xFFFFFFFF
.
It doesn't seem to change anything.
Ok, then it seems we can close #10 for now with the unfortunate conclusion that raycastClosest(..)
cannot be used for detection crops/vegetation.
Edit: perhaps if we make some progress with #22, depthimage_to_laserscan
could work for that instead.
The current collision mask is set to:
https://github.com/tud-cor/FS19_modROS/blob/5e8d48482b79c9608f7fdbe42f88f7e7ef0bc568/modROS.lua#L92-L98
IIRC, we've not been able to really find any documentation for those bit positions, except in this article/tutorial: How to Set Correct Collisions in Your Farming Simulator Mod:
I suspect these are documented somewhere, I just haven't searched for it.
Whether the current value of the
collisionMask
is the optimal value for our purposes would be something to discuss.Edit: from the same page: some example collision masks for various objects/vehicles: