The fear here is not whether robots/AI will take jobs away from humans, because they will, that's a fact, its already happening and has been for many years now. The real fear is whether our economy will migrate to a vastly different form, from where it currently is (money based economics) to a new system which compensates for this huge shift paradigm. The current economic model of full-time working which provides money which pays for resources and taxes/services no longer works when 50% or more of the population no longer have a job due to automation... What happens when 50%+ of the population will not have a job. Do they simply starve to death? Under the current economic system that is exactly what will happen.
There are some very serious ethical issues surrounding automation and artificial intelligence. While some professions will remain untouched for a while yet, it is the unskilled 'menial' tasks which will become the first to fall to automation. The reasons are obvious why companies are pushing for this technology. No sick days, no annual leave, robots can work 24/7/365 without breaks (periodic maintenance only) and most persuasive of all no salaries. Imagine a warehouse of workers stacking shelves, sending out packages, etc. All of that will be automated within the next 10 years, just look at the work Boston Dynamics are doing with robotics.
What can be done? In my view there are two views, either a global consensus to stop all research and development into automation, AI and robotics in order to maintain the current economic model. I don't think this is a good idea at all. Embrace the new technology, which has the potential to improve our own lives on earth, but come up with a new paradigm that moves away from money and the economics that goes with it. Put it like this, once we get into space we then open up to unlimited resources (fuel, raw materials, etc). We'd essentially migrate towards a 'Star Trek' style economic system, where there is no such thing as money because resources become so plentiful they essentially lose monetary value (because supply would be so high).
Just my views, probably wrong on every level and it's hard to explain exactly what I think about this. All I can think is that trying to legislate against this technology simply won't work. Like it or not (and to be honest I'm not thrilled at the prospect of AI and mass automation) I think it is inevitable. Therefore we should think of ways to embrace the technology for the best, rather than allow it to drown us all.