Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef OMIPTYPEDEFS_H_
00033 #define OMIPTYPEDEFS_H_
00034
00035
00036 #include <visualization_msgs/MarkerArray.h>
00037 #include <pcl/point_types.h>
00038 #include <pcl/point_cloud.h>
00039 #include <cv_bridge/cv_bridge.h>
00040 #include <sensor_msgs/PointCloud2.h>
00041
00042
00043 #include <omip_msgs/RigidBodyPosesAndVelsMsg.h>
00044 #include <omip_msgs/RigidBodyPoseAndVelMsg.h>
00045 #include <omip_msgs/JointMsg.h>
00046 #include <omip_msgs/KinematicStructureMsg.h>
00047
00048 #define OMIP_ADD_POINT4D \
00049 union { \
00050 float data[4]; \
00051 struct { \
00052 float x; \
00053 float y; \
00054 float z; \
00055 }; \
00056 } EIGEN_ALIGN16; \
00057 inline Eigen::Map<Eigen::Vector3f> getVector3fMap () { return (Eigen::Vector3f::Map (data)); } \
00058 inline const Eigen::Map<const Eigen::Vector3f> getVector3fMap () const { return (Eigen::Vector3f::Map (data)); } \
00059 inline Eigen::Map<Eigen::Vector4f, Eigen::Aligned> getVector4fMap () { return (Eigen::Vector4f::MapAligned (data)); } \
00060 inline const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned> getVector4fMap () const { return (Eigen::Vector4f::MapAligned (data)); } \
00061 inline Eigen::Map<Eigen::Array3f> getArray3fMap () { return (Eigen::Array3f::Map (data)); } \
00062 inline const Eigen::Map<const Eigen::Array3f> getArray3fMap () const { return (Eigen::Array3f::Map (data)); } \
00063 inline Eigen::Map<Eigen::Array4f, Eigen::Aligned> getArray4fMap () { return (Eigen::Array4f::MapAligned (data)); } \
00064 inline const Eigen::Map<const Eigen::Array4f, Eigen::Aligned> getArray4fMap () const { return (Eigen::Array4f::MapAligned (data)); }
00065
00066 namespace omip
00067 {
00068
00069
00070 class JointFilter;
00071
00072
00073 class JointCombinedFilter;
00074
00075 typedef pcl::PointXYZ PointPCL;
00076 typedef pcl::PointXYZL FeaturePCL;
00077
00078 struct EIGEN_ALIGN16 _FeaturePCLwc
00079 {
00080 OMIP_ADD_POINT4D
00081 uint32_t label;
00082 float covariance[9];
00083 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00084 };
00085
00086 struct FeaturePCLwc : public _FeaturePCLwc
00087 {
00088 inline FeaturePCLwc ()
00089 {
00090 x = y = z = 0.0f;
00091 data[3] = 1.0f;
00092 label = 0;
00093 covariance[0] = 1.0f;
00094 covariance[1] = 0.0f;
00095 covariance[2] = 0.0f;
00096 covariance[3] = 0.0f;
00097 covariance[4] = 1.0f;
00098 covariance[5] = 0.0f;
00099 covariance[6] = 0.0f;
00100 covariance[7] = 0.0f;
00101 covariance[8] = 1.0f;
00102 }
00103 };
00104
00105 typedef pcl::PointCloud<PointPCL> PointCloudPCLNoColor;
00106 typedef pcl::PointCloud<pcl::PointXYZRGB> PointCloudPCL;
00107 typedef pcl::PointCloud<FeaturePCL> FeatureCloudPCL;
00108 typedef pcl::PointCloud<FeaturePCLwc> FeatureCloudPCLwc;
00109
00110 typedef long int RB_id_t;
00111 typedef long int Joint_id_t;
00112
00113 typedef pcl::PointCloud<PointPCL> RigidBodyShape;
00114
00115 typedef std::map<std::pair<int, int>, boost::shared_ptr<JointCombinedFilter> > KinematicModel;
00116
00117
00118
00119
00120 typedef void ft_measurement_ros_t;
00121
00122
00123 typedef std::pair<cv_bridge::CvImagePtr, cv_bridge::CvImagePtr> ft_measurement_t;
00124
00125
00126 typedef sensor_msgs::PointCloud2 ft_state_ros_t;
00127
00128
00129 typedef FeatureCloudPCLwc::Ptr ft_state_t;
00130
00131
00132 typedef sensor_msgs::PointCloud2 rbt_measurement_ros_t;
00133
00134
00135 typedef FeatureCloudPCLwc::Ptr rbt_measurement_t;
00136
00137
00138 typedef omip_msgs::RigidBodyPosesAndVelsMsg rbt_state_ros_t;
00139
00140
00141 typedef omip_msgs::RigidBodyPosesAndVelsMsg rbt_state_t;
00142
00143
00144 typedef omip_msgs::RigidBodyPosesAndVelsMsg ks_measurement_ros_t;
00145
00146
00147 typedef omip_msgs::RigidBodyPosesAndVelsMsg ks_measurement_t;
00148
00149
00150 typedef omip_msgs::KinematicStructureMsg::Ptr ks_state_ros_t;
00151
00152
00153 typedef KinematicModel ks_state_t;
00154
00155
00156 typedef std::pair<omip_msgs::RigidBodyPoseAndVelMsg, omip_msgs::RigidBodyPoseAndVelMsg> joint_measurement_t;
00157
00158 enum shape_model_selector_t
00159 {
00160 BASED_ON_DEPTH = 1,
00161 BASED_ON_COLOR = 2,
00162 BASED_ON_EXT_DEPTH = 3,
00163 BASED_ON_EXT_COLOR = 4,
00164 BASED_ON_EXT_DEPTH_AND_COLOR = 5
00165 };
00166
00167 enum static_environment_tracker_t
00168 {
00169 STATIC_ENVIRONMENT_EKF_TRACKER = 1,
00170 STATIC_ENVIRONMENT_ICP_TRACKER = 2
00171 };
00172
00173 }
00174
00175 POINT_CLOUD_REGISTER_POINT_STRUCT(omip::FeaturePCLwc,
00176 (float, x, x)
00177 (float, y, y)
00178 (float, z, z)
00179 (uint32_t, label, label)
00180 (float[9], covariance, covariance))
00181
00182
00183 #endif