A police officer is in hospital after being struck and wedged between two vehicles after a violent home invasion in Sydney's inner-west.