Added dq_ref = 0 used in inverse dynamics to get g(q)