I suppose it depends on what you think of as "near future", but I - and I have no special insight, for the record, just speaking as an outside observer - would put around 75% probability of a robot that can wholly replace a janitor existing in 15 years, and 95% in 20.
In terms of time needed to politically and socially prepare for that situation, 20 years feels really near term to me. I don't really expect our existing political structures and processes are capable of dealing with the challenge adequately in time. It's one of my top three fears for the <30 year future. And unfortunately the other two (global displacements from climate change, and bio-/nuclear-terrorism by desperate or angry people/groups) are synergistic with it. If it weren't for my normalcy bias, I'd be kind of terrified.