Wap, don't be oversensitive. I wasn't saying it was outrageous or taking the mick, I was just suggesting some things (at first glance) that may complicate the issue and don't know just how complicated people wanted to get.
In fact, I had the SRF005 in mind when thinking about it.
'Complicated' is usually AKA expensive and fiddly - and I don't know how you would do this without wires all over the place??
Of course you can make it work. And you'll probably think I'm taking the P again but to be 90% effective just how many sensors would you require? Would the distance-between-sensors-on-the-gate-each-side have to be a child-width-standing-just-behind-the-gate apart? Look at the angle-of-dangle of the SRF module. And if the driven gates had loads of overshoot after motor power-off would they stop in time to prevent hitting the corner of your car? I guess theres a fair bit of inertia there.
So, without sophistication (and brakes), would it not be best, as originally planned to sense for objects in the swept area before driving the gates.
But maybe the ultrasonic idea mounted on the gateposts has some mileage ... reasonable angle of view, a reasonable range, pretty accurate range-finding and, unlike PIR, will detect stationary objects... and if it could sense large piles of envelopes it would also be able to detect stationery objects too. It could just work.