Royal Infantry are the human version of Hollow Infantry from a time long past, before they died and became hollow.
They are non-hostile and will attack other enemies as long as they are not harmed by the player.
Sometimes they will start attacking the player outright, even if they haven't been harmed at all. Supposedly, talking to Captain Drummond in the Memory of Vammar will turn them friendly; however, it seems that their behavior is random each time the memory is entered.
If they are hostile to the player, they will greatly increase the difficulty while traversing the Memory of Orro. Exiting the memory (via using a Homeward Bone or similar) will provide a chance of them to be non-hostile on further visits.