The human right in question is the right to liberty:
Everyone has the right to liberty and security of person. No one shall be deprived of his liberty save in the following cases and in accordance with a procedure prescribed by law:
Where the cases are 1) Conviction of a crime. 2) Remand, while a crime is being investigated. 3) Mental breakdown, where you are a danger to yourself. 4) Prevention of infectious disease.
Now most people become homeless for all sorts of reasons, and have all sorts of underlying problems. Some, perhaps most, would welcome the opportunity to get off the streets and into a hostel. However there are two big issues.
Money. Giving people shelter costs money. Is the government prepared for the significant costs of moving rough sleepers into housing. Remember that nearly all rough sleepers have additional problems, they may be addicts, or sex workers. They may have a criminal past or criminal present. They might have significant mental health problems. Is the government prepared for these costs? Just making rough sleeping won't make the other problems go away. What happens when the money runs out? Are you going to say to someone "You are unable to have a house or hostel & you can't sleep rough"? What option do you give someone in that position?
What if someone says no. Consider an alcohol addict. He has been living on the streets for several years. He has no family or friends, and he doesn't want to move to a hostel. When he is offered a place at a hostel, he just leaves. Is it reasonable to criminalise his behaviour? Is it reasonable to deprive him of his liberty in this case?
The UK once enforced "vagrancy" laws. They weren't very effective at reducing rough sleeping and tended to channel the homeless towards criminal activity.
If the government is able to provide shelter and other social services, it can do this on a proactive but voluntary basis without depriving anyone of their right to liberty.