How to describe this template structure in words
what is the use of ContainerAllocator? I find it being used in the code as,
typedef ::geometry_msgs::Quaternion_<ContainerAllocator> _orientation_type;
why is _alloc used?
typedef ::geometry_msgs::Quaternion_<ContainerAllocator> _orientation_type; doesn't define what ContainerAllocator is. It's using it to define a type dependent on it.
Line 15 is somewhat mystifying to me. This is usually done when a function doesn't use a parameter, so the compiler doesn't give warnings about unused parameters, but the constructor does use _alloc.
By the way, identifiers that begin with underscores are supposed to not be used, because the implementation reserves them for its own purposes. IMO, identifiers that begin or end with underscores are kinda shitty.