Distributed Inference For Robotic Perception And Planning Under Uncertainty