player.h

00001 /*
00002  *  Player - One Hell of a Robot Server
00003  *  Copyright (C) 2000
00004  *     Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard
00005  *
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 /*
00023  * Desc: Player communication packet structures and codes
00024  * CVS:  $Id: player.h,v 1.85 2006/02/28 02:54:05 rtv Exp $
00025  */
00026 
00027 
00028 #ifndef PLAYER_H
00029 #define PLAYER_H
00030 
00031 /* Include values from the configure script */
00032 #include "playerconfig.h"
00033 
00044 #define PLAYER_MAX_MESSAGE_SIZE 8388608 /*8MB*/
00045 
00046 #define PLAYER_MAX_PAYLOAD_SIZE (PLAYER_MAX_MESSAGE_SIZE - sizeof(player_msghdr_t))
00047 
00048 #define PLAYER_MAX_DRIVER_STRING_LEN 64
00049 
00050 #define PLAYER_MAX_DEVICES             256
00051 
00052 #define PLAYER_MSGQUEUE_DEFAULT_MAXLEN 32
00053 
00054 #define PLAYER_IDENT_STRING    "Player v."
00055 
00056 #define PLAYER_IDENT_STRLEN 32
00057 
00058 #define PLAYER_KEYLEN       32
00059 
00071 #define PLAYER_MSGTYPE_DATA      1
00072 
00075 #define PLAYER_MSGTYPE_CMD       2
00076 
00082 #define PLAYER_MSGTYPE_REQ       3
00083 
00088 #define PLAYER_MSGTYPE_RESP_ACK  4
00089 
00091 #define PLAYER_MSGTYPE_SYNCH     5
00092 
00099 #define PLAYER_MSGTYPE_RESP_NACK 6
00100 
00113 #define PLAYER_NULL_CODE           256 // /dev/null analogue
00114 #define PLAYER_PLAYER_CODE         1   // the server itself
00115 #define PLAYER_POWER_CODE          2   // power subsystem
00116 #define PLAYER_GRIPPER_CODE        3   // gripper
00117 #define PLAYER_POSITION2D_CODE     4   // device that moves about in the plane
00118 #define PLAYER_SONAR_CODE          5   // fixed range-finder
00119 #define PLAYER_LASER_CODE          6   // scanning range-finder
00120 #define PLAYER_BLOBFINDER_CODE     7   // visual blobfinder
00121 #define PLAYER_PTZ_CODE            8   // pan-tilt-zoom unit
00122 #define PLAYER_AUDIO_CODE          9   // audio I/O
00123 #define PLAYER_FIDUCIAL_CODE       10  // fiducial detector
00124 #define PLAYER_SPEECH_CODE         12  // speech I/O
00125 #define PLAYER_GPS_CODE            13  // GPS unit
00126 #define PLAYER_BUMPER_CODE         14  // bumper array
00127 #define PLAYER_TRUTH_CODE          15  // ground-truth (via Stage;
00128 #define PLAYER_DIO_CODE            20  // digital I/O
00129 #define PLAYER_AIO_CODE            21  // analog I/O
00130 #define PLAYER_IR_CODE             22  // IR array
00131 #define PLAYER_WIFI_CODE           23  // wifi card status
00132 #define PLAYER_WAVEFORM_CODE       24  // fetch raw waveforms
00133 #define PLAYER_LOCALIZE_CODE       25  // localization
00134 #define PLAYER_MCOM_CODE           26  // multicoms
00135 #define PLAYER_SOUND_CODE          27  // sound file playback
00136 #define PLAYER_AUDIODSP_CODE       28  // audio dsp I/O
00137 #define PLAYER_AUDIOMIXER_CODE     29  // audio I/O
00138 #define PLAYER_POSITION3D_CODE     30  // 3-D position
00139 #define PLAYER_SIMULATION_CODE     31  // simulators
00140 #define PLAYER_SERVICE_ADV_CODE    32  // LAN service advertisement
00141 #define PLAYER_BLINKENLIGHT_CODE   33  // blinking lights
00142 #define PLAYER_NOMAD_CODE          34  // Nomad robot
00143 #define PLAYER_CAMERA_CODE         40  // camera device
00144 #define PLAYER_MAP_CODE            42  // get a map
00145 #define PLAYER_PLANNER_CODE        44  // 2D motion planner
00146 #define PLAYER_LOG_CODE            45  // log read/write control
00147 #define PLAYER_ENERGY_CODE         46  // energy consumption
00148 //#define PLAYER_MOTOR_CODE          47  // motor interface
00149 #define PLAYER_JOYSTICK_CODE       49  // Joytstick
00150 #define PLAYER_SPEECH_RECOGNITION_CODE  50  // speech recognition
00151 #define PLAYER_OPAQUE_CODE         51  // plugin interface
00152 #define PLAYER_POSITION1D_CODE     52  // 1-D position
00153 #define PLAYER_ACTARRAY_CODE       53  // Actuator Array interface
00154 #define PLAYER_LIMB_CODE           54  // Limb interface
00155 #define PLAYER_GRAPHICS2D_CODE     55  // Graphics2D interface
00156 #define PLAYER_RFID_CODE           56  // RFID reader interface
00157 
00169 #define PLAYER_ACTARRAY_STRING        "actarray"
00170 #define PLAYER_AIO_STRING             "aio"
00171 #define PLAYER_AUDIO_STRING           "audio"
00172 #define PLAYER_AUDIODSP_STRING        "audiodsp"
00173 #define PLAYER_AUDIOMIXER_STRING      "audiomixer"
00174 #define PLAYER_BLINKENLIGHT_STRING    "blinkenlight"
00175 #define PLAYER_BLOBFINDER_STRING      "blobfinder"
00176 #define PLAYER_BUMPER_STRING          "bumper"
00177 #define PLAYER_CAMERA_STRING          "camera"
00178 #define PLAYER_ENERGY_STRING          "energy"
00179 #define PLAYER_DIO_STRING             "dio"
00180 #define PLAYER_GRIPPER_STRING         "gripper"
00181 #define PLAYER_FIDUCIAL_STRING        "fiducial"
00182 #define PLAYER_GPS_STRING             "gps"
00183 #define PLAYER_IR_STRING              "ir"
00184 #define PLAYER_JOYSTICK_STRING        "joystick"
00185 #define PLAYER_LASER_STRING           "laser"
00186 #define PLAYER_LIMB_STRING            "limb"
00187 #define PLAYER_LOCALIZE_STRING        "localize"
00188 #define PLAYER_LOG_STRING             "log"
00189 #define PLAYER_MAP_STRING             "map"
00190 #define PLAYER_MCOM_STRING            "mcom"
00191 //#define PLAYER_MOTOR_STRING           "motor"
00192 #define PLAYER_NOMAD_STRING           "nomad"
00193 #define PLAYER_NULL_STRING            "null"
00194 #define PLAYER_OPAQUE_STRING          "opaque"
00195 #define PLAYER_PLANNER_STRING         "planner"
00196 #define PLAYER_PLAYER_STRING          "player"
00197 #define PLAYER_POSITION1D_STRING      "position1d"
00198 #define PLAYER_POSITION2D_STRING      "position2d"
00199 #define PLAYER_POSITION3D_STRING      "position3d"
00200 #define PLAYER_POWER_STRING           "power"
00201 #define PLAYER_PTZ_STRING             "ptz"
00202 #define PLAYER_RFID_STRING            "rfid"
00203 #define PLAYER_SERVICE_ADV_STRING     "service_adv"
00204 #define PLAYER_SIMULATION_STRING      "simulation"
00205 #define PLAYER_SONAR_STRING           "sonar"
00206 #define PLAYER_SOUND_STRING            "sound"
00207 #define PLAYER_SPEECH_STRING          "speech"
00208 #define PLAYER_SPEECH_RECOGNITION_STRING  "speech_recognition"
00209 #define PLAYER_TRUTH_STRING           "truth"
00210 #define PLAYER_WAVEFORM_STRING        "waveform"
00211 #define PLAYER_WIFI_STRING            "wifi"
00212 #define PLAYER_GRAPHICS2D_STRING       "graphics2d"
00213 
00224 typedef struct player_devaddr
00225 {
00227   uint32_t host;
00230   uint32_t robot;
00232   uint16_t interf;
00234   uint16_t index;
00235 } player_devaddr_t;
00236 
00240 typedef struct player_msghdr
00241 {
00243   player_devaddr_t addr;
00245   uint8_t type;
00247   uint8_t subtype;
00249   double timestamp;
00251   uint32_t seq;
00253   uint32_t size;
00254 } player_msghdr_t;
00263 typedef struct player_point_2d
00264 {
00266   float px;
00268   float py;
00269 } player_point_2d_t;
00270 
00271 
00273 typedef struct player_point_3d
00274 {
00276   float px;
00278   float py;
00280   float pz;
00281 } player_point_3d_t;
00282 
00283 
00285 typedef struct player_pose
00286 {
00288   float px;
00290   float py;
00292   float pa;
00293 } player_pose_t;
00294 
00296 typedef struct player_pose3d
00297 {
00299   float px;
00301   float py;
00303   float pz;
00305   float proll;
00307   float ppitch;
00309   float pyaw;
00310 } player_pose3d_t;
00311 
00313 typedef struct player_bbox
00314 {
00316   float sw;
00318   float sl;
00319 } player_bbox_t;
00320 
00322 typedef struct player_bbox3d
00323 {
00325   float sw;
00327   float sl;
00329   float sh;
00330 } player_bbox3d_t;
00331 
00333 typedef struct player_segment
00334 {
00336   float x0;
00338   float y0;
00340   float x1;
00342   float y1;
00343 } player_segment_t;
00344 
00346 typedef struct player_color
00347 {
00349   uint8_t alpha;
00351   uint8_t red;
00353   uint8_t green;
00355   uint8_t blue;
00356 } player_color_t;
00357 
00358 
00386 // /////////////////////////////////////////////////////////////////////////////
00387 //
00388 //             Here starts the alphabetical list of interfaces
00389 //                       (please keep it that way)
00390 //
00391 // /////////////////////////////////////////////////////////////////////////////
00392 
00430 // /////////////////////////////////////////////////////////////////////////////
00445 #define PLAYER_ACTARRAY_NUM_ACTUATORS     16
00446 
00448 #define PLAYER_ACTARRAY_ACTSTATE_IDLE     1
00449 
00450 #define PLAYER_ACTARRAY_ACTSTATE_MOVING   2
00451 
00452 #define PLAYER_ACTARRAY_ACTSTATE_BRAKED   3
00453 
00454 #define PLAYER_ACTARRAY_ACTSTATE_STALLED  4
00455 
00457 #define PLAYER_ACTARRAY_TYPE_LINEAR       1
00458 
00459 #define PLAYER_ACTARRAY_TYPE_ROTARY       2
00460 
00462 #define PLAYER_ACTARRAY_POWER_REQ         1
00463 
00464 #define PLAYER_ACTARRAY_BRAKES_REQ        2
00465 
00466 #define PLAYER_ACTARRAY_GET_GEOM_REQ      3
00467 
00468 #define PLAYER_ACTARRAY_SPEED_REQ         4
00469 
00471 #define PLAYER_ACTARRAY_POS_CMD           1
00472 
00473 #define PLAYER_ACTARRAY_SPEED_CMD         2
00474 
00475 #define PLAYER_ACTARRAY_HOME_CMD          3
00476 
00478 #define PLAYER_ACTARRAY_DATA_STATE        1
00479 
00481 typedef struct player_actarray_actuator
00482 {
00484   float position;
00486   float speed;
00488   uint8_t state;
00489 } player_actarray_actuator_t;
00490 
00494 typedef struct player_actarray_data
00495 {
00497   uint32_t actuators_count;
00499   player_actarray_actuator_t actuators[PLAYER_ACTARRAY_NUM_ACTUATORS];
00500 } player_actarray_data_t;
00501 
00503 typedef struct player_actarray_actuatorgeom
00504 {
00506   uint8_t type;
00508   float min;
00510   float centre;
00512   float max;
00514   float home;
00516   float config_speed;
00518   uint8_t hasbrakes;
00519 } player_actarray_actuatorgeom_t;
00520 
00525 typedef struct player_actarray_geom
00526 {
00528   uint32_t actuators_count;
00530   player_actarray_actuatorgeom_t actuators[PLAYER_ACTARRAY_NUM_ACTUATORS];
00531 } player_actarray_geom_t;
00532 
00536 typedef struct player_actarray_position_cmd
00537 {
00539   int32_t joint;
00541   float position;
00542 } player_actarray_position_cmd_t;
00543 
00547 typedef struct player_actarray_speed_cmd
00548 {
00550   int32_t joint;
00552   float speed;
00553 } player_actarray_speed_cmd_t;
00554 
00558 typedef struct player_actarray_home_cmd
00559 {
00561   int32_t joint;
00562 } player_actarray_home_cmd_t;
00563 
00570 typedef struct player_actarray_power_config
00571 {
00573   uint8_t value;
00574 } player_actarray_power_config_t;
00575 
00580 typedef struct player_actarray_brakes_config
00581 {
00583   uint8_t value;
00584 } player_actarray_brakes_config_t;
00585 
00590 typedef struct player_actarray_speed_config
00591 {
00593   int32_t joint;
00595   float speed;
00596 } player_actarray_speed_config_t;
00599 // /////////////////////////////////////////////////////////////////////////////
00613 #define PLAYER_AIO_MAX_INPUTS  8
00614 
00615 #define PLAYER_AIO_MAX_OUTPUTS 8
00616 
00618 #define PLAYER_AIO_CMD_STATE              1
00619 
00621 #define PLAYER_AIO_DATA_STATE             1
00622 
00627 typedef struct player_aio_data
00628 {
00630   uint32_t voltages_count;
00632   float voltages[PLAYER_AIO_MAX_INPUTS];
00633 } player_aio_data_t;
00634 
00638 typedef struct player_aio_cmd
00639 {
00641   uint32_t id;
00643   float voltage;
00644 } player_aio_cmd_t;
00645 
00649 // /////////////////////////////////////////////////////////////////////////////
00665 #define PLAYER_AUDIO_DATA_BUFFER_SIZE    20
00666 
00667 #define PLAYER_AUDIO_COMMAND_BUFFER_SIZE (3*sizeof(short))
00668 
00669 #define PLAYER_AUDIO_PAIRS               5
00670 
00677 typedef struct player_audio_data
00678 {
00680   uint32_t frequency_count;
00682   float frequency[PLAYER_AUDIO_PAIRS];
00684   uint32_t amplitude_count;
00686   float amplitude[PLAYER_AUDIO_PAIRS];
00687 } player_audio_data_t;
00688 
00694 typedef struct player_audio_cmd
00695 {
00697   float frequency;
00699   float amplitude;
00701   float duration;
00702 } player_audio_cmd_t;
00703 
00706 // /////////////////////////////////////////////////////////////////////////////
00720 #define PLAYER_AUDIODSP_MAX_FREQS 8
00721 
00722 #define PLAYER_AUDIODSP_MAX_BITSTRING_LEN 64
00723 
00725 #define PLAYER_AUDIODSP_SET_CONFIG 1
00726 
00727 #define PLAYER_AUDIODSP_GET_CONFIG 2
00728 
00730 #define PLAYER_AUDIODSP_PLAY_TONE  1
00731 
00732 #define PLAYER_AUDIODSP_PLAY_CHIRP 2
00733 
00734 #define PLAYER_AUDIODSP_REPLAY     3
00735 
00737 #define PLAYER_AUDIODSP_DATA_TONES 1
00738 
00745 typedef struct player_audiodsp_data
00746 {
00748   uint32_t frequency_count;
00750   float frequency[PLAYER_AUDIODSP_MAX_FREQS];
00752   uint32_t amplitude_count;
00754   float amplitude[PLAYER_AUDIODSP_MAX_FREQS];
00755 
00756 } player_audiodsp_data_t;
00757 
00766 typedef struct player_audiodsp_cmd
00767 {
00769   float frequency;
00771   float amplitude;
00773   float duration;
00775   uint32_t bit_string_count;
00777   uint8_t bit_string[PLAYER_AUDIODSP_MAX_BITSTRING_LEN];
00778 } player_audiodsp_cmd_t;
00779 
00793 typedef struct player_audiodsp_config
00794 {
00796   int32_t format;
00798   float frequency;
00800   uint32_t channels;
00801 } player_audiodsp_config_t;
00804 // /////////////////////////////////////////////////////////////////////////////
00818 #define PLAYER_AUDIOMIXER_SET_MASTER 1
00819 
00820 #define PLAYER_AUDIOMIXER_SET_PCM    2
00821 
00822 #define PLAYER_AUDIOMIXER_SET_LINE   3
00823 
00824 #define PLAYER_AUDIOMIXER_SET_MIC    4
00825 
00826 #define PLAYER_AUDIOMIXER_SET_IGAIN  5
00827 
00828 #define PLAYER_AUDIOMIXER_SET_OGAIN  6
00829 
00831 #define PLAYER_AUDIOMIXER_GET_LEVELS 1
00832 
00843 typedef struct player_audiomixer_cmd
00844 {
00846   uint32_t left;
00848   uint32_t right;
00849 
00850 } player_audiomixer_cmd_t;
00851 
00857 typedef struct player_audiomixer_config
00858 {
00860   uint32_t master_left;
00862   uint32_t master_right;
00864   uint32_t pcm_left;
00866   uint32_t pcm_right;
00868   uint32_t line_left;
00870   uint32_t line_right;
00872   uint32_t mic_left;
00874   uint32_t mic_right;
00876   uint32_t i_gain;
00878   uint32_t o_gain;
00879 } player_audiomixer_config_t;
00880 
00883 // /////////////////////////////////////////////////////////////////////////////
00898 #define PLAYER_BLINKENLIGHT_DATA_STATE 1
00899 
00901 #define PLAYER_BLINKENLIGHT_CMD_STATE      1
00902 
00903 #define PLAYER_BLINKENLIGHT_CMD_POWER      2
00904 
00905 #define PLAYER_BLINKENLIGHT_CMD_COLOR      3
00906 
00907 #define PLAYER_BLINKENLIGHT_CMD_PERIOD     4
00908 
00909 #define PLAYER_BLINKENLIGHT_CMD_DUTYCYCLE  5
00910 
00914 typedef struct player_blinkenlight_data
00915 {
00917   uint8_t enable;
00919   float period;
00921   float dutycycle;
00923   player_color_t color;
00924 } player_blinkenlight_data_t;
00925 
00929 typedef struct player_blinkenlight_cmd
00930 {
00932   uint8_t enable;
00934   float period;
00936   float dutycycle;
00938   player_color_t color;
00939 } player_blinkenlight_cmd_t;
00940 
00944 typedef struct player_blinkenlight_cmd_power
00945 {
00947   uint8_t enable;
00948 } player_blinkenlight_cmd_power_t;
00949 
00953 typedef struct player_blinkenlight_cmd_color
00954 {
00956   player_color_t color;
00957 } player_blinkenlight_cmd_color_t;
00958 
00962 typedef struct player_blinkenlight_cmd_period
00963 {
00965   float period;
00966 } player_blinkenlight_cmd_period_t;
00967 
00972 typedef struct player_blinkenlight_cmd_dutycycle
00973 {
00975   float dutycycle;
00976 } player_blinkenlight_cmd_dutycycle_t;
00977 
00980 // /////////////////////////////////////////////////////////////////////////////
00995 #define PLAYER_BLOBFINDER_MAX_BLOBS 256
00996 
00998 #define PLAYER_BLOBFINDER_DATA_BLOBS 1
00999 
01001 #define PLAYER_BLOBFINDER_REQ_SET_COLOR         1
01002 
01003 #define PLAYER_BLOBFINDER_REQ_SET_IMAGER_PARAMS 2
01004 
01005 //#define PLAYER_BLOBFINDER_DATA_BLOBS 1
01006 
01007 
01009 typedef struct player_blobfinder_blob
01010 {
01012   uint32_t id;
01015   uint32_t color;
01017   uint32_t area;
01019   uint32_t x;
01021   uint32_t y;
01023   uint32_t left;
01025   uint32_t right;
01027   uint32_t top;
01029   uint32_t bottom;
01031   float range;
01032 } player_blobfinder_blob_t;
01033 
01037 typedef struct player_blobfinder_data
01038 {
01040   uint32_t width;
01042   uint32_t height;
01044   uint32_t blobs_count;
01046   player_blobfinder_blob_t blobs[PLAYER_BLOBFINDER_MAX_BLOBS];
01047 } player_blobfinder_data_t;
01048 
01049 
01059 typedef struct player_blobfinder_color_config
01060 {
01062   uint32_t rmin;
01064   uint32_t rmax;
01066   uint32_t gmin;
01068   uint32_t gmax;
01070   uint32_t bmin;
01072   uint32_t bmax;
01073 } player_blobfinder_color_config_t;
01074 
01075 
01090 typedef struct player_blobfinder_imager_config
01091 {
01093   int32_t brightness;
01095   int32_t contrast;
01100   int32_t  colormode;
01102   int32_t  autogain;
01103 } player_blobfinder_imager_config_t;
01104 
01107 // /////////////////////////////////////////////////////////////////////////////
01121 #define PLAYER_BUMPER_MAX_SAMPLES 32
01122 
01124 #define PLAYER_BUMPER_GET_GEOM    1
01125 
01127 #define PLAYER_BUMPER_DATA_STATE  1
01128 
01129 #define PLAYER_BUMPER_DATA_GEOM  2
01130 
01134 typedef struct player_bumper_data
01135 {
01137   uint32_t bumpers_count;
01139   uint8_t bumpers[PLAYER_BUMPER_MAX_SAMPLES];
01140 } player_bumper_data_t;
01141 
01143 typedef struct player_bumper_define
01144 {
01146   player_pose_t pose;
01148   float length;
01150   float radius;
01151 } player_bumper_define_t;
01152 
01160 typedef struct player_bumper_geom
01161 {
01163   uint32_t bumper_def_count;
01165   player_bumper_define_t bumper_def[PLAYER_BUMPER_MAX_SAMPLES];
01166 } player_bumper_geom_t;
01167 
01170 // /////////////////////////////////////////////////////////////////////////////
01186 #define PLAYER_CAMERA_DATA_STATE             1
01187 
01189 #define PLAYER_CAMERA_IMAGE_WIDTH  1920
01190 
01191 #define PLAYER_CAMERA_IMAGE_HEIGHT 1080
01192 
01193 #define PLAYER_CAMERA_IMAGE_SIZE  (PLAYER_CAMERA_IMAGE_WIDTH * PLAYER_CAMERA_IMAGE_HEIGHT * 4)
01194 
01196 #define PLAYER_CAMERA_FORMAT_MONO8  1
01197 
01198 #define PLAYER_CAMERA_FORMAT_MONO16 2
01199 
01200 #define PLAYER_CAMERA_FORMAT_RGB565 4
01201 
01202 #define PLAYER_CAMERA_FORMAT_RGB888 5
01203 
01205 #define PLAYER_CAMERA_COMPRESS_RAW  0
01206 
01207 #define PLAYER_CAMERA_COMPRESS_JPEG 1
01208 
01210 typedef struct player_camera_data
01211 {
01213   uint32_t width;
01215   uint32_t height;
01217   uint32_t bpp;
01219   uint32_t format;
01223   uint32_t fdiv;
01226   uint32_t compression;
01228   uint32_t image_count;
01232   uint8_t image[PLAYER_CAMERA_IMAGE_SIZE];
01233 } player_camera_data_t;
01234 
01237 // /////////////////////////////////////////////////////////////////////////////
01249 #define PLAYER_DIO_DATA_VALUES 1
01250 
01252 #define PLAYER_DIO_CMD_VALUES 1
01253 
01258 typedef struct player_dio_data
01259 {
01261   uint32_t count;
01263   uint32_t digin;
01264 } player_dio_data_t;
01265 
01266 
01271 typedef struct player_dio_cmd
01272 {
01274   uint32_t count;
01276   uint32_t digout;
01277 } player_dio_cmd_t;
01278 
01281 /* REMOVE ENERGY DEVICE - USE POWER INSTEAD - RTV 2005.12.04 */
01282 
01283 // /////////////////////////////////////////////////////////////////////////////
01301 #define PLAYER_ENERGY_DATA_STATE 1
01302 
01304 #define PLAYER_ENERGY_SET_CHARGING_POLICY_REQ 1
01305 
01311 typedef struct player_energy_data
01312 {
01314   float joules;
01317   float watts;
01322   int32_t charging;
01323 } player_energy_data_t;
01324 
01329 typedef struct player_energy_chargepolicy_config
01330 {
01333   uint8_t enable_input;
01336   uint8_t enable_output;
01337 } player_energy_chargepolicy_config_t;
01338 
01341 // /////////////////////////////////////////////////////////////////////////////
01355 #define PLAYER_FIDUCIAL_MAX_SAMPLES 32
01356 
01358 #define PLAYER_FIDUCIAL_DATA_SCAN 1
01359 
01361 #define PLAYER_FIDUCIAL_REQ_GET_GEOM     1
01362 
01363 #define PLAYER_FIDUCIAL_REQ_GET_FOV      2
01364 
01365 #define PLAYER_FIDUCIAL_REQ_SET_FOV      3
01366 
01367 #define PLAYER_FIDUCIAL_REQ_GET_ID       7
01368 
01369 #define PLAYER_FIDUCIAL_REQ_SET_ID       8
01370 
01375 typedef struct player_fiducial_item
01376 {
01379   int32_t id;
01381   player_pose3d_t pose;
01383   player_pose3d_t upose;
01384 } player_fiducial_item_t;
01385 
01386 
01390 typedef struct player_fiducial_data
01391 {
01393   uint32_t fiducials_count;
01395   player_fiducial_item_t fiducials[PLAYER_FIDUCIAL_MAX_SAMPLES];
01396 
01397 } player_fiducial_data_t;
01398 
01404 typedef struct player_fiducial_geom
01405 {
01407   player_pose_t pose;
01409   player_bbox_t size;
01411   player_bbox_t fiducial_size;
01412 } player_fiducial_geom_t;
01413 
01420 typedef struct player_fiducial_fov
01421 {
01423   float min_range;
01425   float max_range;
01427   float view_angle;
01428 } player_fiducial_fov_t;
01429 
01445 typedef struct player_fiducial_id
01446 {
01448   uint32_t id;
01449 } player_fiducial_id_t;
01450 
01453 // /////////////////////////////////////////////////////////////////////////////
01466 #define PLAYER_GPS_DATA_STATE 1
01467 
01474 typedef struct player_gps_data
01475 {
01477   uint32_t time_sec;
01479   uint32_t time_usec;
01483   int32_t latitude;
01487   int32_t longitude;
01490   int32_t altitude;
01492   double utm_e;
01494   double utm_n;
01496   uint32_t quality;
01498   uint32_t num_sats;
01500   uint32_t hdop;
01502   uint32_t vdop;
01504   double err_horz;
01506   double err_vert;
01507 } player_gps_data_t;
01508 
01511 
01512 
01526 #define PLAYER_GRAPHICS2D_MAX_POINTS 64
01527 
01529 #define PLAYER_GRAPHICS2D_CMD_CLEAR 1
01530 
01531 #define PLAYER_GRAPHICS2D_CMD_POINTS 2
01532 
01533 #define PLAYER_GRAPHICS2D_CMD_POLYLINE 3
01534 
01535 #define PLAYER_GRAPHICS2D_CMD_POLYGON 4
01536 
01544 typedef struct player_graphics2d_cmd_points
01545 {
01547   uint16_t count;
01549   player_point_2d_t points[PLAYER_GRAPHICS2D_MAX_POINTS];
01551   player_color_t color;
01552 } player_graphics2d_cmd_points_t;
01553 
01557 typedef struct player_graphics2d_cmd_polyline
01558 {
01560   uint16_t count;
01562   player_point_2d_t points[PLAYER_GRAPHICS2D_MAX_POINTS];
01564   player_color_t color;
01565 } player_graphics2d_cmd_polyline_t;
01566 
01570 typedef struct player_graphics2d_cmd_polygon
01571 {
01573   uint16_t count;
01575   player_point_2d_t points[PLAYER_GRAPHICS2D_MAX_POINTS];
01577   player_color_t color;
01579   player_color_t fill_color;
01581   uint8_t filled;
01582 } player_graphics2d_cmd_polygon_t;
01583 
01588 // /////////////////////////////////////////////////////////////////////////////
01602 #define PLAYER_GRIPPER_DATA_STATE 1
01603 
01605 #define PLAYER_GRIPPER_CMD_STATE 1
01606 
01608 #define PLAYER_GRIPPER_REQ_GET_GEOM 1
01609 
01611 #define GRIPopen   1
01612 
01613 #define GRIPclose  2
01614 
01615 #define GRIPstop   3
01616 
01617 #define LIFTup     4
01618 
01619 #define LIFTdown   5
01620 
01621 #define LIFTstop   6
01622 
01623 #define GRIPstore  7
01624 
01625 #define GRIPdeploy 8
01626 
01627 #define GRIPhalt   15
01628 
01629 #define GRIPpress  16
01630 
01631 #define LIFTcarry  17
01632 
01661 typedef struct player_gripper_data
01662 {
01664   uint32_t state;
01666   uint32_t beams;
01667 } player_gripper_data_t;
01668 
01676 typedef struct player_gripper_cmd
01677 {
01679   uint32_t cmd;
01681   uint32_t arg;
01682 } player_gripper_cmd_t;
01683 
01684 
01690 typedef struct player_gripper_geom
01691 {
01693   player_pose_t pose;
01695   player_bbox_t size;
01696 } player_gripper_geom_t;
01697 
01700 // /////////////////////////////////////////////////////////////////////////////
01713 #define PLAYER_IR_MAX_SAMPLES 32
01714 
01716 #define PLAYER_IR_POSE        1
01717 
01718 #define PLAYER_IR_POWER       2
01719 
01721 #define PLAYER_IR_DATA_RANGES 1
01722 
01726 typedef struct player_ir_data
01727 {
01729   uint32_t voltages_count;
01731   float voltages[PLAYER_IR_MAX_SAMPLES];
01733   uint32_t ranges_count;
01735   float ranges[PLAYER_IR_MAX_SAMPLES];
01736 } player_ir_data_t;
01737 
01741 typedef struct player_ir_pose
01742 {
01744   uint32_t poses_count;
01746   player_pose_t poses[PLAYER_IR_MAX_SAMPLES];
01747 } player_ir_pose_t;
01748 
01753 typedef struct player_ir_power_req
01754 {
01756   uint8_t state;
01757 } player_ir_power_req_t;
01760 // /////////////////////////////////////////////////////////////////////////////
01774 #define PLAYER_JOYSTICK_DATA_STATE 1
01775 
01780 typedef struct player_joystick_data
01781 {
01783   int32_t xpos;
01785   int32_t ypos;
01787   int32_t xscale;
01789   int32_t yscale;
01791   uint32_t buttons;
01792 } player_joystick_data_t;
01793 
01796 // /////////////////////////////////////////////////////////////////////////////
01821 #define PLAYER_LASER_MAX_SAMPLES  1024
01822 
01824 #define PLAYER_LASER_DATA_SCAN        1
01825 
01826 #define PLAYER_LASER_DATA_SCANPOSE    2
01827 
01829 #define PLAYER_LASER_REQ_GET_GEOM     1
01830 
01831 #define PLAYER_LASER_REQ_SET_CONFIG   2
01832 
01833 #define PLAYER_LASER_REQ_GET_CONFIG   3
01834 
01835 #define PLAYER_LASER_REQ_POWER        4
01836 
01840 typedef struct player_laser_data
01841 {
01843   float min_angle;
01845   float max_angle;
01847   float resolution;
01849   float max_range;
01851   uint32_t ranges_count;
01853   float ranges[PLAYER_LASER_MAX_SAMPLES];
01855   uint32_t intensity_count;
01857   uint8_t intensity[PLAYER_LASER_MAX_SAMPLES];
01859   uint32_t id;
01860 } player_laser_data_t;
01861 
01866 typedef struct player_laser_data_scanpose
01867 {
01869   player_laser_data_t scan;
01871   player_pose_t pose;
01872 } player_laser_data_scanpose_t;
01873 
01878 typedef struct player_laser_geom
01879 {
01881   player_pose_t pose;
01883   player_bbox_t size;
01884 } player_laser_geom_t;
01885 
01894 typedef struct player_laser_config
01895 {
01897   float min_angle;
01899   float max_angle;
01901   float resolution;
01903   float max_range;
01905   float range_res;
01907   uint8_t  intensity;
01908 } player_laser_config_t;
01909 
01914 typedef struct player_laser_power_config
01915 {
01917   uint8_t state;
01918 } player_laser_power_config_t;
01919 
01922 // /////////////////////////////////////////////////////////////////////////////
01936 #define PLAYER_LIMB_STATE_IDLE        1
01937 
01938 #define PLAYER_LIMB_STATE_BRAKED      2
01939 
01940 #define PLAYER_LIMB_STATE_MOVING      3
01941 
01942 #define PLAYER_LIMB_STATE_OOR         4
01943 
01944 #define PLAYER_LIMB_STATE_COLL        5
01945 
01947 #define PLAYER_LIMB_DATA              1
01948 
01950 #define PLAYER_LIMB_HOME_CMD          1
01951 
01952 #define PLAYER_LIMB_STOP_CMD          2
01953 
01954 #define PLAYER_LIMB_SETPOSE_CMD       3
01955 
01956 #define PLAYER_LIMB_SETPOSITION_CMD   4
01957 
01958 #define PLAYER_LIMB_VECMOVE_CMD       5
01959 
01961 #define PLAYER_LIMB_POWER_REQ         1
01962 
01963 #define PLAYER_LIMB_BRAKES_REQ        2
01964 
01965 #define PLAYER_LIMB_GEOM_REQ          3
01966 
01967 #define PLAYER_LIMB_SPEED_REQ         4
01968 
01972 typedef struct player_limb_data
01973 {
01975   player_point_3d_t position;
01977   player_point_3d_t approach;
01981   player_point_3d_t orientation;
01983   uint8_t state;
01984 } player_limb_data_t;
01985 
01989 typedef struct player_limb_home_cmd
01990 {
01991 } player_limb_home_cmd_t;
01992 
01996 typedef struct player_limb_stop_cmd
01997 {
01998 } player_limb_stop_cmd_t;
01999 
02004 typedef struct player_limb_setpose_cmd
02005 {
02007   player_point_3d_t position;
02009   player_point_3d_t approach;
02011   player_point_3d_t orientation;
02012 } player_limb_setpose_cmd_t;
02013 
02018 typedef struct player_limb_setposition_cmd
02019 {
02021   player_point_3d_t position;
02022 } player_limb_setposition_cmd_t;
02023 
02028 typedef struct player_limb_vecmove_cmd
02029 {
02031   player_point_3d_t direction;
02033   float length;
02034 } player_limb_vecmove_cmd_t;
02035 
02041 typedef struct player_limb_power_req
02042 {
02044   uint8_t value;
02045 } player_limb_power_req_t;
02046 
02051 typedef struct player_limb_brakes_req
02052 {
02054   uint8_t value;
02055 } player_limb_brakes_req_t;
02056 
02060 typedef struct player_limb_geom_req
02061 {
02063   player_point_3d_t basePos;
02064 } player_limb_geom_req_t;
02065 
02070 typedef struct player_limb_speed_req
02071 {
02073   float speed;
02074 } player_limb_speed_req_t;
02075 
02078 // /////////////////////////////////////////////////////////////////////////////
02096 #define PLAYER_LOCALIZE_MAX_HYPOTHS   10
02097 
02099 #define PLAYER_LOCALIZE_PARTICLES_MAX 100
02100 
02102 #define PLAYER_LOCALIZE_DATA_HYPOTHS      1
02103 
02105 #define PLAYER_LOCALIZE_REQ_SET_POSE      1
02106 
02107 #define PLAYER_LOCALIZE_REQ_GET_PARTICLES 2
02108 
02114 typedef struct player_localize_hypoth
02115 {
02117   player_pose_t mean;
02119   double cov[3];
02121   double alpha;
02122 } player_localize_hypoth_t;
02123 
02128 typedef struct player_localize_data
02129 {
02131   uint32_t pending_count;
02133   double pending_time;
02135   uint32_t hypoths_count;
02137   player_localize_hypoth_t hypoths[PLAYER_LOCALIZE_MAX_HYPOTHS];
02138 } player_localize_data_t;
02139 
02144 typedef struct player_localize_set_pose
02145 {
02147   player_pose_t mean;
02150   double cov[3];
02151 } player_localize_set_pose_t;
02152 
02154 typedef struct player_localize_particle
02155 {
02157   player_pose_t pose;
02159   double alpha;
02160 } player_localize_particle_t;
02161 
02167 typedef struct player_localize_get_particles
02168 {
02170   player_pose_t mean;
02172   double variance;
02174   uint32_t particles_count;
02176   player_localize_particle_t particles[PLAYER_LOCALIZE_PARTICLES_MAX];
02177 } player_localize_get_particles_t;
02178 
02181 // /////////////////////////////////////////////////////////////////////////////
02196 #define  PLAYER_LOG_TYPE_READ       1
02197 
02198 #define  PLAYER_LOG_TYPE_WRITE      2
02199 
02201 #define PLAYER_LOG_REQ_SET_WRITE_STATE  1
02202 
02203 #define PLAYER_LOG_REQ_SET_READ_STATE   2
02204 
02205 #define PLAYER_LOG_REQ_GET_STATE        3
02206 
02207 #define PLAYER_LOG_REQ_SET_READ_REWIND  4
02208 
02209 #define PLAYER_LOG_REQ_SET_FILENAME     5
02210 
02215 typedef struct player_log_set_write_state
02216 {
02218   uint8_t state;
02219 } player_log_set_write_state_t;
02220 
02225 typedef struct player_log_set_read_state
02226 {
02228   uint8_t state;
02229 } player_log_set_read_state_t;
02230 
02236 typedef struct player_log_set_read_rewind
02237 {
02238 } player_log_set_read_rewind_t;
02239 
02244 typedef struct player_log_get_state
02245 {
02248   uint8_t type;
02250   uint8_t state;
02251 } player_log_get_state_t;
02252 
02257 typedef struct player_log_set_filename
02258 {
02260   uint32_t filename_count;
02262   char filename[256];
02263 } player_log_set_filename_t;
02264 
02267 // /////////////////////////////////////////////////////////////////////////////
02285 #define PLAYER_MAP_MAX_TILE_SIZE 2097102
02286 
02291 #define PLAYER_MAP_MAX_SEGMENTS 131068
02292 
02294 #define PLAYER_MAP_DATA_INFO               1
02295 
02297 #define PLAYER_MAP_REQ_GET_INFO            1
02298 
02299 #define PLAYER_MAP_REQ_GET_DATA            2
02300 
02301 #define PLAYER_MAP_REQ_GET_VECTOR          3
02302 
02309 typedef struct player_map_info
02310 {
02312   float scale;
02314   uint32_t width;
02316   uint32_t height;
02319   player_pose_t origin;
02320 } player_map_info_t;
02321 
02330 typedef struct player_map_data
02331 {
02333   uint32_t col;
02335   uint32_t row;
02337   uint32_t width;
02339   uint32_t height;
02341   uint32_t data_count;
02343   int8_t data[PLAYER_MAP_MAX_TILE_SIZE];
02344 } player_map_data_t;
02345 
02350 typedef struct player_map_data_vector
02351 {
02353   float minx;
02355   float maxx;
02357   float miny;
02359   float maxy;
02361   uint32_t segments_count;
02363   player_segment_t segments[PLAYER_MAP_MAX_SEGMENTS];
02364 } player_map_data_vector_t;
02367 // /////////////////////////////////////////////////////////////////////////////
02387 #define MCOM_DATA_LEN            128
02388 
02389 #define MCOM_DATA_BUFFER_SIZE    0
02390 
02391 #define  MCOM_N_BUFS             10
02392 
02393 #define MCOM_CHANNEL_LEN        8
02394 
02395 #define  MCOM_EMPTY_STRING          "(EMPTY)"
02396 
02397 #define  PLAYER_MCOM_PUSH         0
02398 
02399 #define  PLAYER_MCOM_POP          1
02400 
02401 #define  PLAYER_MCOM_READ         2
02402 
02403 #define  PLAYER_MCOM_CLEAR        3
02404 
02405 #define  PLAYER_MCOM_SET_CAPACITY 4
02406 
02407 #define MCOM_COMMAND_BUFFER_SIZE (sizeof(player_mcom_config_t))
02408 
02410 typedef struct player_mcom_data
02411 {
02413   char full;
02415   uint32_t data_count;
02417   char data[MCOM_DATA_LEN];
02418 } player_mcom_data_t;
02419 
02421 typedef struct player_mcom_config
02422 {
02424   uint32_t command;
02426   uint32_t type;
02428   uint32_t channel_count;
02430   int32_t channel[MCOM_CHANNEL_LEN];
02432   player_mcom_data_t data;
02433 } player_mcom_config_t;
02434 
02436 typedef struct player_mcom_return
02437 {
02439   uint32_t type;
02441   uint32_t channel_count;
02443   int32_t channel[MCOM_CHANNEL_LEN];
02445   player_mcom_data_t data;
02446 } player_mcom_return_t;
02447 
02450 // /////////////////////////////////////////////////////////////////////////////
02462 #define PLAYER_PLANNER_MAX_WAYPOINTS 128
02463 
02465 #define PLAYER_PLANNER_DATA_STATE 1
02466 
02468 #define PLAYER_PLANNER_CMD_GOAL 1
02469 
02471 #define PLAYER_PLANNER_REQ_GET_WAYPOINTS 1
02472 
02473 #define PLAYER_PLANNER_REQ_ENABLE        2
02474 
02479 typedef struct player_planner_data
02480 {
02482   uint8_t valid;
02484   uint8_t done;
02486   player_pose_t pos;
02488   player_pose_t goal;
02490   player_pose_t waypoint;
02494   int32_t waypoint_idx;
02496   uint32_t waypoints_count;
02497 } player_planner_data_t;
02498 
02502 typedef struct player_planner_cmd
02503 {
02505   player_pose_t goal;
02506 } player_planner_cmd_t;
02507 
02513 typedef struct player_planner_waypoints_req
02514 {
02516   uint32_t waypoints_count;
02518   player_pose_t waypoints[PLAYER_PLANNER_MAX_WAYPOINTS];
02519 } player_planner_waypoints_req_t;
02520 
02526 typedef struct player_planner_enable_req
02527 {
02529   uint8_t state;
02530 } player_planner_enable_req_t;
02531 
02534 // /////////////////////////////////////////////////////////////////////////////
02550 #define PLAYER_OPEN_MODE   1
02551 
02552 #define PLAYER_CLOSE_MODE  2
02553 
02554 #define PLAYER_ERROR_MODE  3
02555 
02556 
02559 #define PLAYER_DATAMODE_PUSH  1
02560 
02564 #define PLAYER_DATAMODE_PULL   2
02565 
02567 #define PLAYER_PLAYER_REQ_DEVLIST     1
02568 
02569 #define PLAYER_PLAYER_REQ_DRIVERINFO  2
02570 
02571 #define PLAYER_PLAYER_REQ_DEV         3
02572 
02573 #define PLAYER_PLAYER_REQ_DATA        4
02574 #define PLAYER_PLAYER_REQ_DATAMODE    5
02575 #define PLAYER_PLAYER_REQ_DATAFREQ    6
02576 #define PLAYER_PLAYER_REQ_AUTH        7
02577 #define PLAYER_PLAYER_REQ_NAMESERVICE 8
02578 #define PLAYER_PLAYER_REQ_IDENT       9
02579 #define PLAYER_PLAYER_REQ_ADD_REPLACE_RULE 10
02580 
02581 
02588 typedef struct player_device_devlist
02589 {
02591   uint32_t devices_count;
02593   player_devaddr_t devices[PLAYER_MAX_DEVICES];
02594 } player_device_devlist_t;
02595 
02602 typedef struct player_device_driverinfo
02603 {
02605   player_devaddr_t addr;
02607   uint32_t driver_name_count;
02609   char driver_name[PLAYER_MAX_DRIVER_STRING_LEN];
02610 } player_device_driverinfo_t;
02611 
02629 typedef struct player_device_req
02630 {
02632   player_devaddr_t addr;
02634   uint8_t access;
02636   uint32_t driver_name_count;
02638   char driver_name[PLAYER_MAX_DRIVER_STRING_LEN];
02639 } player_device_req_t;
02640 
02647 typedef struct player_device_data_req
02648 {
02649 } player_device_data_req_t;
02650 
02657 typedef struct player_device_datamode_req
02658 {
02660   uint8_t mode;
02661 
02662 } player_device_datamode_req_t;
02663 
02664 
02672 typedef struct player_device_datafreq_req
02673 {
02675   uint32_t frequency;
02676 } player_device_datafreq_req_t;
02677 
02678 
02708 typedef struct player_device_auth_req
02709 {
02711   uint32_t auth_key_count;
02713   uint8_t auth_key[PLAYER_KEYLEN];
02714 
02715 } player_device_auth_req_t;
02716 
02717 
02719 typedef struct player_device_nameservice_req
02720 {
02722   uint32_t name_count;
02724   uint8_t name[PLAYER_MAX_DRIVER_STRING_LEN];
02726   uint16_t port;
02727 } player_device_nameservice_req_t;
02728 
02739 typedef struct player_add_replace_rule_req
02740 {
02742   int32_t interf;
02744   int32_t index;
02746   int32_t type;
02748   int32_t subtype;
02750   int32_t replace ;
02751 } player_add_replace_rule_req_t;
02752 
02753 
02756 // /////////////////////////////////////////////////////////////////////////////
02768 #define PLAYER_POSITION1D_GET_GEOM          1
02769 
02770 #define PLAYER_POSITION1D_MOTOR_POWER       2
02771 
02772 #define PLAYER_POSITION1D_VELOCITY_MODE     3
02773 
02774 #define PLAYER_POSITION1D_POSITION_MODE     4
02775 
02776 #define PLAYER_POSITION1D_SET_ODOM          5
02777 
02778 #define PLAYER_POSITION1D_RESET_ODOM        6
02779 
02780 #define PLAYER_POSITION1D_SPEED_PID         7
02781 
02782 #define PLAYER_POSITION1D_POSITION_PID      8
02783 
02784 #define PLAYER_POSITION1D_SPEED_PROF        9
02785 
02787 #define PLAYER_POSITION1D_DATA_STATE      1
02788 
02789 #define PLAYER_POSITION1D_DATA_GEOM       2
02790 
02792 #define PLAYER_POSITION1D_CMD_STATE       1
02793 
02798 typedef struct player_position1d_data
02799 {
02801   float pos;
02803   float vel;
02805   uint8_t stall;
02806 } player_position1d_data_t;
02807 
02813 typedef struct player_position1d_cmd
02814 {
02816   float pos;
02818   float vel;
02820   uint8_t state;
02822   uint32_t type;
02823 } player_position1d_cmd_t;
02824 
02829 typedef struct player_position1d_geom
02830 {
02832   player_pose_t pose;
02834   player_bbox_t size;
02835 } player_position1d_geom_t;
02836 
02848 typedef struct player_position1d_power_config
02849 {
02851   uint8_t state;
02852 } player_position1d_power_config_t;
02853 
02862 typedef struct player_position1d_velocity_mode_config
02863 {
02865   uint32_t value;
02866 } player_position1d_velocity_mode_config_t;
02867 
02872 typedef struct player_position1d_reset_odom_config
02873 {
02875   uint32_t value;
02876 } player_position1d_reset_odom_config_t;
02877 
02883 typedef struct player_position1d_position_mode
02884 {
02886   uint32_t state;
02887 } player_position1d_position_mode_req_t;
02888 
02894 typedef struct player_position1d_set_odom
02895 {
02897   float pos;
02898 } player_position1d_set_odom_req_t;
02899 
02905 typedef struct player_position1d_speed_pid
02906 {
02908   float kp;
02910   float ki;
02912   float kd;
02913 } player_position1d_speed_pid_req_t;
02914 
02920 typedef struct player_position1d_position_pid
02921 {
02923   float kp;
02925   float ki;
02927   float kd;
02928 } player_position1d_position_pid_req_t;
02929 
02935 typedef struct player_position1d_speed_prof
02936 {
02938   float speed;
02940   float acc;
02941 } player_position1d_speed_prof_req_t;
02945 // /////////////////////////////////////////////////////////////////////////////
02957 #define PLAYER_POSITION2D_REQ_GET_GEOM          1
02958 
02959 #define PLAYER_POSITION2D_REQ_MOTOR_POWER       2
02960 
02961 #define PLAYER_POSITION2D_REQ_VELOCITY_MODE     3
02962 
02963 #define PLAYER_POSITION2D_REQ_POSITION_MODE     4
02964 
02965 #define PLAYER_POSITION2D_REQ_SET_ODOM          5
02966 
02967 #define PLAYER_POSITION2D_REQ_RESET_ODOM        6
02968 
02969 #define PLAYER_POSITION2D_REQ_SPEED_PID         7
02970 
02971 #define PLAYER_POSITION2D_REQ_POSITION_PID      8
02972 
02973 #define PLAYER_POSITION2D_REQ_SPEED_PROF        9
02974 
02976 #define PLAYER_POSITION2D_DATA_STATE             1
02977 
02978 #define PLAYER_POSITION2D_DATA_GEOM              2
02979 
02981 #define PLAYER_POSITION2D_CMD_VEL                1
02982 
02983 #define PLAYER_POSITION2D_CMD_POS              2
02984 
02985 #define PLAYER_POSITION2D_CMD_CAR              3
02986 
02991 typedef struct player_position2d_data
02992 {
02994   player_pose_t pos;
02996   player_pose_t vel;
02998   uint8_t stall;
02999 } player_position2d_data_t;
03000 
03006 typedef struct player_position2d_cmd_vel
03007 {
03009   player_pose_t vel;
03011   uint8_t state;
03012 } player_position2d_cmd_vel_t;
03013 
03019 typedef struct player_position2d_cmd_pos
03020 {
03022   player_pose_t pos;
03024   uint8_t state;
03025 } player_position2d_cmd_pos_t;
03026 
03031 typedef struct player_position2d_cmd_car
03032 {
03034   double velocity;
03036   double angle;
03037 } player_position2d_cmd_car_t;
03038 
03039 
03045 typedef struct player_position2d_geom
03046 {
03048   player_pose_t pose;
03050   player_bbox_t size;
03051 } player_position2d_geom_t;
03052 
03064 typedef struct player_position2d_power_config
03065 {
03067   uint8_t state;
03068 } player_position2d_power_config_t;
03069 
03094 typedef struct player_position2d_velocity_mode_config
03095 {
03097   uint32_t value;
03098 } player_position2d_velocity_mode_config_t;
03099 
03104 typedef struct player_position2d_reset_odom_config
03105 {
03106 } player_position2d_reset_odom_config_t;
03107 
03113 typedef struct player_position2d_position_mode_req
03114 {
03116   uint32_t state;
03117 } player_position2d_position_mode_req_t;
03118 
03123 typedef struct player_position2d_set_odom_req
03124 {
03126   player_pose_t pose;
03127 } player_position2d_set_odom_req_t;
03128 
03134 typedef struct player_position2d_speed_pid_req
03135 {
03137   float kp;
03139   float ki;
03141   float kd;
03142 } player_position2d_speed_pid_req_t;
03143 
03150 typedef struct player_position2d_position_pid_req
03151 {
03153   float kp;
03155   float ki;
03157   float kd;
03158 } player_position2d_position_pid_req_t;
03159 
03164 typedef struct player_position2d_speed_prof_req
03165 {
03167   float speed;
03169   float acc;
03170 } player_position2d_speed_prof_req_t;
03173 // /////////////////////////////////////////////////////////////////////////////
03186 #define PLAYER_POSITION3D_DATA_STATE 1
03187 
03188 #define PLAYER_POSITION3D_DATA_GEOMETRY 2
03189 
03191 #define  PLAYER_POSITION3D_CMD_SET_VEL      1
03192 
03193 #define  PLAYER_POSITION3D_CMD_SET_POS      2
03194 
03196 #define PLAYER_POSITION3D_GET_GEOM          1
03197 
03198 #define PLAYER_POSITION3D_MOTOR_POWER       2
03199 
03200 #define PLAYER_POSITION3D_VELOCITY_MODE     3
03201 
03202 #define PLAYER_POSITION3D_POSITION_MODE     4
03203 
03204 #define PLAYER_POSITION3D_RESET_ODOM        5
03205 
03206 #define PLAYER_POSITION3D_SET_ODOM          6
03207 
03208 #define PLAYER_POSITION3D_SPEED_PID         7
03209 
03210 #define PLAYER_POSITION3D_POSITION_PID      8
03211 
03212 #define PLAYER_POSITION3D_SPEED_PROF        9
03213 
03218 typedef struct player_position3d_data
03219 {
03221   player_pose3d_t pos;
03223   player_pose3d_t vel;
03225   uint8_t stall;
03226 } player_position3d_data_t;
03227 
03232 typedef struct player_position3d_cmd_pos
03233 {
03235   player_pose3d_t pos;
03237   uint8_t state;
03238 } player_position3d_cmd_pos_t;
03239 
03244 typedef struct player_position3d_cmd_vel
03245 {
03247   player_pose3d_t vel;
03249   uint8_t state;
03250 } player_position3d_cmd_vel_t;
03251 
03255 typedef struct player_position3d_geom
03256 {
03258   player_pose3d_t pose;
03260   player_bbox3d_t size;
03261 } player_position3d_geom_t;
03262 
03273 typedef struct player_position3d_power_config
03274 {
03276   uint8_t state;
03277 } player_position3d_power_config_t;
03278 
03284 typedef struct player_position3d_position_mode_req
03285 {
03287   uint32_t value;
03288 } player_position3d_position_mode_req_t;
03289 
03297 typedef struct player_position3d_velocity_mode_config
03298 {
03300   uint32_t value;
03301 } player_position3d_velocity_mode_config_t;
03302 
03307 typedef struct player_position3d_set_odom_req
03308 {
03310   player_pose3d_t pos;
03311 } player_position3d_set_odom_req_t;
03312 
03317 typedef struct player_position3d_reset_odom_config
03318 {
03319 } player_position3d_reset_odom_config_t;
03320 
03325 typedef struct player_position3d_speed_pid_req
03326 {
03328   float kp;
03330   float ki;
03332   float kd;
03333 } player_position3d_speed_pid_req_t;
03334 
03339 typedef struct player_position3d_position_pid_req
03340 {
03342   float kp;
03344   float ki;
03346   float kd;
03347 } player_position3d_position_pid_req_t;
03348 
03353 typedef struct player_position3d_speed_prof_req
03354 {
03356   float speed;
03358   float acc;
03359 } player_position3d_speed_prof_req_t;
03360 
03363 // /////////////////////////////////////////////////////////////////////////////
03377 #define PLAYER_POWER_DATA_STATE 1
03378 
03380 #define PLAYER_POWER_SET_CHARGING_POLICY_REQ 1
03381 
03383 #define PLAYER_POWER_MASK_VOLTS 1
03384 #define PLAYER_POWER_MASK_WATTS 2
03385 #define PLAYER_POWER_MASK_JOULES 4
03386 #define PLAYER_POWER_MASK_PERCENT 8
03387 #define PLAYER_POWER_MASK_CHARGING 16
03388 
03392 typedef struct player_power_data
03393 {
03397   uint32_t valid;
03398 
03400   float  volts;
03402   float percent;
03404   float joules;
03407   float watts;
03412   int32_t charging;
03413 
03414 } player_power_data_t;
03415 
03416 
03421 typedef struct player_power_chargepolicy_config
03422 {
03425   uint8_t enable_input;
03428   uint8_t enable_output;
03429 } player_power_chargepolicy_config_t;
03430 
03433 // /////////////////////////////////////////////////////////////////////////////
03446 #define PLAYER_PTZ_MAX_CONFIG_LEN  32
03447 
03449 #define PLAYER_PTZ_VELOCITY_CONTROL 0
03450 
03451 #define PLAYER_PTZ_POSITION_CONTROL 1
03452 
03454 #define PLAYER_PTZ_REQ_GENERIC         1
03455 
03456 #define PLAYER_PTZ_REQ_CONTROL_MODE    2
03457 
03458 #define PLAYER_PTZ_REQ_AUTOSERVO       3
03459 
03460 #define PLAYER_PTZ_REQ_GEOM            4
03461 
03463 #define PLAYER_PTZ_DATA_STATE      1
03464 
03465 #define PLAYER_PTZ_DATA_GEOM       2
03466 
03468 #define PLAYER_PTZ_CMD_STATE       1
03469 
03474 typedef struct player_ptz_data
03475 {
03477   float pan;
03479   float tilt;
03481   float zoom;
03483   float panspeed;
03485   float tiltspeed;
03486 } player_ptz_data_t;
03487 
03492 typedef struct player_ptz_cmd
03493 {
03495   float pan;
03497   float tilt;
03499   float zoom;
03501   float panspeed;
03503   float tiltspeed;
03504 } player_ptz_cmd_t;
03505 
03509 typedef struct player_ptz_geom
03510 {
03512   player_pose3d_t pos;
03514   player_bbox3d_t size;
03515 } player_ptz_geom_t;
03516 
03523 typedef struct player_ptz_req_generic
03524 {
03526   uint32_t  config_count;
03528   uint32_t  config[PLAYER_PTZ_MAX_CONFIG_LEN];
03529 } player_ptz_req_generic_t;
03530 
03537 typedef struct player_ptz_req_control_mode
03538 {
03541   uint32_t mode;
03542 } player_ptz_req_control_mode_t;
03543 
03546 // /////////////////////////////////////////////////////////////////////////////
03568 #define PLAYER_SIMULATION_IDENTIFIER_MAXLEN 64
03569 
03571 #define PLAYER_SIMULATION_REQ_SET_POSE2D        1
03572 
03573 #define PLAYER_SIMULATION_REQ_GET_POSE2D        2
03574 
03579 typedef struct player_simulation_data
03580 {
03582   uint8_t data;
03583 } player_simulation_data_t;
03584 
03589 typedef struct player_simulation_cmd
03590 {
03592   uint8_t cmd;
03593 } player_simulation_cmd_t;
03594 
03601 typedef struct player_simulation_pose2d_req
03602 {
03604   uint32_t name_count;
03606   char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
03608   player_pose_t pose;
03609 } player_simulation_pose2d_req_t;
03610 
03613 // /////////////////////////////////////////////////////////////////////////////
03626 #define PLAYER_SONAR_MAX_SAMPLES 64
03627 
03629 #define PLAYER_SONAR_REQ_GET_GEOM    1
03630 
03631 #define PLAYER_SONAR_REQ_POWER       2
03632 
03634 #define PLAYER_SONAR_DATA_RANGES     1
03635 
03636 #define PLAYER_SONAR_DATA_GEOM       2
03637 
03642 typedef struct player_sonar_data
03643 {
03645   uint32_t ranges_count;
03647   float ranges[PLAYER_SONAR_MAX_SAMPLES];
03648 } player_sonar_data_t;
03649 
03656 typedef struct player_sonar_geom
03657 {
03659   uint32_t poses_count;
03661   player_pose_t poses[PLAYER_SONAR_MAX_SAMPLES];
03662 } player_sonar_geom_t;
03663 
03668 typedef struct player_sonar_power_config
03669 {
03671   uint8_t state;
03672 } player_sonar_power_config_t;
03673 
03676 // /////////////////////////////////////////////////////////////////////////////
03689 #define PLAYER_SOUND_CMD_IDX 1
03690 
03695 typedef struct player_sound_cmd
03696 {
03698   uint32_t index;
03699 } player_sound_cmd_t;
03700 
03703 // /////////////////////////////////////////////////////////////////////////////
03715 #define PLAYER_SPEECH_MAX_STRING_LEN 256
03716 
03718 #define PLAYER_SPEECH_CMD_SAY 1
03719 
03724 typedef struct player_speech_cmd
03725 {
03727   uint32_t string_count;
03729   char string[PLAYER_SPEECH_MAX_STRING_LEN];
03730 } player_speech_cmd_t;
03731 
03734 // /////////////////////////////////////////////////////////////////////////////
03747 #define PLAYER_SPEECH_RECOGNITION_TEXT_LEN 256
03748 
03750 #define PLAYER_SPEECH_RECOGNITION_DATA_STRING 1
03751 
03755 typedef struct player_speech_recognition_data
03756 {
03758   uint32_t text_count;
03760   char text[PLAYER_SPEECH_RECOGNITION_TEXT_LEN];
03761 } player_speech_recognition_data_t;
03762 
03765 // /////////////////////////////////////////////////////////////////////////////
03782 #define PLAYER_TRUTH_DATA_POSE 0x01
03783 
03784 #define PLAYER_TRUTH_DATA_FIDUCIAL_ID 0x02
03785 
03787 #define PLAYER_TRUTH_REQ_SET_POSE 0x03
03788 
03789 #define PLAYER_TRUTH_REQ_SET_FIDUCIAL_ID 0x04
03790 
03791 #define PLAYER_TRUTH_REQ_GET_FIDUCIAL_ID 0x05
03792 
03797 typedef struct player_truth_pose
03798 {
03800   player_pose3d_t pose;
03801 }  player_truth_pose_t;
03802 
03810 typedef struct player_truth_fiducial_id
03811 {
03814   uint8_t subtype;
03816   int16_t id;
03817 }  player_truth_fiducial_id_t;
03818 
03821 // /////////////////////////////////////////////////////////////////////////////
03834 #define PLAYER_WAVEFORM_DATA_MAX 4096
03835 
03837 #define PLAYER_WAVEFORM_DATA_SAMPLE 1
03838 
03843 typedef struct player_waveform_data
03844 {
03846   uint32_t rate;
03848   uint32_t depth;
03850   uint32_t data_count;
03852   uint8_t data[PLAYER_WAVEFORM_DATA_MAX];
03853 } player_waveform_data_t;
03854 
03857 // /////////////////////////////////////////////////////////////////////////////
03870 #define PLAYER_WIFI_MAX_LINKS   32
03871 
03873 #define PLAYER_WIFI_QUAL_DBM     1
03874 
03875 #define PLAYER_WIFI_QUAL_REL     2
03876 
03877 #define PLAYER_WIFI_QUAL_UNKNOWN 3
03878 
03880 #define PLAYER_WIFI_MODE_UNKNOWN 0
03881 
03882 #define PLAYER_WIFI_MODE_AUTO    1
03883 
03884 #define PLAYER_WIFI_MODE_ADHOC   2
03885 
03886 #define PLAYER_WIFI_MODE_INFRA   3
03887 
03888 #define PLAYER_WIFI_MODE_MASTER  4
03889 
03890 #define PLAYER_WIFI_MODE_REPEAT  5
03891 
03892 #define PLAYER_WIFI_MODE_SECOND  6
03893 
03895 #define PLAYER_WIFI_MAC          1
03896 
03897 #define PLAYER_WIFI_IWSPY_ADD    2
03898 
03899 #define PLAYER_WIFI_IWSPY_DEL    3
03900 
03901 #define PLAYER_WIFI_IWSPY_PING   4
03902 
03904 #define PLAYER_WIFI_DATA_STATE 1
03905 
03911 typedef struct player_wifi_link
03912 {
03914   uint32_t mac_count;
03915   uint8_t mac[32];
03917   uint32_t ip_count;
03918   uint8_t ip[32];
03920   uint32_t essid_count;
03921   uint8_t essid[32];
03923   uint32_t mode;
03925   uint32_t freq;
03927   uint32_t encrypt;
03929   uint32_t qual;
03931   uint32_t level;
03933   uint32_t noise;
03934 } player_wifi_link_t;
03935 
03939 typedef struct player_wifi_data
03940 {
03942   uint32_t links_count;
03944   player_wifi_link_t links[PLAYER_WIFI_MAX_LINKS];
03946   uint32_t throughput;
03948   uint32_t bitrate;
03950   uint32_t mode;
03952   uint32_t qual_type;
03954   uint32_t maxqual;
03956   uint32_t maxlevel;
03958   uint32_t maxnoise;
03960   char ap[32];
03961 } player_wifi_data_t;
03962 
03964 typedef struct player_wifi_mac_req
03965 {
03967   uint32_t mac_count;
03968   uint8_t mac[32];
03969 } player_wifi_mac_req_t;
03970 
03972 typedef struct player_wifi_iwspy_addr_req
03973 {
03975   char      address[32];
03976 } player_wifi_iwspy_addr_req_t;
03977 
03980 // /////////////////////////////////////////////////////////////////////////////
03993 #define PLAYER_RFID_MAX_TAGS 30
03994 
03995 #define PLAYER_RFID_MAX_GUID 8
03996 
03998 #define PLAYER_RFID_DATA         1
03999 
04001 #define PLAYER_RFID_REQ_POWER    1
04002 
04003 #define PLAYER_RFID_REQ_READTAG  2
04004 
04005 #define PLAYER_RFID_REQ_WRITETAG 3
04006 
04007 #define PLAYER_RFID_REQ_LOCKTAG  4
04008 
04010 typedef struct player_rfid_tag
04011 {
04013   uint32_t type;
04015   uint32_t guid_count;
04017   char guid[PLAYER_RFID_MAX_GUID];
04018 } player_rfid_tag_t;
04019 
04023 typedef struct player_rfid_data
04024 {
04026   uint32_t tags_count;
04028   player_rfid_tag_t tags[PLAYER_RFID_MAX_TAGS];
04029 } player_rfid_data_t;
04030 
04035 typedef struct player_rfid_cmd
04036 {
04038   uint8_t temp;
04039 } player_rfid_cmd_t;
04040 
04043 #endif /* PLAYER_H */

Last updated 12 September 2005 21:38:45