Robot Reference Frame for Pan Angle?

The GoPiGo robot pan_servo(angle) function puts 0 degrees facing left, 90 degrees straight ahead, and 180 to the right. (gopigo.py for rev 2.)

If I understand the ROS Wiki correctly, ROS (and iRobot) put the robot frame X axis straight ahead, Z up), with positive angles turn left (from the x axis/forward direction).

I'm thinking to go with this 0 degrees is forward, 90 degrees is looking left, and -90 is looking right.

For Tilt, I like horizontal as 0 degrees, with negative angles down, and positive angle up, BUT the ROS robotican tilt/pan head Wiki states positive moves head tilt down.

I was hoping to be able to reuse other peoples' software easily, but these variations in reference directions seem likely to trip me up.

PogoRobotReference.jpg

Axes

Don’t know about how ROS is set up for servos, but normally -90 corresponds to a PWM signal of 500us, and full right is +90 and 2500us. It’s rare to have -90 being full CW when viewed from the top. Note that it’s also a question of how you mounted the servo - if you flip the servo about one axis (mechanically) the rotation will change.