00001 /************************************************************************************************** 00002 Software License Agreement (BSD License) 00003 00004 Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without modification, are permitted 00008 provided that the following conditions are met: 00009 00010 *Redistributions of source code must retain the above copyright notice, this list of 00011 conditions and the following disclaimer. 00012 *Redistributions in binary form must reproduce the above copyright notice, this list of 00013 conditions and the following disclaimer in the documentation and/or other materials provided 00014 with the distribution. 00015 *Neither the name of the University of Aveiro nor the names of its contributors may be used to 00016 endorse or promote products derived from this software without specific prior written permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 00019 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00020 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 00021 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00024 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00025 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 ***************************************************************************************************/ 00034 #include <stdint.h> 00035 #include <stdlib.h> 00036 #include "lcm_coretypes.h" 00037 00038 #ifndef _lcmtypes_pose_t_h 00039 #define _lcmtypes_pose_t_h 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00045 typedef struct _lcmtypes_pose_t lcmtypes_pose_t; 00046 struct _lcmtypes_pose_t 00047 { 00048 int64_t utime; 00049 double pos[3]; 00050 double vel[3]; 00051 double orientation[4]; 00052 double rotation_rate[3]; 00053 double accel[3]; 00054 }; 00055 00056 lcmtypes_pose_t *lcmtypes_pose_t_copy(const lcmtypes_pose_t *p); 00057 void lcmtypes_pose_t_destroy(lcmtypes_pose_t *p); 00058 00059 int lcmtypes_pose_t_encode(void *buf, int offset, int maxlen, const lcmtypes_pose_t *p); 00060 int lcmtypes_pose_t_decode(const void *buf, int offset, int maxlen, lcmtypes_pose_t *p); 00061 int lcmtypes_pose_t_decode_cleanup(lcmtypes_pose_t *p); 00062 int lcmtypes_pose_t_encoded_size(const lcmtypes_pose_t *p); 00063 00064 // LCM support functions. Users should not call these 00065 int64_t __lcmtypes_pose_t_get_hash(void); 00066 int64_t __lcmtypes_pose_t_hash_recursive(const __lcm_hash_ptr *p); 00067 int __lcmtypes_pose_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_pose_t *p, int elements); 00068 int __lcmtypes_pose_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_pose_t *p, int elements); 00069 int __lcmtypes_pose_t_decode_array_cleanup(lcmtypes_pose_t *p, int elements); 00070 int __lcmtypes_pose_t_encoded_array_size(const lcmtypes_pose_t *p, int elements); 00071 int __lcmtypes_pose_t_clone_array(const lcmtypes_pose_t *p, lcmtypes_pose_t *q, int elements); 00072 00073 #ifdef __cplusplus 00074 } 00075 #endif 00076 00077 #endif