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.92.2.5 2007/10/02 21:04:31 gerkey 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 00093 #define PLAYER_MSGTYPE_SYNCH 5 00094 00101 #define PLAYER_MSGTYPE_RESP_NACK 6 00102 00115 #define PLAYER_NULL_CODE 256 // /dev/null analogue 00116 #define PLAYER_PLAYER_CODE 1 // the server itself 00117 #define PLAYER_POWER_CODE 2 // power subsystem 00118 #define PLAYER_GRIPPER_CODE 3 // gripper 00119 #define PLAYER_POSITION2D_CODE 4 // device that moves about in the plane 00120 #define PLAYER_SONAR_CODE 5 // fixed range-finder 00121 #define PLAYER_LASER_CODE 6 // scanning range-finder 00122 #define PLAYER_BLOBFINDER_CODE 7 // visual blobfinder 00123 #define PLAYER_PTZ_CODE 8 // pan-tilt-zoom unit 00124 #define PLAYER_AUDIO_CODE 9 // audio I/O 00125 #define PLAYER_FIDUCIAL_CODE 10 // fiducial detector 00126 #define PLAYER_SPEECH_CODE 12 // speech I/O 00127 #define PLAYER_GPS_CODE 13 // GPS unit 00128 #define PLAYER_BUMPER_CODE 14 // bumper array 00129 #define PLAYER_TRUTH_CODE 15 // ground-truth (via Stage; 00130 #define PLAYER_DIO_CODE 20 // digital I/O 00131 #define PLAYER_AIO_CODE 21 // analog I/O 00132 #define PLAYER_IR_CODE 22 // IR array 00133 #define PLAYER_WIFI_CODE 23 // wifi card status 00134 #define PLAYER_WAVEFORM_CODE 24 // fetch raw waveforms 00135 #define PLAYER_LOCALIZE_CODE 25 // localization 00136 #define PLAYER_MCOM_CODE 26 // multicoms 00137 #define PLAYER_SOUND_CODE 27 // sound file playback 00138 #define PLAYER_AUDIODSP_CODE 28 // audio dsp I/O 00139 #define PLAYER_AUDIOMIXER_CODE 29 // audio I/O 00140 #define PLAYER_POSITION3D_CODE 30 // 3-D position 00141 #define PLAYER_SIMULATION_CODE 31 // simulators 00142 #define PLAYER_BLINKENLIGHT_CODE 33 // blinking lights 00143 #define PLAYER_NOMAD_CODE 34 // Nomad robot 00144 #define PLAYER_CAMERA_CODE 40 // camera device 00145 #define PLAYER_MAP_CODE 42 // get a map 00146 #define PLAYER_PLANNER_CODE 44 // 2D motion planner 00147 #define PLAYER_LOG_CODE 45 // log read/write control 00148 #define PLAYER_ENERGY_CODE 46 // energy consumption 00149 //#define PLAYER_MOTOR_CODE 47 // motor interface 00150 #define PLAYER_JOYSTICK_CODE 49 // Joytstick 00151 #define PLAYER_SPEECH_RECOGNITION_CODE 50 // speech recognition 00152 #define PLAYER_OPAQUE_CODE 51 // plugin interface 00153 #define PLAYER_POSITION1D_CODE 52 // 1-D position 00154 #define PLAYER_ACTARRAY_CODE 53 // Actuator Array interface 00155 #define PLAYER_LIMB_CODE 54 // Limb interface 00156 #define PLAYER_GRAPHICS2D_CODE 55 // Graphics2D interface 00157 #define PLAYER_RFID_CODE 56 // RFID reader interface 00158 #define PLAYER_WSN_CODE 57 // Wireless Sensor Networks interface 00159 #define PLAYER_GRAPHICS3D_CODE 58 // Graphics3D interface 00160 00172 #define PLAYER_ACTARRAY_STRING "actarray" 00173 #define PLAYER_AIO_STRING "aio" 00174 #define PLAYER_AUDIO_STRING "audio" 00175 #define PLAYER_AUDIODSP_STRING "audiodsp" 00176 #define PLAYER_AUDIOMIXER_STRING "audiomixer" 00177 #define PLAYER_BLINKENLIGHT_STRING "blinkenlight" 00178 #define PLAYER_BLOBFINDER_STRING "blobfinder" 00179 #define PLAYER_BUMPER_STRING "bumper" 00180 #define PLAYER_CAMERA_STRING "camera" 00181 #define PLAYER_ENERGY_STRING "energy" 00182 #define PLAYER_DIO_STRING "dio" 00183 #define PLAYER_GRIPPER_STRING "gripper" 00184 #define PLAYER_FIDUCIAL_STRING "fiducial" 00185 #define PLAYER_GPS_STRING "gps" 00186 #define PLAYER_IR_STRING "ir" 00187 #define PLAYER_JOYSTICK_STRING "joystick" 00188 #define PLAYER_LASER_STRING "laser" 00189 #define PLAYER_LIMB_STRING "limb" 00190 #define PLAYER_LOCALIZE_STRING "localize" 00191 #define PLAYER_LOG_STRING "log" 00192 #define PLAYER_MAP_STRING "map" 00193 #define PLAYER_MCOM_STRING "mcom" 00194 //#define PLAYER_MOTOR_STRING "motor" 00195 #define PLAYER_NOMAD_STRING "nomad" 00196 #define PLAYER_NULL_STRING "null" 00197 #define PLAYER_OPAQUE_STRING "opaque" 00198 #define PLAYER_PLANNER_STRING "planner" 00199 #define PLAYER_PLAYER_STRING "player" 00200 #define PLAYER_POSITION1D_STRING "position1d" 00201 #define PLAYER_POSITION2D_STRING "position2d" 00202 #define PLAYER_POSITION3D_STRING "position3d" 00203 #define PLAYER_POWER_STRING "power" 00204 #define PLAYER_PTZ_STRING "ptz" 00205 #define PLAYER_RFID_STRING "rfid" 00206 #define PLAYER_SIMULATION_STRING "simulation" 00207 #define PLAYER_SONAR_STRING "sonar" 00208 #define PLAYER_SOUND_STRING "sound" 00209 #define PLAYER_SPEECH_STRING "speech" 00210 #define PLAYER_SPEECH_RECOGNITION_STRING "speech_recognition" 00211 #define PLAYER_TRUTH_STRING "truth" 00212 #define PLAYER_WAVEFORM_STRING "waveform" 00213 #define PLAYER_WIFI_STRING "wifi" 00214 #define PLAYER_GRAPHICS2D_STRING "graphics2d" 00215 #define PLAYER_GRAPHICS3D_STRING "graphics3d" 00216 #define PLAYER_WSN_STRING "wsn" 00217 00228 typedef struct player_devaddr 00229 { 00231 uint32_t host; 00234 uint32_t robot; 00236 uint16_t interf; 00238 uint16_t index; 00239 } player_devaddr_t; 00240 00244 typedef struct player_msghdr 00245 { 00247 player_devaddr_t addr; 00249 uint8_t type; 00251 uint8_t subtype; 00253 double timestamp; 00255 uint32_t seq; 00257 uint32_t size; 00258 } player_msghdr_t; 00267 typedef struct player_point_2d 00268 { 00270 float px; 00272 float py; 00273 } player_point_2d_t; 00274 00275 00277 typedef struct player_point_3d 00278 { 00280 float px; 00282 float py; 00284 float pz; 00285 } player_point_3d_t; 00286 00287 00289 typedef struct player_pose 00290 { 00292 float px; 00294 float py; 00296 float pa; 00297 } player_pose_t; 00298 00300 typedef struct player_pose3d 00301 { 00303 float px; 00305 float py; 00307 float pz; 00309 float proll; 00311 float ppitch; 00313 float pyaw; 00314 } player_pose3d_t; 00315 00317 typedef struct player_bbox 00318 { 00320 float sw; 00322 float sl; 00323 } player_bbox_t; 00324 00326 typedef struct player_bbox3d 00327 { 00329 float sw; 00331 float sl; 00333 float sh; 00334 } player_bbox3d_t; 00335 00337 typedef struct player_segment 00338 { 00340 float x0; 00342 float y0; 00344 float x1; 00346 float y1; 00347 } player_segment_t; 00348 00350 typedef struct player_color 00351 { 00353 uint8_t alpha; 00355 uint8_t red; 00357 uint8_t green; 00359 uint8_t blue; 00360 } player_color_t; 00361 00363 typedef struct player_bool 00364 { 00366 uint8_t state; 00367 } player_bool_t; 00368 00396 // ///////////////////////////////////////////////////////////////////////////// 00397 // 00398 // Here starts the alphabetical list of interfaces 00399 // (please keep it that way) 00400 // 00401 // ///////////////////////////////////////////////////////////////////////////// 00402 00440 // ///////////////////////////////////////////////////////////////////////////// 00455 #define PLAYER_ACTARRAY_NUM_ACTUATORS 16 00456 00458 #define PLAYER_ACTARRAY_ACTSTATE_IDLE 1 00459 00460 #define PLAYER_ACTARRAY_ACTSTATE_MOVING 2 00461 00462 #define PLAYER_ACTARRAY_ACTSTATE_BRAKED 3 00463 00464 #define PLAYER_ACTARRAY_ACTSTATE_STALLED 4 00465 00467 #define PLAYER_ACTARRAY_TYPE_LINEAR 1 00468 00469 #define PLAYER_ACTARRAY_TYPE_ROTARY 2 00470 00472 #define PLAYER_ACTARRAY_POWER_REQ 1 00473 00474 #define PLAYER_ACTARRAY_BRAKES_REQ 2 00475 00476 #define PLAYER_ACTARRAY_GET_GEOM_REQ 3 00477 00478 #define PLAYER_ACTARRAY_SPEED_REQ 4 00479 00481 #define PLAYER_ACTARRAY_POS_CMD 1 00482 00483 #define PLAYER_ACTARRAY_SPEED_CMD 2 00484 00485 #define PLAYER_ACTARRAY_HOME_CMD 3 00486 00488 #define PLAYER_ACTARRAY_DATA_STATE 1 00489 00491 typedef struct player_actarray_actuator 00492 { 00494 float position; 00496 float speed; 00498 uint8_t state; 00499 } player_actarray_actuator_t; 00500 00504 typedef struct player_actarray_data 00505 { 00507 uint32_t actuators_count; 00509 player_actarray_actuator_t actuators[PLAYER_ACTARRAY_NUM_ACTUATORS]; 00510 } player_actarray_data_t; 00511 00513 typedef struct player_actarray_actuatorgeom 00514 { 00516 uint8_t type; 00518 float min; 00520 float centre; 00522 float max; 00524 float home; 00526 float config_speed; 00528 uint8_t hasbrakes; 00529 } player_actarray_actuatorgeom_t; 00530 00535 typedef struct player_actarray_geom 00536 { 00538 uint32_t actuators_count; 00540 player_actarray_actuatorgeom_t actuators[PLAYER_ACTARRAY_NUM_ACTUATORS]; 00541 } player_actarray_geom_t; 00542 00546 typedef struct player_actarray_position_cmd 00547 { 00549 int32_t joint; 00551 float position; 00552 } player_actarray_position_cmd_t; 00553 00557 typedef struct player_actarray_speed_cmd 00558 { 00560 int32_t joint; 00562 float speed; 00563 } player_actarray_speed_cmd_t; 00564 00568 typedef struct player_actarray_home_cmd 00569 { 00571 int32_t joint; 00572 } player_actarray_home_cmd_t; 00573 00580 typedef struct player_actarray_power_config 00581 { 00583 uint8_t value; 00584 } player_actarray_power_config_t; 00585 00590 typedef struct player_actarray_brakes_config 00591 { 00593 uint8_t value; 00594 } player_actarray_brakes_config_t; 00595 00600 typedef struct player_actarray_speed_config 00601 { 00603 int32_t joint; 00605 float speed; 00606 } player_actarray_speed_config_t; 00609 // ///////////////////////////////////////////////////////////////////////////// 00623 #define PLAYER_AIO_MAX_INPUTS 8 00624 00625 #define PLAYER_AIO_MAX_OUTPUTS 8 00626 00628 #define PLAYER_AIO_CMD_STATE 1 00629 00631 #define PLAYER_AIO_DATA_STATE 1 00632 00637 typedef struct player_aio_data 00638 { 00640 uint32_t voltages_count; 00642 float voltages[PLAYER_AIO_MAX_INPUTS]; 00643 } player_aio_data_t; 00644 00648 typedef struct player_aio_cmd 00649 { 00651 uint32_t id; 00653 float voltage; 00654 } player_aio_cmd_t; 00655 00659 // ///////////////////////////////////////////////////////////////////////////// 00675 #define PLAYER_AUDIO_DATA_BUFFER_SIZE 20 00676 00677 #define PLAYER_AUDIO_COMMAND_BUFFER_SIZE (3*sizeof(short)) 00678 00679 #define PLAYER_AUDIO_PAIRS 5 00680 00687 typedef struct player_audio_data 00688 { 00690 uint32_t frequency_count; 00692 float frequency[PLAYER_AUDIO_PAIRS]; 00694 uint32_t amplitude_count; 00696 float amplitude[PLAYER_AUDIO_PAIRS]; 00697 } player_audio_data_t; 00698 00704 typedef struct player_audio_cmd 00705 { 00707 float frequency; 00709 float amplitude; 00711 float duration; 00712 } player_audio_cmd_t; 00713 00716 // ///////////////////////////////////////////////////////////////////////////// 00730 #define PLAYER_AUDIODSP_MAX_FREQS 8 00731 00732 #define PLAYER_AUDIODSP_MAX_BITSTRING_LEN 64 00733 00735 #define PLAYER_AUDIODSP_SET_CONFIG 1 00736 00737 #define PLAYER_AUDIODSP_GET_CONFIG 2 00738 00740 #define PLAYER_AUDIODSP_PLAY_TONE 1 00741 00742 #define PLAYER_AUDIODSP_PLAY_CHIRP 2 00743 00744 #define PLAYER_AUDIODSP_REPLAY 3 00745 00747 #define PLAYER_AUDIODSP_DATA_TONES 1 00748 00755 typedef struct player_audiodsp_data 00756 { 00758 uint32_t frequency_count; 00760 float frequency[PLAYER_AUDIODSP_MAX_FREQS]; 00762 uint32_t amplitude_count; 00764 float amplitude[PLAYER_AUDIODSP_MAX_FREQS]; 00765 00766 } player_audiodsp_data_t; 00767 00776 typedef struct player_audiodsp_cmd 00777 { 00779 float frequency; 00781 float amplitude; 00783 float duration; 00785 uint32_t bit_string_count; 00787 uint8_t bit_string[PLAYER_AUDIODSP_MAX_BITSTRING_LEN]; 00788 } player_audiodsp_cmd_t; 00789 00803 typedef struct player_audiodsp_config 00804 { 00806 int32_t format; 00808 float frequency; 00810 uint32_t channels; 00811 } player_audiodsp_config_t; 00814 // ///////////////////////////////////////////////////////////////////////////// 00828 #define PLAYER_AUDIOMIXER_SET_MASTER 1 00829 00830 #define PLAYER_AUDIOMIXER_SET_PCM 2 00831 00832 #define PLAYER_AUDIOMIXER_SET_LINE 3 00833 00834 #define PLAYER_AUDIOMIXER_SET_MIC 4 00835 00836 #define PLAYER_AUDIOMIXER_SET_IGAIN 5 00837 00838 #define PLAYER_AUDIOMIXER_SET_OGAIN 6 00839 00841 #define PLAYER_AUDIOMIXER_GET_LEVELS 1 00842 00853 typedef struct player_audiomixer_cmd 00854 { 00856 uint32_t left; 00858 uint32_t right; 00859 00860 } player_audiomixer_cmd_t; 00861 00867 typedef struct player_audiomixer_config 00868 { 00870 uint32_t master_left; 00872 uint32_t master_right; 00874 uint32_t pcm_left; 00876 uint32_t pcm_right; 00878 uint32_t line_left; 00880 uint32_t line_right; 00882 uint32_t mic_left; 00884 uint32_t mic_right; 00886 uint32_t i_gain; 00888 uint32_t o_gain; 00889 } player_audiomixer_config_t; 00890 00893 // ///////////////////////////////////////////////////////////////////////////// 00908 #define PLAYER_BLINKENLIGHT_DATA_STATE 1 00909 00911 #define PLAYER_BLINKENLIGHT_CMD_STATE 1 00912 00913 #define PLAYER_BLINKENLIGHT_CMD_POWER 2 00914 00915 #define PLAYER_BLINKENLIGHT_CMD_COLOR 3 00916 00917 #define PLAYER_BLINKENLIGHT_CMD_PERIOD 4 00918 00919 #define PLAYER_BLINKENLIGHT_CMD_DUTYCYCLE 5 00920 00924 typedef struct player_blinkenlight_data 00925 { 00927 uint8_t enable; 00929 float period; 00931 float dutycycle; 00933 player_color_t color; 00934 } player_blinkenlight_data_t; 00935 00939 typedef struct player_blinkenlight_cmd 00940 { 00942 uint8_t enable; 00944 float period; 00946 float dutycycle; 00948 player_color_t color; 00949 } player_blinkenlight_cmd_t; 00950 00954 typedef struct player_blinkenlight_cmd_power 00955 { 00957 uint8_t enable; 00958 } player_blinkenlight_cmd_power_t; 00959 00963 typedef struct player_blinkenlight_cmd_color 00964 { 00966 player_color_t color; 00967 } player_blinkenlight_cmd_color_t; 00968 00972 typedef struct player_blinkenlight_cmd_period 00973 { 00975 float period; 00976 } player_blinkenlight_cmd_period_t; 00977 00982 typedef struct player_blinkenlight_cmd_dutycycle 00983 { 00985 float dutycycle; 00986 } player_blinkenlight_cmd_dutycycle_t; 00987 00990 // ///////////////////////////////////////////////////////////////////////////// 01005 #define PLAYER_BLOBFINDER_MAX_BLOBS 256 01006 01008 #define PLAYER_BLOBFINDER_DATA_BLOBS 1 01009 01011 #define PLAYER_BLOBFINDER_REQ_SET_COLOR 1 01012 01013 #define PLAYER_BLOBFINDER_REQ_SET_IMAGER_PARAMS 2 01014 01015 //#define PLAYER_BLOBFINDER_DATA_BLOBS 1 01016 01017 01019 typedef struct player_blobfinder_blob 01020 { 01022 uint32_t id; 01025 uint32_t color; 01027 uint32_t area; 01029 uint32_t x; 01031 uint32_t y; 01033 uint32_t left; 01035 uint32_t right; 01037 uint32_t top; 01039 uint32_t bottom; 01041 float range; 01042 } player_blobfinder_blob_t; 01043 01047 typedef struct player_blobfinder_data 01048 { 01050 uint32_t width; 01052 uint32_t height; 01054 uint32_t blobs_count; 01056 player_blobfinder_blob_t blobs[PLAYER_BLOBFINDER_MAX_BLOBS]; 01057 } player_blobfinder_data_t; 01058 01059 01069 typedef struct player_blobfinder_color_config 01070 { 01072 uint32_t rmin; 01074 uint32_t rmax; 01076 uint32_t gmin; 01078 uint32_t gmax; 01080 uint32_t bmin; 01082 uint32_t bmax; 01083 } player_blobfinder_color_config_t; 01084 01085 01100 typedef struct player_blobfinder_imager_config 01101 { 01103 int32_t brightness; 01105 int32_t contrast; 01110 int32_t colormode; 01112 int32_t autogain; 01113 } player_blobfinder_imager_config_t; 01114 01117 // ///////////////////////////////////////////////////////////////////////////// 01131 #define PLAYER_BUMPER_MAX_SAMPLES 32 01132 01134 #define PLAYER_BUMPER_GET_GEOM 1 01135 01137 #define PLAYER_BUMPER_DATA_STATE 1 01138 01139 #define PLAYER_BUMPER_DATA_GEOM 2 01140 01144 typedef struct player_bumper_data 01145 { 01147 uint32_t bumpers_count; 01149 uint8_t bumpers[PLAYER_BUMPER_MAX_SAMPLES]; 01150 } player_bumper_data_t; 01151 01153 typedef struct player_bumper_define 01154 { 01156 player_pose_t pose; 01158 float length; 01160 float radius; 01161 } player_bumper_define_t; 01162 01170 typedef struct player_bumper_geom 01171 { 01173 uint32_t bumper_def_count; 01175 player_bumper_define_t bumper_def[PLAYER_BUMPER_MAX_SAMPLES]; 01176 } player_bumper_geom_t; 01177 01180 // ///////////////////////////////////////////////////////////////////////////// 01196 #define PLAYER_CAMERA_DATA_STATE 1 01197 01199 #define PLAYER_CAMERA_IMAGE_WIDTH 1920 01200 01201 #define PLAYER_CAMERA_IMAGE_HEIGHT 1080 01202 01203 #define PLAYER_CAMERA_IMAGE_SIZE (PLAYER_CAMERA_IMAGE_WIDTH * PLAYER_CAMERA_IMAGE_HEIGHT * 4) 01204 01206 #define PLAYER_CAMERA_FORMAT_MONO8 1 01207 01208 #define PLAYER_CAMERA_FORMAT_MONO16 2 01209 01210 #define PLAYER_CAMERA_FORMAT_RGB565 4 01211 01212 #define PLAYER_CAMERA_FORMAT_RGB888 5 01213 01215 #define PLAYER_CAMERA_COMPRESS_RAW 0 01216 01217 #define PLAYER_CAMERA_COMPRESS_JPEG 1 01218 01220 typedef struct player_camera_data 01221 { 01223 uint32_t width; 01225 uint32_t height; 01227 uint32_t bpp; 01229 uint32_t format; 01233 uint32_t fdiv; 01236 uint32_t compression; 01238 uint32_t image_count; 01242 uint8_t image[PLAYER_CAMERA_IMAGE_SIZE]; 01243 } player_camera_data_t; 01244 01247 // ///////////////////////////////////////////////////////////////////////////// 01259 #define PLAYER_DIO_DATA_VALUES 1 01260 01262 #define PLAYER_DIO_CMD_VALUES 1 01263 01268 typedef struct player_dio_data 01269 { 01271 uint32_t count; 01273 uint32_t digin; 01274 } player_dio_data_t; 01275 01276 01281 typedef struct player_dio_cmd 01282 { 01284 uint32_t count; 01286 uint32_t digout; 01287 } player_dio_cmd_t; 01288 01291 /* REMOVE ENERGY DEVICE - USE POWER INSTEAD - RTV 2005.12.04 */ 01292 01293 // ///////////////////////////////////////////////////////////////////////////// 01311 #define PLAYER_ENERGY_DATA_STATE 1 01312 01314 #define PLAYER_ENERGY_SET_CHARGING_POLICY_REQ 1 01315 01321 typedef struct player_energy_data 01322 { 01324 float joules; 01327 float watts; 01332 int32_t charging; 01333 } player_energy_data_t; 01334 01339 typedef struct player_energy_chargepolicy_config 01340 { 01343 uint8_t enable_input; 01346 uint8_t enable_output; 01347 } player_energy_chargepolicy_config_t; 01348 01351 // ///////////////////////////////////////////////////////////////////////////// 01365 #define PLAYER_FIDUCIAL_MAX_SAMPLES 32 01366 01368 #define PLAYER_FIDUCIAL_DATA_SCAN 1 01369 01371 #define PLAYER_FIDUCIAL_REQ_GET_GEOM 1 01372 01373 #define PLAYER_FIDUCIAL_REQ_GET_FOV 2 01374 01375 #define PLAYER_FIDUCIAL_REQ_SET_FOV 3 01376 01377 #define PLAYER_FIDUCIAL_REQ_GET_ID 7 01378 01379 #define PLAYER_FIDUCIAL_REQ_SET_ID 8 01380 01385 typedef struct player_fiducial_item 01386 { 01389 int32_t id; 01391 player_pose3d_t pose; 01393 player_pose3d_t upose; 01394 } player_fiducial_item_t; 01395 01396 01400 typedef struct player_fiducial_data 01401 { 01403 uint32_t fiducials_count; 01405 player_fiducial_item_t fiducials[PLAYER_FIDUCIAL_MAX_SAMPLES]; 01406 01407 } player_fiducial_data_t; 01408 01414 typedef struct player_fiducial_geom 01415 { 01417 player_pose_t pose; 01419 player_bbox_t size; 01421 player_bbox_t fiducial_size; 01422 } player_fiducial_geom_t; 01423 01430 typedef struct player_fiducial_fov 01431 { 01433 float min_range; 01435 float max_range; 01437 float view_angle; 01438 } player_fiducial_fov_t; 01439 01455 typedef struct player_fiducial_id 01456 { 01458 uint32_t id; 01459 } player_fiducial_id_t; 01460 01463 // ///////////////////////////////////////////////////////////////////////////// 01476 #define PLAYER_GPS_DATA_STATE 1 01477 01484 typedef struct player_gps_data 01485 { 01487 uint32_t time_sec; 01489 uint32_t time_usec; 01493 int32_t latitude; 01497 int32_t longitude; 01500 int32_t altitude; 01502 double utm_e; 01504 double utm_n; 01506 uint32_t quality; 01508 uint32_t num_sats; 01510 uint32_t hdop; 01512 uint32_t vdop; 01514 double err_horz; 01516 double err_vert; 01517 } player_gps_data_t; 01518 01521 01522 01536 #define PLAYER_GRAPHICS2D_MAX_POINTS 64 01537 01539 #define PLAYER_GRAPHICS2D_CMD_CLEAR 1 01540 01541 #define PLAYER_GRAPHICS2D_CMD_POINTS 2 01542 01543 #define PLAYER_GRAPHICS2D_CMD_POLYLINE 3 01544 01545 #define PLAYER_GRAPHICS2D_CMD_POLYGON 4 01546 01554 typedef struct player_graphics2d_cmd_points 01555 { 01557 uint16_t count; 01559 player_point_2d_t points[PLAYER_GRAPHICS2D_MAX_POINTS]; 01561 player_color_t color; 01562 } player_graphics2d_cmd_points_t; 01563 01567 typedef struct player_graphics2d_cmd_polyline 01568 { 01570 uint16_t count; 01572 player_point_2d_t points[PLAYER_GRAPHICS2D_MAX_POINTS]; 01574 player_color_t color; 01575 } player_graphics2d_cmd_polyline_t; 01576 01580 typedef struct player_graphics2d_cmd_polygon 01581 { 01583 uint16_t count; 01585 player_point_2d_t points[PLAYER_GRAPHICS2D_MAX_POINTS]; 01587 player_color_t color; 01589 player_color_t fill_color; 01591 uint8_t filled; 01592 } player_graphics2d_cmd_polygon_t; 01593 01596 01597 01615 #define PLAYER_GRAPHICS3D_MAX_POINTS 64 01616 01618 #define PLAYER_GRAPHICS3D_CMD_CLEAR 1 01619 01620 #define PLAYER_GRAPHICS3D_CMD_DRAW 2 01621 01622 01624 typedef enum player_graphics3d_draw_mode 01625 { 01626 PLAYER_DRAW_POINTS, 01627 PLAYER_DRAW_LINES, 01628 PLAYER_DRAW_LINE_STRIP, 01629 PLAYER_DRAW_LINE_LOOP, 01630 PLAYER_DRAW_TRIANGLES, 01631 PLAYER_DRAW_TRIANGLE_STRIP, 01632 PLAYER_DRAW_TRIANGLE_FAN, 01633 PLAYER_DRAW_QUADS, 01634 PLAYER_DRAW_QUAD_STRIP, 01635 PLAYER_DRAW_POLYGON 01636 } player_graphics3d_draw_mode_t; 01637 01638 01646 typedef struct player_graphics3d_cmd_draw 01647 { 01649 uint32_t draw_mode; 01651 uint32_t points_count; 01653 player_point_3d_t points[PLAYER_GRAPHICS3D_MAX_POINTS]; 01655 player_color_t color; 01656 01657 } player_graphics3d_cmd_draw_t; 01658 01659 01662 // ///////////////////////////////////////////////////////////////////////////// 01676 #define PLAYER_GRIPPER_DATA_STATE 1 01677 01679 #define PLAYER_GRIPPER_CMD_STATE 1 01680 01682 #define PLAYER_GRIPPER_REQ_GET_GEOM 1 01683 01685 #define GRIPopen 1 01686 01687 #define GRIPclose 2 01688 01689 #define GRIPstop 3 01690 01691 #define LIFTup 4 01692 01693 #define LIFTdown 5 01694 01695 #define LIFTstop 6 01696 01697 #define GRIPstore 7 01698 01699 #define GRIPdeploy 8 01700 01701 #define GRIPhalt 15 01702 01703 #define GRIPpress 16 01704 01705 #define LIFTcarry 17 01706 01735 typedef struct player_gripper_data 01736 { 01738 uint32_t state; 01740 uint32_t beams; 01741 } player_gripper_data_t; 01742 01750 typedef struct player_gripper_cmd 01751 { 01753 uint32_t cmd; 01755 uint32_t arg; 01756 } player_gripper_cmd_t; 01757 01758 01764 typedef struct player_gripper_geom 01765 { 01767 player_pose_t pose; 01769 player_bbox_t size; 01770 } player_gripper_geom_t; 01771 01774 // ///////////////////////////////////////////////////////////////////////////// 01787 #define PLAYER_IR_MAX_SAMPLES 32 01788 01790 #define PLAYER_IR_POSE 1 01791 01792 #define PLAYER_IR_POWER 2 01793 01795 #define PLAYER_IR_DATA_RANGES 1 01796 01800 typedef struct player_ir_data 01801 { 01803 uint32_t voltages_count; 01805 float voltages[PLAYER_IR_MAX_SAMPLES]; 01807 uint32_t ranges_count; 01809 float ranges[PLAYER_IR_MAX_SAMPLES]; 01810 } player_ir_data_t; 01811 01815 typedef struct player_ir_pose 01816 { 01818 uint32_t poses_count; 01820 player_pose_t poses[PLAYER_IR_MAX_SAMPLES]; 01821 } player_ir_pose_t; 01822 01827 typedef struct player_ir_power_req 01828 { 01830 uint8_t state; 01831 } player_ir_power_req_t; 01834 // ///////////////////////////////////////////////////////////////////////////// 01848 #define PLAYER_JOYSTICK_DATA_STATE 1 01849 01854 typedef struct player_joystick_data 01855 { 01857 int32_t xpos; 01859 int32_t ypos; 01861 int32_t xscale; 01863 int32_t yscale; 01865 uint32_t buttons; 01866 } player_joystick_data_t; 01867 01870 // ///////////////////////////////////////////////////////////////////////////// 01895 #define PLAYER_LASER_MAX_SAMPLES 1024 01896 01898 #define PLAYER_LASER_DATA_SCAN 1 01899 01900 #define PLAYER_LASER_DATA_SCANPOSE 2 01901 01903 #define PLAYER_LASER_REQ_GET_GEOM 1 01904 01905 #define PLAYER_LASER_REQ_SET_CONFIG 2 01906 01907 #define PLAYER_LASER_REQ_GET_CONFIG 3 01908 01909 #define PLAYER_LASER_REQ_POWER 4 01910 01914 typedef struct player_laser_data 01915 { 01917 float min_angle; 01919 float max_angle; 01921 float resolution; 01923 float max_range; 01925 uint32_t ranges_count; 01927 float ranges[PLAYER_LASER_MAX_SAMPLES]; 01929 uint32_t intensity_count; 01931 uint8_t intensity[PLAYER_LASER_MAX_SAMPLES]; 01933 uint32_t id; 01934 } player_laser_data_t; 01935 01940 typedef struct player_laser_data_scanpose 01941 { 01943 player_laser_data_t scan; 01945 player_pose_t pose; 01946 } player_laser_data_scanpose_t; 01947 01952 typedef struct player_laser_geom 01953 { 01955 player_pose_t pose; 01957 player_bbox_t size; 01958 } player_laser_geom_t; 01959 01968 typedef struct player_laser_config 01969 { 01971 float min_angle; 01973 float max_angle; 01975 float resolution; 01977 float max_range; 01979 float range_res; 01981 uint8_t intensity; 01982 } player_laser_config_t; 01983 01988 typedef struct player_laser_power_config 01989 { 01991 uint8_t state; 01992 } player_laser_power_config_t; 01993 01996 // ///////////////////////////////////////////////////////////////////////////// 02010 #define PLAYER_LIMB_STATE_IDLE 1 02011 02012 #define PLAYER_LIMB_STATE_BRAKED 2 02013 02014 #define PLAYER_LIMB_STATE_MOVING 3 02015 02016 #define PLAYER_LIMB_STATE_OOR 4 02017 02018 #define PLAYER_LIMB_STATE_COLL 5 02019 02021 #define PLAYER_LIMB_DATA 1 02022 02024 #define PLAYER_LIMB_HOME_CMD 1 02025 02026 #define PLAYER_LIMB_STOP_CMD 2 02027 02028 #define PLAYER_LIMB_SETPOSE_CMD 3 02029 02030 #define PLAYER_LIMB_SETPOSITION_CMD 4 02031 02032 #define PLAYER_LIMB_VECMOVE_CMD 5 02033 02035 #define PLAYER_LIMB_POWER_REQ 1 02036 02037 #define PLAYER_LIMB_BRAKES_REQ 2 02038 02039 #define PLAYER_LIMB_GEOM_REQ 3 02040 02041 #define PLAYER_LIMB_SPEED_REQ 4 02042 02046 typedef struct player_limb_data 02047 { 02049 player_point_3d_t position; 02051 player_point_3d_t approach; 02055 player_point_3d_t orientation; 02057 uint8_t state; 02058 } player_limb_data_t; 02059 02063 typedef struct player_limb_home_cmd 02064 { 02065 } player_limb_home_cmd_t; 02066 02070 typedef struct player_limb_stop_cmd 02071 { 02072 } player_limb_stop_cmd_t; 02073 02078 typedef struct player_limb_setpose_cmd 02079 { 02081 player_point_3d_t position; 02083 player_point_3d_t approach; 02085 player_point_3d_t orientation; 02086 } player_limb_setpose_cmd_t; 02087 02092 typedef struct player_limb_setposition_cmd 02093 { 02095 player_point_3d_t position; 02096 } player_limb_setposition_cmd_t; 02097 02102 typedef struct player_limb_vecmove_cmd 02103 { 02105 player_point_3d_t direction; 02107 float length; 02108 } player_limb_vecmove_cmd_t; 02109 02115 typedef struct player_limb_power_req 02116 { 02118 uint8_t value; 02119 } player_limb_power_req_t; 02120 02125 typedef struct player_limb_brakes_req 02126 { 02128 uint8_t value; 02129 } player_limb_brakes_req_t; 02130 02134 typedef struct player_limb_geom_req 02135 { 02137 player_point_3d_t basePos; 02138 } player_limb_geom_req_t; 02139 02144 typedef struct player_limb_speed_req 02145 { 02147 float speed; 02148 } player_limb_speed_req_t; 02149 02152 // ///////////////////////////////////////////////////////////////////////////// 02170 #define PLAYER_LOCALIZE_MAX_HYPOTHS 10 02171 02173 #define PLAYER_LOCALIZE_PARTICLES_MAX 100 02174 02176 #define PLAYER_LOCALIZE_DATA_HYPOTHS 1 02177 02179 #define PLAYER_LOCALIZE_REQ_SET_POSE 1 02180 02181 #define PLAYER_LOCALIZE_REQ_GET_PARTICLES 2 02182 02188 typedef struct player_localize_hypoth 02189 { 02191 player_pose_t mean; 02193 double cov[3]; 02195 double alpha; 02196 } player_localize_hypoth_t; 02197 02202 typedef struct player_localize_data 02203 { 02205 uint32_t pending_count; 02207 double pending_time; 02209 uint32_t hypoths_count; 02211 player_localize_hypoth_t hypoths[PLAYER_LOCALIZE_MAX_HYPOTHS]; 02212 } player_localize_data_t; 02213 02218 typedef struct player_localize_set_pose 02219 { 02221 player_pose_t mean; 02224 double cov[3]; 02225 } player_localize_set_pose_t; 02226 02228 typedef struct player_localize_particle 02229 { 02231 player_pose_t pose; 02233 double alpha; 02234 } player_localize_particle_t; 02235 02241 typedef struct player_localize_get_particles 02242 { 02244 player_pose_t mean; 02246 double variance; 02248 uint32_t particles_count; 02250 player_localize_particle_t particles[PLAYER_LOCALIZE_PARTICLES_MAX]; 02251 } player_localize_get_particles_t; 02252 02255 // ///////////////////////////////////////////////////////////////////////////// 02270 #define PLAYER_LOG_TYPE_READ 1 02271 02272 #define PLAYER_LOG_TYPE_WRITE 2 02273 02275 #define PLAYER_LOG_REQ_SET_WRITE_STATE 1 02276 02277 #define PLAYER_LOG_REQ_SET_READ_STATE 2 02278 02279 #define PLAYER_LOG_REQ_GET_STATE 3 02280 02281 #define PLAYER_LOG_REQ_SET_READ_REWIND 4 02282 02283 #define PLAYER_LOG_REQ_SET_FILENAME 5 02284 02289 typedef struct player_log_set_write_state 02290 { 02292 uint8_t state; 02293 } player_log_set_write_state_t; 02294 02299 typedef struct player_log_set_read_state 02300 { 02302 uint8_t state; 02303 } player_log_set_read_state_t; 02304 02310 typedef struct player_log_set_read_rewind 02311 { 02312 } player_log_set_read_rewind_t; 02313 02318 typedef struct player_log_get_state 02319 { 02322 uint8_t type; 02324 uint8_t state; 02325 } player_log_get_state_t; 02326 02331 typedef struct player_log_set_filename 02332 { 02334 uint32_t filename_count; 02336 char filename[256]; 02337 } player_log_set_filename_t; 02338 02341 // ///////////////////////////////////////////////////////////////////////////// 02360 #define PLAYER_MAP_MAX_TILE_SIZE (((int)((PLAYER_MAX_PAYLOAD_SIZE-12)/1.001)) - 20 - 1) 02361 02366 #define PLAYER_MAP_MAX_SEGMENTS 131068 02367 02369 #define PLAYER_MAP_DATA_INFO 1 02370 02372 #define PLAYER_MAP_REQ_GET_INFO 1 02373 02374 #define PLAYER_MAP_REQ_GET_DATA 2 02375 02376 #define PLAYER_MAP_REQ_GET_VECTOR 3 02377 02384 typedef struct player_map_info 02385 { 02387 float scale; 02389 uint32_t width; 02391 uint32_t height; 02394 player_pose_t origin; 02395 } player_map_info_t; 02396 02405 typedef struct player_map_data 02406 { 02408 uint32_t col; 02410 uint32_t row; 02412 uint32_t width; 02414 uint32_t height; 02416 uint32_t data_count; 02418 int8_t data[PLAYER_MAP_MAX_TILE_SIZE]; 02419 } player_map_data_t; 02420 02425 typedef struct player_map_data_vector 02426 { 02428 float minx; 02430 float maxx; 02432 float miny; 02434 float maxy; 02436 uint32_t segments_count; 02438 player_segment_t segments[PLAYER_MAP_MAX_SEGMENTS]; 02439 } player_map_data_vector_t; 02442 // ///////////////////////////////////////////////////////////////////////////// 02462 #define MCOM_DATA_LEN 128 02463 02464 #define MCOM_N_BUFS 10 02465 02466 #define MCOM_CHANNEL_LEN 8 02467 02468 #define MCOM_EMPTY_STRING "(EMPTY)" 02469 02470 #define PLAYER_MCOM_PUSH 0 02471 02472 #define PLAYER_MCOM_POP 1 02473 02474 #define PLAYER_MCOM_READ 2 02475 02476 #define PLAYER_MCOM_CLEAR 3 02477 02478 #define PLAYER_MCOM_SET_CAPACITY 4 02479 02480 #define MCOM_COMMAND_BUFFER_SIZE (sizeof(player_mcom_config_t)) 02481 02483 typedef struct player_mcom_data 02484 { 02486 char full; 02488 uint32_t data_count; 02490 char data[MCOM_DATA_LEN]; 02491 } player_mcom_data_t; 02492 02494 typedef struct player_mcom_config 02495 { 02497 uint32_t command; 02499 uint32_t type; 02501 uint32_t channel_count; 02503 char channel[MCOM_CHANNEL_LEN]; 02505 player_mcom_data_t data; 02506 } player_mcom_config_t; 02507 02509 typedef struct player_mcom_return 02510 { 02512 uint32_t type; 02514 uint32_t channel_count; 02516 char channel[MCOM_CHANNEL_LEN]; 02518 player_mcom_data_t data; 02519 } player_mcom_return_t; 02520 02523 // ///////////////////////////////////////////////////////////////////////////// 02536 #define PLAYER_OPAQUE_DATA_STATE 1 02537 02539 #define PLAYER_OPAQUE_CMD 2 02540 02542 #define PLAYER_OPAQUE_REQ 3 02543 02545 #define PLAYER_OPAQUE_MAX_SIZE 1048576 02546 02548 typedef struct player_opaque_data 02549 { 02551 uint32_t data_count; 02553 uint8_t data[PLAYER_OPAQUE_MAX_SIZE]; 02554 } player_opaque_data_t; 02555 02558 // ///////////////////////////////////////////////////////////////////////////// 02570 #define PLAYER_PLANNER_MAX_WAYPOINTS 128 02571 02573 #define PLAYER_PLANNER_DATA_STATE 1 02574 02576 #define PLAYER_PLANNER_CMD_GOAL 1 02577 02579 #define PLAYER_PLANNER_REQ_GET_WAYPOINTS 1 02580 02581 #define PLAYER_PLANNER_REQ_ENABLE 2 02582 02587 typedef struct player_planner_data 02588 { 02590 uint8_t valid; 02592 uint8_t done; 02594 player_pose_t pos; 02596 player_pose_t goal; 02598 player_pose_t waypoint; 02602 int32_t waypoint_idx; 02604 uint32_t waypoints_count; 02605 } player_planner_data_t; 02606 02610 typedef struct player_planner_cmd 02611 { 02613 player_pose_t goal; 02614 } player_planner_cmd_t; 02615 02621 typedef struct player_planner_waypoints_req 02622 { 02624 uint32_t waypoints_count; 02626 player_pose_t waypoints[PLAYER_PLANNER_MAX_WAYPOINTS]; 02627 } player_planner_waypoints_req_t; 02628 02634 typedef struct player_planner_enable_req 02635 { 02637 uint8_t state; 02638 } player_planner_enable_req_t; 02639 02642 // ///////////////////////////////////////////////////////////////////////////// 02658 #define PLAYER_OPEN_MODE 1 02659 02660 #define PLAYER_CLOSE_MODE 2 02661 02662 #define PLAYER_ERROR_MODE 3 02663 02664 02667 #define PLAYER_DATAMODE_PUSH 1 02668 02672 #define PLAYER_DATAMODE_PULL 2 02673 02675 #define PLAYER_PLAYER_REQ_DEVLIST 1 02676 02677 #define PLAYER_PLAYER_REQ_DRIVERINFO 2 02678 02679 #define PLAYER_PLAYER_REQ_DEV 3 02680 02681 #define PLAYER_PLAYER_REQ_DATA 4 02682 #define PLAYER_PLAYER_REQ_DATAMODE 5 02683 #define PLAYER_PLAYER_REQ_AUTH 7 02684 #define PLAYER_PLAYER_REQ_NAMESERVICE 8 02685 #define PLAYER_PLAYER_REQ_IDENT 9 02686 #define PLAYER_PLAYER_REQ_ADD_REPLACE_RULE 10 02687 02688 02695 typedef struct player_device_devlist 02696 { 02698 uint32_t devices_count; 02700 player_devaddr_t devices[PLAYER_MAX_DEVICES]; 02701 } player_device_devlist_t; 02702 02709 typedef struct player_device_driverinfo 02710 { 02712 player_devaddr_t addr; 02714 uint32_t driver_name_count; 02716 char driver_name[PLAYER_MAX_DRIVER_STRING_LEN]; 02717 } player_device_driverinfo_t; 02718 02736 typedef struct player_device_req 02737 { 02739 player_devaddr_t addr; 02741 uint8_t access; 02743 uint32_t driver_name_count; 02745 char driver_name[PLAYER_MAX_DRIVER_STRING_LEN]; 02746 } player_device_req_t; 02747 02754 typedef struct player_device_data_req 02755 { 02756 } player_device_data_req_t; 02757 02764 typedef struct player_device_datamode_req 02765 { 02767 uint8_t mode; 02768 02769 } player_device_datamode_req_t; 02770 02771 02803 typedef struct player_device_auth_req 02804 { 02806 uint32_t auth_key_count; 02808 uint8_t auth_key[PLAYER_KEYLEN]; 02809 02810 } player_device_auth_req_t; 02811 02812 02817 typedef struct player_device_nameservice_req 02818 { 02820 uint32_t name_count; 02822 uint8_t name[PLAYER_MAX_DRIVER_STRING_LEN]; 02824 uint16_t port; 02825 } player_device_nameservice_req_t; 02826 02837 typedef struct player_add_replace_rule_req 02838 { 02840 int32_t interf; 02842 int32_t index; 02844 int32_t type; 02846 int32_t subtype; 02848 int32_t replace ; 02849 } player_add_replace_rule_req_t; 02850 02851 02854 // ///////////////////////////////////////////////////////////////////////////// 02866 #define PLAYER_POSITION1D_REQ_GET_GEOM 1 02867 02868 #define PLAYER_POSITION1D_REQ_MOTOR_POWER 2 02869 02870 #define PLAYER_POSITION1D_REQ_VELOCITY_MODE 3 02871 02872 #define PLAYER_POSITION1D_REQ_POSITION_MODE 4 02873 02874 #define PLAYER_POSITION1D_REQ_SET_ODOM 5 02875 02876 #define PLAYER_POSITION1D_REQ_RESET_ODOM 6 02877 02878 #define PLAYER_POSITION1D_REQ_SPEED_PID 7 02879 02880 #define PLAYER_POSITION1D_REQ_POSITION_PID 8 02881 02882 #define PLAYER_POSITION1D_REQ_SPEED_PROF 9 02883 02885 #define PLAYER_POSITION1D_DATA_STATE 1 02886 02887 #define PLAYER_POSITION1D_DATA_GEOM 2 02888 02890 #define PLAYER_POSITION1D_CMD_VEL 1 02891 02892 #define PLAYER_POSITION1D_CMD_POS 2 02893 02895 #define PLAYER_POSITION1D_STATUS_LIMIT_MIN 0 02896 02897 #define PLAYER_POSITION1D_STATUS_LIMIT_CEN 1 02898 02899 #define PLAYER_POSITION1D_STATUS_LIMIT_MAX 2 02900 02901 #define PLAYER_POSITION1D_STATUS_OC 3 02902 02903 #define PLAYER_POSITION1D_STATUS_TRAJ_COMPLETE 4 02904 02905 #define PLAYER_POSITION1D_STATUS_ENABLED 5 02906 02911 typedef struct player_position1d_data 02912 { 02914 float pos; 02916 float vel; 02918 uint8_t stall; 02930 uint8_t status; 02931 02932 } player_position1d_data_t; 02933 02939 typedef struct player_position1d_cmd_vel 02940 { 02942 float vel; 02944 uint8_t state; 02945 } player_position1d_cmd_vel_t; 02946 02952 typedef struct player_position1d_cmd_pos 02953 { 02955 float pos; 02957 float vel; 02959 uint8_t state; 02960 } player_position1d_cmd_pos_t; 02961 02966 typedef struct player_position1d_geom 02967 { 02969 player_pose_t pose; 02971 player_bbox_t size; 02972 } player_position1d_geom_t; 02973 02985 typedef struct player_position1d_power_config 02986 { 02988 uint8_t state; 02989 } player_position1d_power_config_t; 02990 02999 typedef struct player_position1d_velocity_mode_config 03000 { 03002 uint32_t value; 03003 } player_position1d_velocity_mode_config_t; 03004 03009 typedef struct player_position1d_reset_odom_config 03010 { 03012 uint32_t value; 03013 } player_position1d_reset_odom_config_t; 03014 03020 typedef struct player_position1d_position_mode 03021 { 03023 uint32_t state; 03024 } player_position1d_position_mode_req_t; 03025 03031 typedef struct player_position1d_set_odom 03032 { 03034 float pos; 03035 } player_position1d_set_odom_req_t; 03036 03042 typedef struct player_position1d_speed_pid 03043 { 03045 float kp; 03047 float ki; 03049 float kd; 03050 } player_position1d_speed_pid_req_t; 03051 03057 typedef struct player_position1d_position_pid 03058 { 03060 float kp; 03062 float ki; 03064 float kd; 03065 } player_position1d_position_pid_req_t; 03066 03072 typedef struct player_position1d_speed_prof 03073 { 03075 float speed; 03077 float acc; 03078 } player_position1d_speed_prof_req_t; 03082 // ///////////////////////////////////////////////////////////////////////////// 03094 #define PLAYER_POSITION2D_REQ_GET_GEOM 1 03095 03096 #define PLAYER_POSITION2D_REQ_MOTOR_POWER 2 03097 03098 #define PLAYER_POSITION2D_REQ_VELOCITY_MODE 3 03099 03100 #define PLAYER_POSITION2D_REQ_POSITION_MODE 4 03101 03102 #define PLAYER_POSITION2D_REQ_SET_ODOM 5 03103 03104 #define PLAYER_POSITION2D_REQ_RESET_ODOM 6 03105 03106 #define PLAYER_POSITION2D_REQ_SPEED_PID 7 03107 03108 #define PLAYER_POSITION2D_REQ_POSITION_PID 8 03109 03110 #define PLAYER_POSITION2D_REQ_SPEED_PROF 9 03111 03113 #define PLAYER_POSITION2D_DATA_STATE 1 03114 03115 #define PLAYER_POSITION2D_DATA_GEOM 2 03116 03118 #define PLAYER_POSITION2D_CMD_VEL 1 03119 03120 #define PLAYER_POSITION2D_CMD_POS 2 03121 03122 #define PLAYER_POSITION2D_CMD_CAR 3 03123 03124 #define PLAYER_POSITION2D_CMD_VEL_HEAD 4 03125 03130 typedef struct player_position2d_data 03131 { 03133 player_pose_t pos; 03135 player_pose_t vel; 03137 uint8_t stall; 03138 } player_position2d_data_t; 03139 03145 typedef struct player_position2d_cmd_vel 03146 { 03148 player_pose_t vel; 03150 uint8_t state; 03151 } player_position2d_cmd_vel_t; 03152 03158 typedef struct player_position2d_cmd_pos 03159 { 03161 player_pose_t pos; 03163 player_pose_t vel; 03165 uint8_t state; 03166 } player_position2d_cmd_pos_t; 03167 03172 typedef struct player_position2d_cmd_car 03173 { 03175 double velocity; 03177 double angle; 03178 } player_position2d_cmd_car_t; 03179 03184 typedef struct player_position2d_cmd_vel_head 03185 { 03187 double velocity; 03189 double angle; 03190 } player_position2d_cmd_vel_head_t; 03191 03192 03198 typedef struct player_position2d_geom 03199 { 03201 player_pose_t pose; 03203 player_bbox_t size; 03204 } player_position2d_geom_t; 03205 03217 typedef struct player_position2d_power_config 03218 { 03220 uint8_t state; 03221 } player_position2d_power_config_t; 03222 03247 typedef struct player_position2d_velocity_mode_config 03248 { 03250 uint32_t value; 03251 } player_position2d_velocity_mode_config_t; 03252 03257 typedef struct player_position2d_reset_odom_config 03258 { 03259 } player_position2d_reset_odom_config_t; 03260 03266 typedef struct player_position2d_position_mode_req 03267 { 03269 uint32_t state; 03270 } player_position2d_position_mode_req_t; 03271 03276 typedef struct player_position2d_set_odom_req 03277 { 03279 player_pose_t pose; 03280 } player_position2d_set_odom_req_t; 03281 03287 typedef struct player_position2d_speed_pid_req 03288 { 03290 float kp; 03292 float ki; 03294 float kd; 03295 } player_position2d_speed_pid_req_t; 03296 03303 typedef struct player_position2d_position_pid_req 03304 { 03306 float kp; 03308 float ki; 03310 float kd; 03311 } player_position2d_position_pid_req_t; 03312 03317 typedef struct player_position2d_speed_prof_req 03318 { 03320 float speed; 03322 float acc; 03323 } player_position2d_speed_prof_req_t; 03326 // ///////////////////////////////////////////////////////////////////////////// 03339 #define PLAYER_POSITION3D_DATA_STATE 1 03340 03341 #define PLAYER_POSITION3D_DATA_GEOMETRY 2 03342 03344 #define PLAYER_POSITION3D_CMD_SET_VEL 1 03345 03346 #define PLAYER_POSITION3D_CMD_SET_POS 2 03347 03349 #define PLAYER_POSITION3D_GET_GEOM 1 03350 03351 #define PLAYER_POSITION3D_MOTOR_POWER 2 03352 03353 #define PLAYER_POSITION3D_VELOCITY_MODE 3 03354 03355 #define PLAYER_POSITION3D_POSITION_MODE 4 03356 03357 #define PLAYER_POSITION3D_RESET_ODOM 5 03358 03359 #define PLAYER_POSITION3D_SET_ODOM 6 03360 03361 #define PLAYER_POSITION3D_SPEED_PID 7 03362 03363 #define PLAYER_POSITION3D_POSITION_PID 8 03364 03365 #define PLAYER_POSITION3D_SPEED_PROF 9 03366 03371 typedef struct player_position3d_data 03372 { 03374 player_pose3d_t pos; 03376 player_pose3d_t vel; 03378 uint8_t stall; 03379 } player_position3d_data_t; 03380 03385 typedef struct player_position3d_cmd_pos 03386 { 03388 player_pose3d_t pos; 03390 player_pose3d_t vel; 03392 uint8_t state; 03393 } player_position3d_cmd_pos_t; 03394 03399 typedef struct player_position3d_cmd_vel 03400 { 03402 player_pose3d_t vel; 03404 uint8_t state; 03405 } player_position3d_cmd_vel_t; 03406 03410 typedef struct player_position3d_geom 03411 { 03413 player_pose3d_t pose; 03415 player_bbox3d_t size; 03416 } player_position3d_geom_t; 03417 03428 typedef struct player_position3d_power_config 03429 { 03431 uint8_t state; 03432 } player_position3d_power_config_t; 03433 03439 typedef struct player_position3d_position_mode_req 03440 { 03442 uint32_t value; 03443 } player_position3d_position_mode_req_t; 03444 03452 typedef struct player_position3d_velocity_mode_config 03453 { 03455 uint32_t value; 03456 } player_position3d_velocity_mode_config_t; 03457 03462 typedef struct player_position3d_set_odom_req 03463 { 03465 player_pose3d_t pos; 03466 } player_position3d_set_odom_req_t; 03467 03472 typedef struct player_position3d_reset_odom_config 03473 { 03474 } player_position3d_reset_odom_config_t; 03475 03480 typedef struct player_position3d_speed_pid_req 03481 { 03483 float kp; 03485 float ki; 03487 float kd; 03488 } player_position3d_speed_pid_req_t; 03489 03494 typedef struct player_position3d_position_pid_req 03495 { 03497 float kp; 03499 float ki; 03501 float kd; 03502 } player_position3d_position_pid_req_t; 03503 03508 typedef struct player_position3d_speed_prof_req 03509 { 03511 float speed; 03513 float acc; 03514 } player_position3d_speed_prof_req_t; 03515 03518 // ///////////////////////////////////////////////////////////////////////////// 03532 #define PLAYER_POWER_DATA_STATE 1 03533 03535 #define PLAYER_POWER_SET_CHARGING_POLICY_REQ 1 03536 03538 #define PLAYER_POWER_MASK_VOLTS 1 03539 #define PLAYER_POWER_MASK_WATTS 2 03540 #define PLAYER_POWER_MASK_JOULES 4 03541 #define PLAYER_POWER_MASK_PERCENT 8 03542 #define PLAYER_POWER_MASK_CHARGING 16 03543 03547 typedef struct player_power_data 03548 { 03552 uint32_t valid; 03553 03555 float volts; 03557 float percent; 03559 float joules; 03562 float watts; 03567 int32_t charging; 03568 03569 } player_power_data_t; 03570 03571 03576 typedef struct player_power_chargepolicy_config 03577 { 03580 uint8_t enable_input; 03583 uint8_t enable_output; 03584 } player_power_chargepolicy_config_t; 03585 03588 // ///////////////////////////////////////////////////////////////////////////// 03601 #define PLAYER_PTZ_MAX_CONFIG_LEN 32 03602 03604 #define PLAYER_PTZ_VELOCITY_CONTROL 0 03605 03606 #define PLAYER_PTZ_POSITION_CONTROL 1 03607 03609 #define PLAYER_PTZ_REQ_GENERIC 1 03610 03611 #define PLAYER_PTZ_REQ_CONTROL_MODE 2 03612 03613 #define PLAYER_PTZ_REQ_AUTOSERVO 3 03614 03615 #define PLAYER_PTZ_REQ_GEOM 4 03616 03618 #define PLAYER_PTZ_DATA_STATE 1 03619 03620 #define PLAYER_PTZ_DATA_GEOM 2 03621 03623 #define PLAYER_PTZ_CMD_STATE 1 03624 03629 typedef struct player_ptz_data 03630 { 03632 float pan; 03634 float tilt; 03636 float zoom; 03638 float panspeed; 03640 float tiltspeed; 03641 } player_ptz_data_t; 03642 03647 typedef struct player_ptz_cmd 03648 { 03650 float pan; 03652 float tilt; 03654 float zoom; 03656 float panspeed; 03658 float tiltspeed; 03659 } player_ptz_cmd_t; 03660 03664 typedef struct player_ptz_geom 03665 { 03667 player_pose3d_t pos; 03669 player_bbox3d_t size; 03670 } player_ptz_geom_t; 03671 03678 typedef struct player_ptz_req_generic 03679 { 03681 uint32_t config_count; 03683 uint32_t config[PLAYER_PTZ_MAX_CONFIG_LEN]; 03684 } player_ptz_req_generic_t; 03685 03692 typedef struct player_ptz_req_control_mode 03693 { 03696 uint32_t mode; 03697 } player_ptz_req_control_mode_t; 03698 03701 // ///////////////////////////////////////////////////////////////////////////// 03724 #define PLAYER_SIMULATION_IDENTIFIER_MAXLEN 64 03725 03727 #define PLAYER_SIMULATION_REQ_SET_POSE2D 1 03728 03729 #define PLAYER_SIMULATION_REQ_GET_POSE2D 2 03730 03731 #define PLAYER_SIMULATION_REQ_SET_PROPERTY_INT 3 03732 03733 #define PLAYER_SIMULATION_REQ_GET_PROPERTY_INT 4 03734 03735 #define PLAYER_SIMULATION_REQ_SET_PROPERTY_FLOAT 5 03736 03737 #define PLAYER_SIMULATION_REQ_GET_PROPERTY_FLOAT 6 03738 03739 #define PLAYER_SIMULATION_REQ_SET_PROPERTY_STRING 7 03740 03741 #define PLAYER_SIMULATION_REQ_GET_PROPERTY_STRING 8 03742 03747 typedef struct player_simulation_data 03748 { 03750 uint8_t data; 03751 } player_simulation_data_t; 03752 03757 typedef struct player_simulation_cmd 03758 { 03760 uint8_t cmd; 03761 } player_simulation_cmd_t; 03762 03769 typedef struct player_simulation_pose2d_req 03770 { 03772 uint32_t name_count; 03774 char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03776 player_pose_t pose; 03777 } player_simulation_pose2d_req_t; 03778 03787 typedef struct player_simulation_property_int_req 03788 { 03790 uint32_t name_count; 03792 char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03794 uint32_t prop_count; 03796 char prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03798 int32_t value; 03799 } player_simulation_property_int_req_t; 03800 03806 typedef struct player_simulation_property_float_req 03807 { 03809 uint32_t name_count; 03811 char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03813 uint32_t prop_count; 03815 char prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03817 double value; 03818 } player_simulation_property_float_req_t; 03819 03824 typedef struct player_simulation_property_string_req 03825 { 03827 uint32_t name_count; 03829 char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03831 uint32_t prop_count; 03833 char prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03835 uint32_t value_count; 03837 char value[PLAYER_SIMULATION_IDENTIFIER_MAXLEN]; 03838 } player_simulation_property_string_req_t; 03839 03842 // ///////////////////////////////////////////////////////////////////////////// 03855 #define PLAYER_SONAR_MAX_SAMPLES 64 03856 03858 #define PLAYER_SONAR_REQ_GET_GEOM 1 03859 03860 #define PLAYER_SONAR_REQ_POWER 2 03861 03863 #define PLAYER_SONAR_DATA_RANGES 1 03864 03865 #define PLAYER_SONAR_DATA_GEOM 2 03866 03871 typedef struct player_sonar_data 03872 { 03874 uint32_t ranges_count; 03876 float ranges[PLAYER_SONAR_MAX_SAMPLES]; 03877 } player_sonar_data_t; 03878 03885 typedef struct player_sonar_geom 03886 { 03888 uint32_t poses_count; 03890 player_pose_t poses[PLAYER_SONAR_MAX_SAMPLES]; 03891 } player_sonar_geom_t; 03892 03897 typedef struct player_sonar_power_config 03898 { 03900 uint8_t state; 03901 } player_sonar_power_config_t; 03902 03905 // ///////////////////////////////////////////////////////////////////////////// 03918 #define PLAYER_SOUND_CMD_IDX 1 03919 03924 typedef struct player_sound_cmd 03925 { 03927 uint32_t index; 03928 } player_sound_cmd_t; 03929 03932 // ///////////////////////////////////////////////////////////////////////////// 03944 #define PLAYER_SPEECH_MAX_STRING_LEN 256 03945 03947 #define PLAYER_SPEECH_CMD_SAY 1 03948 03953 typedef struct player_speech_cmd 03954 { 03956 uint32_t string_count; 03958 char string[PLAYER_SPEECH_MAX_STRING_LEN]; 03959 } player_speech_cmd_t; 03960 03963 // ///////////////////////////////////////////////////////////////////////////// 03976 #define PLAYER_SPEECH_RECOGNITION_TEXT_LEN 256 03977 03979 #define PLAYER_SPEECH_RECOGNITION_DATA_STRING 1 03980 03984 typedef struct player_speech_recognition_data 03985 { 03987 uint32_t text_count; 03989 char text[PLAYER_SPEECH_RECOGNITION_TEXT_LEN]; 03990 } player_speech_recognition_data_t; 03991 03994 // ///////////////////////////////////////////////////////////////////////////// 04011 #define PLAYER_TRUTH_DATA_POSE 0x01 04012 04013 #define PLAYER_TRUTH_DATA_FIDUCIAL_ID 0x02 04014 04016 #define PLAYER_TRUTH_REQ_SET_POSE 0x03 04017 04018 #define PLAYER_TRUTH_REQ_SET_FIDUCIAL_ID 0x04 04019 04020 #define PLAYER_TRUTH_REQ_GET_FIDUCIAL_ID 0x05 04021 04026 typedef struct player_truth_pose 04027 { 04029 player_pose3d_t pose; 04030 } player_truth_pose_t; 04031 04039 typedef struct player_truth_fiducial_id 04040 { 04043 uint8_t subtype; 04045 int16_t id; 04046 } player_truth_fiducial_id_t; 04047 04050 // ///////////////////////////////////////////////////////////////////////////// 04063 #define PLAYER_WAVEFORM_DATA_MAX 4096 04064 04066 #define PLAYER_WAVEFORM_DATA_SAMPLE 1 04067 04072 typedef struct player_waveform_data 04073 { 04075 uint32_t rate; 04077 uint32_t depth; 04079 uint32_t data_count; 04081 uint8_t data[PLAYER_WAVEFORM_DATA_MAX]; 04082 } player_waveform_data_t; 04083 04086 // ///////////////////////////////////////////////////////////////////////////// 04099 #define PLAYER_WIFI_MAX_LINKS 32 04100 04102 #define PLAYER_WIFI_QUAL_DBM 1 04103 04104 #define PLAYER_WIFI_QUAL_REL 2 04105 04106 #define PLAYER_WIFI_QUAL_UNKNOWN 3 04107 04109 #define PLAYER_WIFI_MODE_UNKNOWN 0 04110 04111 #define PLAYER_WIFI_MODE_AUTO 1 04112 04113 #define PLAYER_WIFI_MODE_ADHOC 2 04114 04115 #define PLAYER_WIFI_MODE_INFRA 3 04116 04117 #define PLAYER_WIFI_MODE_MASTER 4 04118 04119 #define PLAYER_WIFI_MODE_REPEAT 5 04120 04121 #define PLAYER_WIFI_MODE_SECOND 6 04122 04124 #define PLAYER_WIFI_MAC 1 04125 04126 #define PLAYER_WIFI_IWSPY_ADD 2 04127 04128 #define PLAYER_WIFI_IWSPY_DEL 3 04129 04130 #define PLAYER_WIFI_IWSPY_PING 4 04131 04133 #define PLAYER_WIFI_DATA_STATE 1 04134 04140 typedef struct player_wifi_link 04141 { 04143 uint32_t mac_count; 04144 uint8_t mac[32]; 04146 uint32_t ip_count; 04147 uint8_t ip[32]; 04149 uint32_t essid_count; 04150 uint8_t essid[32]; 04152 uint32_t mode; 04154 uint32_t freq; 04156 uint32_t encrypt; 04158 uint32_t qual; 04160 uint32_t level; 04162 uint32_t noise; 04163 } player_wifi_link_t; 04164 04168 typedef struct player_wifi_data 04169 { 04171 uint32_t links_count; 04173 player_wifi_link_t links[PLAYER_WIFI_MAX_LINKS]; 04175 uint32_t throughput; 04177 uint32_t bitrate; 04179 uint32_t mode; 04181 uint32_t qual_type; 04183 uint32_t maxqual; 04185 uint32_t maxlevel; 04187 uint32_t maxnoise; 04189 char ap[32]; 04190 } player_wifi_data_t; 04191 04193 typedef struct player_wifi_mac_req 04194 { 04196 uint32_t mac_count; 04197 uint8_t mac[32]; 04198 } player_wifi_mac_req_t; 04199 04201 typedef struct player_wifi_iwspy_addr_req 04202 { 04204 char address[32]; 04205 } player_wifi_iwspy_addr_req_t; 04206 04209 // ///////////////////////////////////////////////////////////////////////////// 04222 #define PLAYER_RFID_MAX_TAGS 30 04223 04224 #define PLAYER_RFID_MAX_GUID 8 04225 04227 #define PLAYER_RFID_DATA 1 04228 04230 #define PLAYER_RFID_REQ_POWER 1 04231 04232 #define PLAYER_RFID_REQ_READTAG 2 04233 04234 #define PLAYER_RFID_REQ_WRITETAG 3 04235 04236 #define PLAYER_RFID_REQ_LOCKTAG 4 04237 04239 typedef struct player_rfid_tag 04240 { 04242 uint32_t type; 04244 uint32_t guid_count; 04246 char guid[PLAYER_RFID_MAX_GUID]; 04247 } player_rfid_tag_t; 04248 04252 typedef struct player_rfid_data 04253 { 04255 uint32_t tags_count; 04257 player_rfid_tag_t tags[PLAYER_RFID_MAX_TAGS]; 04258 } player_rfid_data_t; 04259 04264 typedef struct player_rfid_cmd 04265 { 04267 uint8_t temp; 04268 } player_rfid_cmd_t; 04269 04272 // ///////////////////////////////////////////////////////////////////////////// 04289 #define PLAYER_WSN_DATA 1 04290 04292 #define PLAYER_WSN_CMD_DEVSTATE 1 04293 04295 #define PLAYER_WSN_REQ_POWER 1 04296 04297 #define PLAYER_WSN_REQ_DATATYPE 2 04298 04299 #define PLAYER_WSN_REQ_DATAFREQ 3 04300 04302 typedef struct player_wsn_node_data 04303 { 04305 float light; 04307 float mic; 04309 float accel_x; 04311 float accel_y; 04313 float accel_z; 04315 float magn_x; 04317 float magn_y; 04319 float magn_z; 04321 float temperature; 04323 float battery; 04324 } player_wsn_node_data_t; 04325 04329 typedef struct player_wsn_data 04330 { 04332 uint32_t node_type; 04334 uint32_t node_id; 04336 uint32_t node_parent_id; 04338 player_wsn_node_data_t data_packet; 04339 } player_wsn_data_t; 04340 04344 typedef struct player_wsn_cmd 04345 { 04347 int32_t node_id; 04349 int32_t group_id; 04351 uint32_t device; 04353 uint8_t enable; 04354 } player_wsn_cmd_t; 04355 04360 typedef struct player_wsn_power_config 04361 { 04363 int32_t node_id; 04365 int32_t group_id; 04367 uint8_t value; 04368 } player_wsn_power_config_t; 04369 04375 typedef struct player_wsn_datatype_config 04376 { 04378 uint8_t value; 04379 } player_wsn_datatype_config_t; 04380 04386 typedef struct player_wsn_datafreq_config 04387 { 04389 int32_t node_id; 04391 int32_t group_id; 04393 double frequency; 04394 } player_wsn_datafreq_config_t; 04397 #endif /* PLAYER_H */