wiki:Plugins/pantilt
Last modified 7 years ago Last modified on 30.03.2012 11:49:52

Pan-Tilt Unit Plugin

AllemaniACs RX28 servo-based PTU

Hardware driver plugin to control pan-tilt units (PTUs), especially for camera heads.

An arbitrary number of PTUs can be configured. Currently, the following PTU models are supported:

For each PTU separate sensor and actuation threads will be started hooked into the main loop at the appropriate stages.

Requires

Config Values

Any number of PTUs can be defined. Below we specify a configuration per supported model. Replace the name token approriately.

PathTypeDescriptionDefaultR
/hardware/pantilt/ptus/RX28/typestringType of PTURX28*
/hardware/pantilt/ptus/RX28/activeboolIs this PTU active?1*
/hardware/pantilt/ptus/RX28/devicestringDevice file for RX28 PTU/dev/ttyUSB0*
/hardware/pantilt/ptus/RX28/read_timeout_msunsigned intRead timeout for RX28 PTU; ms30*
/hardware/pantilt/ptus/RX28/discover_timeout_msunsigned intDiscover timeout for RX28 PTU; ms30*
/hardware/pantilt/ptus/RX28/pan_servo_idunsigned int',1Pan servo ID for RX28 PTU1*
/hardware/pantilt/ptus/RX28/tilt_servo_idunsigned int',2Tilt servo ID for RX28 PTU2*
/hardware/pantilt/ptus/RX28/pan_offsetfloatPan offset for RX28 PTU; deg0*
/hardware/pantilt/ptus/RX28/tilt_offsetfloatTilt offset for RX28 PTU; deg|0|*
/hardware/pantilt/ptus/RX28/turn_offboolTurn off RX28 PTU when unloading the plugin?1*
/hardware/pantilt/ptus/RX28/goto_zero_startboolMove RX28 PTU to start position?1*
/hardware/pantilt/ptus/RX28/cw_compl_marginunsigned intClockwise compliance margin for RX28 PTU0*
/hardware/pantilt/ptus/RX28/ccw_compl_marginunsigned intCounter-clockwise compliance margin for RX28 PTU0*
/hardware/pantilt/ptus/RX28/cw_compl_slopeunsigned intClockwise compliance slope for RX28 PTU96*
/hardware/pantilt/ptus/RX28/ccw_compl_slopeunsigned intCounter-clockwise compliance slope for RX28 PTU96*
/hardware/pantilt/ptus/RX28/pan_minfloatMinimum pan for RX28 PTU-2.2*
/hardware/pantilt/ptus/RX28/pan_maxfloatMaximum pan for RX28 PTU2.2*
/hardware/pantilt/ptus/RX28/tilt_minfloatMinimum tilt for RX28 PTU-1.6*
/hardware/pantilt/ptus/RX28/tilt_maxfloatMaximum tilt for RX28 PTU1.6*
/hardware/pantilt/ptus/RX28/pan_startfloatPan to move to on startup of goto_zero_start enabled0.0*
/hardware/pantilt/ptus/RX28/tilt_startfloatTilt to move to on startup of goto_zero_start enabled0.0*
/hardware/pantilt/ptus/RX28/pan_marginfloatAngle distance between desired and actual pan value to consider RX28 PTU motion finished; rad0.1*
/hardware/pantilt/ptus/RX28/tilt_marginfloatAngle distance between desired and actual tilt value to consider RX28 PTU motion finished; rad0.1*
/hardware/pantilt/ptus/RX28/frame_id_prefixstringFrame ID base string; will be prefixed by / if missing; and suffixed with /base, /pan, and /tilt repsectivelyrx28*
/hardware/pantilt/ptus/RX28/pan_trans_xfloatPAN servo base to joint translation X; m-0.002*
/hardware/pantilt/ptus/RX28/pan_trans_yfloatPAN servo base to joint translation Y; m0.0*
/hardware/pantilt/ptus/RX28/pan_trans_zfloatPAN servo base to joint translation Z; m0.042*
/hardware/pantilt/ptus/RX28/tilt_trans_xfloatTILT servo base to joint translation X; m0.0*
/hardware/pantilt/ptus/RX28/tilt_trans_yfloatTILT servo base to joint translation Y; m0.0*
/hardware/pantilt/ptus/RX28/tilt_trans_zfloatTILT servo base to joint translation Z; m0.039*

Provides

BlackBoard Interfaces

  • PanTiltInterface::<ID>: Provided for each configured and enabled PTU.

Compilation and Runtime Requirements

  • None, all supported PTUs use simple serial communication without special driver needs

Usage Instructions

Enable the configurations matching your pan-tilt hardware. Load the plugin and afterwards use ffptu to control your PTU.

Attachments