#include <body_tracker.h>
Public Member Functions | |
BodyTracker (ros::NodeHandle nh) | |
void | finalize () |
void | runTracker () |
virtual | ~BodyTracker () |
Public Attributes | |
std::string | depth_optical_frame_ |
openni::VideoStream | depthSensor_ |
openni::Device | device_ |
std::string | rel_frame_ |
bool | shutdown_ |
std::string | tf_prefix_ |
Private Member Functions | |
BodyTracker (const BodyTracker &) | |
void | calculateHistogram (float *pHistogram, int histogramSize, const openni::VideoFrameRef &depthFrame) |
unsigned long | convertColorImageMessageToMat (const sensor_msgs::Image::ConstPtr &color_image_msg, cv_bridge::CvImageConstPtr &color_image_ptr, cv::Mat &color_image) |
void | convertColorImageMsgToMat (const sensor_msgs::Image::ConstPtr &color_image_msg, cv_bridge::CvImageConstPtr &color_image_ptr, cv::Mat &color_image) |
geometry_msgs::Pose | convertNiteJointToMsgs (nite::SkeletonJoint joint) |
void | drawCircle (const double r, const double g, const double b, const nite::Point3f &pose) |
void | drawFrames (const nite::UserData &user) |
void | drawLimb (nite::UserTracker *pUserTracker, const nite::SkeletonJoint &joint1, const nite::SkeletonJoint &joint2, int color) |
void | drawLine (const double r, const double g, const double b, const nite::Point3f &pose_start, const nite::Point3f &pose_end) |
void | drawPointCloud () |
void | drawSkeleton (nite::UserTracker *pUserTracker, const nite::UserData &userData) |
void | drawUserName (const nite::UserData &user, cv::Mat &color_image, cv::Point &tag_coords) |
void | imageCallback (const sensor_msgs::ImageConstPtr &rgb_image_msg) |
void | imgConnectCB (const image_transport::SingleSubscriberPublisher &pub) |
void | imgDisconnectCB (const image_transport::SingleSubscriberPublisher &pub) |
void | init () |
BodyTracker & | operator= (BodyTracker &) |
void | pointcloudCallback (const sensor_msgs::PointCloud2::ConstPtr &pointcloud) |
void | publishJoints (ros::NodeHandle &nh, tf::TransformBroadcaster &br, std::string joint_name, nite::SkeletonJoint joint, std::string tf_prefix, std::string rel_frame, int id) |
void | publishTrackedUserMsg () |
void | updateUserState (const nite::UserData &user, uint64_t ts) |
Private Attributes | |
bool | drawBackground_ |
bool | drawBoundingBox_ |
bool | drawCenterOfMass_ |
bool | drawDepth_ |
bool | drawFrames_ |
bool | drawSkeleton_ |
bool | drawUserName_ |
image_transport::Publisher | image_pub_ |
image_transport::SubscriberFilter | image_sub_ |
int | init_counter_color_image_ |
int | init_counter_point_cloud_ |
image_transport::ImageTransport * | it_ |
unsigned int | m_nTexMapX |
unsigned int | m_nTexMapY |
float | m_pDepthHist [MAX_DEPTH] |
uint64_t | m_poseTime_ |
nite::UserId | m_poseUser |
openni::RGB888Pixel * | m_pTexMap_ |
nite::UserTracker * | m_pUserTracker |
char | m_strSampleName [ONI_MAX_STR] |
unsigned int | marker_id_ |
ros::NodeHandle | nh_ |
pcl::PointCloud < pcl::PointXYZRGB >::Ptr | pcl_cloud_ |
ros::Publisher | pcl_pub_ |
ros::Subscriber | pcl_sub_ |
ros::Publisher | people_pub_ |
int | poseTimeoutToExit_ |
ros::Publisher | skeleton_pub_ |
std::list< nite::UserData > * | tracked_users_ |
tf::TransformBroadcaster | transform_broadcaster_ |
tf::TransformListener | transform_listener_ |
ros::Publisher | vis_pub_ |
Definition at line 104 of file body_tracker.h.
Definition at line 111 of file body_tracker.cpp.
BodyTracker::~BodyTracker | ( | ) | [virtual] |
Definition at line 273 of file body_tracker.cpp.
BodyTracker::BodyTracker | ( | const BodyTracker & | ) | [private] |
void BodyTracker::calculateHistogram | ( | float * | pHistogram, |
int | histogramSize, | ||
const openni::VideoFrameRef & | depthFrame | ||
) | [private] |
Definition at line 865 of file body_tracker.cpp.
unsigned long BodyTracker::convertColorImageMessageToMat | ( | const sensor_msgs::Image::ConstPtr & | color_image_msg, |
cv_bridge::CvImageConstPtr & | color_image_ptr, | ||
cv::Mat & | color_image | ||
) | [private] |
void BodyTracker::convertColorImageMsgToMat | ( | const sensor_msgs::Image::ConstPtr & | color_image_msg, |
cv_bridge::CvImageConstPtr & | color_image_ptr, | ||
cv::Mat & | color_image | ||
) | [private] |
geometry_msgs::Pose BodyTracker::convertNiteJointToMsgs | ( | nite::SkeletonJoint | joint | ) | [private] |
Definition at line 680 of file body_tracker.cpp.
void BodyTracker::drawCircle | ( | const double | r, |
const double | g, | ||
const double | b, | ||
const nite::Point3f & | pose | ||
) | [private] |
Definition at line 845 of file body_tracker.cpp.
void BodyTracker::drawFrames | ( | const nite::UserData & | user | ) | [private] |
Definition at line 759 of file body_tracker.cpp.
void BodyTracker::drawLimb | ( | nite::UserTracker * | pUserTracker, |
const nite::SkeletonJoint & | joint1, | ||
const nite::SkeletonJoint & | joint2, | ||
int | color | ||
) | [private] |
Definition at line 716 of file body_tracker.cpp.
void BodyTracker::drawLine | ( | const double | r, |
const double | g, | ||
const double | b, | ||
const nite::Point3f & | pose_start, | ||
const nite::Point3f & | pose_end | ||
) | [private] |
A helper function to draw a simple line in rviz.
Definition at line 812 of file body_tracker.cpp.
void BodyTracker::drawPointCloud | ( | ) | [private] |
Definition at line 700 of file body_tracker.cpp.
void BodyTracker::drawSkeleton | ( | nite::UserTracker * | pUserTracker, |
const nite::UserData & | userData | ||
) | [private] |
Definition at line 723 of file body_tracker.cpp.
void BodyTracker::drawUserName | ( | const nite::UserData & | user, |
cv::Mat & | color_image, | ||
cv::Point & | tag_coords | ||
) | [private] |
Definition at line 746 of file body_tracker.cpp.
void BodyTracker::finalize | ( | ) |
Definition at line 279 of file body_tracker.cpp.
void BodyTracker::imageCallback | ( | const sensor_msgs::ImageConstPtr & | rgb_image_msg | ) | [private] |
Definition at line 208 of file body_tracker.cpp.
void BodyTracker::imgConnectCB | ( | const image_transport::SingleSubscriberPublisher & | pub | ) | [private] |
void BodyTracker::imgDisconnectCB | ( | const image_transport::SingleSubscriberPublisher & | pub | ) | [private] |
void BodyTracker::init | ( | ) | [private] |
Definition at line 297 of file body_tracker.cpp.
BodyTracker& BodyTracker::operator= | ( | BodyTracker & | ) | [private] |
void BodyTracker::pointcloudCallback | ( | const sensor_msgs::PointCloud2::ConstPtr & | pointcloud | ) | [private] |
Definition at line 267 of file body_tracker.cpp.
void BodyTracker::publishJoints | ( | ros::NodeHandle & | nh, |
tf::TransformBroadcaster & | br, | ||
std::string | joint_name, | ||
nite::SkeletonJoint | joint, | ||
std::string | tf_prefix, | ||
std::string | rel_frame, | ||
int | id | ||
) | [private] |
Definition at line 656 of file body_tracker.cpp.
void BodyTracker::publishTrackedUserMsg | ( | ) | [private] |
Definition at line 559 of file body_tracker.cpp.
void BodyTracker::runTracker | ( | ) |
Definition at line 353 of file body_tracker.cpp.
void BodyTracker::updateUserState | ( | const nite::UserData & | user, |
uint64_t | ts | ||
) | [private] |
Definition at line 613 of file body_tracker.cpp.
std::string BodyTracker::depth_optical_frame_ |
Definition at line 112 of file body_tracker.h.
openni::VideoStream BodyTracker::depthSensor_ |
Definition at line 114 of file body_tracker.h.
openni::Device BodyTracker::device_ |
Definition at line 113 of file body_tracker.h.
bool BodyTracker::drawBackground_ [private] |
Definition at line 159 of file body_tracker.h.
bool BodyTracker::drawBoundingBox_ [private] |
Definition at line 158 of file body_tracker.h.
bool BodyTracker::drawCenterOfMass_ [private] |
Definition at line 156 of file body_tracker.h.
bool BodyTracker::drawDepth_ [private] |
Definition at line 160 of file body_tracker.h.
bool BodyTracker::drawFrames_ [private] |
Definition at line 161 of file body_tracker.h.
bool BodyTracker::drawSkeleton_ [private] |
Definition at line 155 of file body_tracker.h.
bool BodyTracker::drawUserName_ [private] |
Definition at line 157 of file body_tracker.h.
Definition at line 133 of file body_tracker.h.
Definition at line 131 of file body_tracker.h.
int BodyTracker::init_counter_color_image_ [private] |
Definition at line 163 of file body_tracker.h.
int BodyTracker::init_counter_point_cloud_ [private] |
Definition at line 164 of file body_tracker.h.
image_transport::ImageTransport* BodyTracker::it_ [private] |
Definition at line 130 of file body_tracker.h.
unsigned int BodyTracker::m_nTexMapX [private] |
Definition at line 143 of file body_tracker.h.
unsigned int BodyTracker::m_nTexMapY [private] |
Definition at line 144 of file body_tracker.h.
float BodyTracker::m_pDepthHist[MAX_DEPTH] [private] |
Definition at line 140 of file body_tracker.h.
uint64_t BodyTracker::m_poseTime_ [private] |
Definition at line 151 of file body_tracker.h.
nite::UserId BodyTracker::m_poseUser [private] |
Definition at line 147 of file body_tracker.h.
openni::RGB888Pixel* BodyTracker::m_pTexMap_ [private] |
Definition at line 149 of file body_tracker.h.
nite::UserTracker* BodyTracker::m_pUserTracker [private] |
Definition at line 146 of file body_tracker.h.
char BodyTracker::m_strSampleName[ONI_MAX_STR] [private] |
Definition at line 141 of file body_tracker.h.
unsigned int BodyTracker::marker_id_ [private] |
Definition at line 152 of file body_tracker.h.
ros::NodeHandle BodyTracker::nh_ [private] |
Definition at line 123 of file body_tracker.h.
pcl::PointCloud<pcl::PointXYZRGB>::Ptr BodyTracker::pcl_cloud_ [private] |
Definition at line 134 of file body_tracker.h.
ros::Publisher BodyTracker::pcl_pub_ [private] |
Definition at line 128 of file body_tracker.h.
ros::Subscriber BodyTracker::pcl_sub_ [private] |
Definition at line 129 of file body_tracker.h.
ros::Publisher BodyTracker::people_pub_ [private] |
Definition at line 128 of file body_tracker.h.
int BodyTracker::poseTimeoutToExit_ [private] |
Definition at line 153 of file body_tracker.h.
std::string BodyTracker::rel_frame_ |
Definition at line 112 of file body_tracker.h.
Definition at line 118 of file body_tracker.h.
ros::Publisher BodyTracker::skeleton_pub_ [private] |
Definition at line 128 of file body_tracker.h.
std::string BodyTracker::tf_prefix_ |
Definition at line 112 of file body_tracker.h.
std::list<nite::UserData>* BodyTracker::tracked_users_ [private] |
Definition at line 138 of file body_tracker.h.
Definition at line 127 of file body_tracker.h.
Definition at line 126 of file body_tracker.h.
ros::Publisher BodyTracker::vis_pub_ [private] |
Definition at line 128 of file body_tracker.h.