Collision prevention simualtion in Gazebo without companion computer

Can you please tell me if there is a ready-made solution for collision prevention simulation in Gazebo without px4/avoidance (without companion computer)?
If not, is it possible to do this? As far as I understand, it will be necessary to write a sensor plugin for Gazebo?