There's a lot of solutions out there already for this. I'll start by suggesting AR tags not QR tags. They're better optimized for localizing.
The Alvar library is commonly used for tracking AR tags.
And there's a ROS package which wraps that and publishes the results as ROS messages.