#include <body_tracker.h>
Public Member Functions | |
BodyTracker (ros::NodeHandle nh) | |
void | Finalize () |
void | runTracker () |
virtual | ~BodyTracker () |
Public Attributes | |
std::string | cam_frame_ |
openni::VideoStream | depthSensor_ |
openni::Device | device_ |
std::string | rel_frame_ |
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 | 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 | |
tf::TransformBroadcaster | br_ |
bool | drawBackground_ |
bool | drawBoundingBox_ |
bool | drawCenterOfMass_ |
bool | drawDepth_ |
bool | drawFrames_ |
bool | drawSkeleton_ |
bool | drawUserName_ |
image_transport::Publisher | image_pub_ |
image_transport::SubscriberFilter | image_sub_ |
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_ |
image_transport::SubscriberFilter | pcl_sub_ |
ros::Publisher | people_pub_ |
int | poseTimeoutToExit_ |
ros::Publisher | skeleton_pub_ |
std::list< nite::UserData > * | tracked_users_ |
tf::TransformListener | transform_listener_ |
ros::Publisher | vis_pub_ |
Definition at line 106 of file body_tracker.h.
Definition at line 110 of file body_tracker.cpp.
BodyTracker::~BodyTracker | ( | ) | [virtual] |
Definition at line 238 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 822 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 639 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 802 of file body_tracker.cpp.
void BodyTracker::drawFrames | ( | const nite::UserData & | user | ) | [private] |
Definition at line 716 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 672 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 769 of file body_tracker.cpp.
void BodyTracker::drawPointCloud | ( | ) | [private] |
Definition at line 659 of file body_tracker.cpp.
void BodyTracker::drawSkeleton | ( | nite::UserTracker * | pUserTracker, |
const nite::UserData & | userData | ||
) | [private] |
Definition at line 679 of file body_tracker.cpp.
void BodyTracker::drawUserName | ( | const nite::UserData & | user, |
cv::Mat & | color_image, | ||
cv::Point & | tag_coords | ||
) | [private] |
Definition at line 703 of file body_tracker.cpp.
void BodyTracker::Finalize | ( | ) |
Definition at line 244 of file body_tracker.cpp.
void BodyTracker::imageCallback | ( | const sensor_msgs::ImageConstPtr & | rgb_image_msg | ) | [private] |
Definition at line 179 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 257 of file body_tracker.cpp.
BodyTracker& BodyTracker::operator= | ( | BodyTracker & | ) | [private] |
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 616 of file body_tracker.cpp.
void BodyTracker::publishTrackedUserMsg | ( | ) | [private] |
Definition at line 519 of file body_tracker.cpp.
void BodyTracker::runTracker | ( | ) |
Definition at line 313 of file body_tracker.cpp.
void BodyTracker::updateUserState | ( | const nite::UserData & | user, |
uint64_t | ts | ||
) | [private] |
Definition at line 573 of file body_tracker.cpp.
tf::TransformBroadcaster BodyTracker::br_ [private] |
Definition at line 127 of file body_tracker.h.
std::string BodyTracker::cam_frame_ |
Definition at line 114 of file body_tracker.h.
openni::VideoStream BodyTracker::depthSensor_ |
Definition at line 116 of file body_tracker.h.
openni::Device BodyTracker::device_ |
Definition at line 115 of file body_tracker.h.
bool BodyTracker::drawBackground_ [private] |
Definition at line 158 of file body_tracker.h.
bool BodyTracker::drawBoundingBox_ [private] |
Definition at line 157 of file body_tracker.h.
bool BodyTracker::drawCenterOfMass_ [private] |
Definition at line 155 of file body_tracker.h.
bool BodyTracker::drawDepth_ [private] |
Definition at line 159 of file body_tracker.h.
bool BodyTracker::drawFrames_ [private] |
Definition at line 160 of file body_tracker.h.
bool BodyTracker::drawSkeleton_ [private] |
Definition at line 154 of file body_tracker.h.
bool BodyTracker::drawUserName_ [private] |
Definition at line 156 of file body_tracker.h.
Definition at line 132 of file body_tracker.h.
Definition at line 130 of file body_tracker.h.
image_transport::ImageTransport* BodyTracker::it_ [private] |
Definition at line 129 of file body_tracker.h.
unsigned int BodyTracker::m_nTexMapX [private] |
Definition at line 142 of file body_tracker.h.
unsigned int BodyTracker::m_nTexMapY [private] |
Definition at line 143 of file body_tracker.h.
float BodyTracker::m_pDepthHist[MAX_DEPTH] [private] |
Definition at line 139 of file body_tracker.h.
uint64_t BodyTracker::m_poseTime_ [private] |
Definition at line 150 of file body_tracker.h.
nite::UserId BodyTracker::m_poseUser [private] |
Definition at line 146 of file body_tracker.h.
openni::RGB888Pixel* BodyTracker::m_pTexMap_ [private] |
Definition at line 148 of file body_tracker.h.
nite::UserTracker* BodyTracker::m_pUserTracker [private] |
Definition at line 145 of file body_tracker.h.
char BodyTracker::m_strSampleName[ONI_MAX_STR] [private] |
Definition at line 140 of file body_tracker.h.
unsigned int BodyTracker::marker_id_ [private] |
Definition at line 151 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 133 of file body_tracker.h.
ros::Publisher BodyTracker::pcl_pub_ [private] |
Definition at line 128 of file body_tracker.h.
Definition at line 131 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 152 of file body_tracker.h.
std::string BodyTracker::rel_frame_ |
Definition at line 114 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 114 of file body_tracker.h.
std::list<nite::UserData>* BodyTracker::tracked_users_ [private] |
Definition at line 137 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.