Cannons on private ships didn’t violate the Constitution at the time the 2nd amendment was written.
And not just on ships. Private ownership of cannon on large estates was also common.
Too bad Southwest ranchers don’t have any these days.