Naming standards for joints in humanoid robots

First of all HeadPan feels awkward to me, it goes completely against all the naming conventions in ROS.

At the same time, both alternatives you presented are names that encode the axis of rotation the joint performs given some arbitrary reference system.
To further elaborate on this I’d highlight the importance of the convention you use to build your TF tree/URDF.
There are many styles, and I’m going to be probably wrong with the names:

  • Denavit-Hartenberg, where the angle of rotation is around Z and position of X and Y determine the positive direction
  • (my naming) The Japanese convention is the same as Denavit-Hartenberg but they rotate around the Y axis
  • (my naming) The American convention is to assign frames to joints such that all joint frames align with a flat right-handed coordinate frame when the robot is in an arbitrary zero state.

The namings you proposed go well with the American convention that I’ve seen in Valkyrie and the PR2.
I’d however advise for using the Denavit-Hartenberg frame convention as it’s an industry standard plus it gives you freedom over naming, you can number them in the order they appear in a kinematic chain, with REEM-C we used arm_left_1_joint, arm_left_2_joint, arm_left_3_joint, etc. My personal preference is the latter, while with the head you are kind of ok (already weird on Valkyrie, where there are 2 tilt joints) arms will give you a hard time: arm_left_yaw, arm_left_pan, arm_left_pitch you’ve already ran out of meaningful names!

References:
http://www.ros.org/reps/rep-0103.html#axis-orientation
http://wiki.ros.org/Robots/REEM-C