To prevent warnings it is nice to have the index variable be the same type as that returned by size(); This is std::size_t 
I would write it as:
for (std::size_t i = 0 ; i < constraints.position_constraints.size() ; ++i)

(I also prefer spaces around operators and prefix ++)