Ben Roberts-Smith has walked out of a Sydney prison on Friday evening, hours after he was granted bail by a judge.