icub-client
Classes | Enumerations

Module based on kinectClient "Kinect Wrapper Client" that track and recognize people. More...

+ Collaboration diagram for agentDetector:

Classes

class  AgentDetector
 

Enumerations

enum  clickType {
  idle,
  clicked_left,
  clicked_right
}
 

Detailed Description

Module based on kinectClient "Kinect Wrapper Client" that track and recognize people.

Version:1.0

Author
Stéphane Lallée steph.nosp@m.ane..nosp@m.lalle.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om

Description

Module based on kinectClient "Kinect Wrapper Client" that tracks people. This module receives information from the Kinect Wrapper, and convert joints to the iCub referential. It requires the kinectServer, OPC and RFH running.

Parameters

Input Ports

Output Ports

Services


Class Documentation

◆ AgentDetector

class AgentDetector

Definition at line 46 of file AgentDetector.h.

+ Inheritance diagram for AgentDetector:

Public Member Functions

bool configure (ResourceFinder &rf)
 
bool checkCalibration ()
 
bool close ()
 
bool respond (const Bottle &cmd, Bottle &reply)
 
double getPeriod ()
 
bool updateModule ()
 
void setIdentity (Player p, string name)
 setIdentity Set identity to a partner More...
 
string getIdentity (Player p)
 getIdentity Obtain identity of partner More...
 
Vector transform2IR (Vector v)
 transform2IR Transform a position to IR reference frame More...
 
Vector getSkeletonPattern (Player p)
 getSkeletonPattern Obtain some properties of partner skeleton, such as eblow, shoulder, head position and size More...
 

Static Public Member Functions

static void click_callback (int event, int x, int y, int flags, void *param)
 

Protected Member Functions

bool showImageParser (string &mode, string &submode)
 

Protected Attributes

KinectWrapperClient client
 kinect wrapper client object More...
 
ImageOf< PixelRgb > rgb
 
ImageOf< PixelMono16 > depth
 depth image in a Yarp format More...
 
ImageOf< PixelFloat > depthToDisplay
 depth image to display in a Yarp format More...
 
ImageOf< PixelBgr > playersImage
 partner image in a Yarp format More...
 
ImageOf< PixelBgr > skeletonImage
 skeleton imange in a Yarp format More...
 
IplImage * depthTmp
 
IplImage * rgbTmp
 
yarp::os::BufferedPort< Bottle > outputSkeletonPort
 Output Yarp Buffered Port of Bottle contains skeleton properties. More...
 
yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelFloat > > depthPort
 Output Yarp Buffered Port of images contains depth information. More...
 
yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelRgb > > imagePort
 Output Yarp Buffered Port of images contains images. More...
 
yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelBgr > > playersPort
 Output Yarp Buffered Port of partner images. More...
 
yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelBgr > > skeletonPort
 Output Yarp Buffered Port of skeleton images. More...
 
yarp::os::BufferedPort< Bottle > agentLocOutPort
 Output Yarp Buffered Port of Bottle contains agent location. More...
 
double period
 
bool showImages
 
string showMode
 string value of show mode of module: rgb, depth, skeleton, players More...
 
bool handleMultiplePlayers
 boolean value for multiple players or not, if not, obtain only the closest player More...
 
Player joint
 
deque< Player > joints
 
Matrix players
 
string partner_default_name
 string value of default name of partner More...
 
OPCClientopc
 OPC client object. More...
 
Port rfh
 port to referenceFrameHandler More...
 
Port rpc
 rpc server port to receive requests More...
 
bool isMounted
 boolean value to check if the IR is mounted or not More...
 
bool isCalibrated
 boolean value to check if the kinect is calibrated or not More...
 
Matrix kinect2icub
 conversion matrix from kinect frame to icub frame More...
 
Matrix icub2ir
 
int pointsCnt
 integer of number of points More...
 
Agentpartner
 human as an agent object More...
 
map< int, string > identities
 
map< string, Vector > skeletonPatterns
 properties of skeleton obtained from kinect More...
 
double dSince
 double value of timers More...
 
unsigned long dTimingLastApparition
 time struct of the last appartition of an agent More...
 
double dThresholdDisparition
 timing maximal of non-reconnaissance of a agent, after thath we consider the agent as absent More...
 
Mutex m
 

Static Protected Attributes

static clickType clicked =idle
 clicked type of object: left, right or nothing More...
 
static float clickX =0.0F
 
static float clickY =0.0F
 float value of clicked coordinate in x and y axes More...
 

Member Function Documentation

◆ checkCalibration()

bool AgentDetector::checkCalibration ( )

Definition at line 205 of file AgentDetector.cpp.

◆ click_callback()

static void AgentDetector::click_callback ( int  event,
int  x,
int  y,
int  flags,
void *  param 
)
inlinestatic

Definition at line 143 of file AgentDetector.h.

◆ close()

bool AgentDetector::close ( )

Definition at line 234 of file AgentDetector.cpp.

◆ configure()

bool AgentDetector::configure ( ResourceFinder &  rf)

Definition at line 28 of file AgentDetector.cpp.

◆ getIdentity()

string AgentDetector::getIdentity ( Player  p)

getIdentity Obtain identity of partner

Parameters
pA kinectWrapper Player struct of partner
Returns
string value of obtained identity

Definition at line 606 of file AgentDetector.cpp.

◆ getPeriod()

double AgentDetector::getPeriod ( )

Definition at line 285 of file AgentDetector.cpp.

◆ getSkeletonPattern()

Vector AgentDetector::getSkeletonPattern ( Player  p)

getSkeletonPattern Obtain some properties of partner skeleton, such as eblow, shoulder, head position and size

Parameters
pA kinectWrapper Player struct of partner
Returns
Yarp Vector contains properties

Definition at line 591 of file AgentDetector.cpp.

◆ respond()

bool AgentDetector::respond ( const Bottle &  cmd,
Bottle &  reply 
)

Definition at line 259 of file AgentDetector.cpp.

◆ setIdentity()

void AgentDetector::setIdentity ( Player  p,
string  name 
)

setIdentity Set identity to a partner

Parameters
pA kinectWrapper Player struct of partner
namestring value of parner's name

◆ showImageParser()

bool AgentDetector::showImageParser ( string &  mode,
string &  submode 
)
protected

Definition at line 10 of file AgentDetector.cpp.

◆ transform2IR()

Vector AgentDetector::transform2IR ( Vector  v)

transform2IR Transform a position to IR reference frame

Parameters
vYarp Vector of position
Returns
Yarp Vector of position in IR reference frame

Definition at line 643 of file AgentDetector.cpp.

◆ updateModule()

bool AgentDetector::updateModule ( )

Definition at line 290 of file AgentDetector.cpp.

Member Data Documentation

◆ agentLocOutPort

yarp::os::BufferedPort<Bottle> AgentDetector::agentLocOutPort
protected

Output Yarp Buffered Port of Bottle contains agent location.

Definition at line 64 of file AgentDetector.h.

◆ clicked

clickType AgentDetector::clicked =idle
staticprotected

clicked type of object: left, right or nothing

Definition at line 85 of file AgentDetector.h.

◆ clickX

float AgentDetector::clickX =0.0F
staticprotected

Definition at line 86 of file AgentDetector.h.

◆ clickY

float AgentDetector::clickY =0.0F
staticprotected

float value of clicked coordinate in x and y axes

Definition at line 86 of file AgentDetector.h.

◆ client

KinectWrapperClient AgentDetector::client
protected

kinect wrapper client object

Definition at line 50 of file AgentDetector.h.

◆ depth

ImageOf<PixelMono16> AgentDetector::depth
protected

depth image in a Yarp format

Definition at line 52 of file AgentDetector.h.

◆ depthPort

yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelFloat> > AgentDetector::depthPort
protected

Output Yarp Buffered Port of images contains depth information.

Definition at line 60 of file AgentDetector.h.

◆ depthTmp

IplImage* AgentDetector::depthTmp
protected

Definition at line 56 of file AgentDetector.h.

◆ depthToDisplay

ImageOf<PixelFloat> AgentDetector::depthToDisplay
protected

depth image to display in a Yarp format

Definition at line 53 of file AgentDetector.h.

◆ dSince

double AgentDetector::dSince
protected

double value of timers

Definition at line 92 of file AgentDetector.h.

◆ dThresholdDisparition

double AgentDetector::dThresholdDisparition
protected

timing maximal of non-reconnaissance of a agent, after thath we consider the agent as absent

Definition at line 95 of file AgentDetector.h.

◆ dTimingLastApparition

unsigned long AgentDetector::dTimingLastApparition
protected

time struct of the last appartition of an agent

Definition at line 94 of file AgentDetector.h.

◆ handleMultiplePlayers

bool AgentDetector::handleMultiplePlayers
protected

boolean value for multiple players or not, if not, obtain only the closest player

Definition at line 69 of file AgentDetector.h.

◆ icub2ir

Matrix AgentDetector::icub2ir
protected

Definition at line 82 of file AgentDetector.h.

◆ identities

map<int, string> AgentDetector::identities
protected

Definition at line 90 of file AgentDetector.h.

◆ imagePort

yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb> > AgentDetector::imagePort
protected

Output Yarp Buffered Port of images contains images.

Definition at line 61 of file AgentDetector.h.

◆ isCalibrated

bool AgentDetector::isCalibrated
protected

boolean value to check if the kinect is calibrated or not

Definition at line 80 of file AgentDetector.h.

◆ isMounted

bool AgentDetector::isMounted
protected

boolean value to check if the IR is mounted or not

Definition at line 79 of file AgentDetector.h.

◆ joint

Player AgentDetector::joint
protected

Definition at line 70 of file AgentDetector.h.

◆ joints

deque<Player> AgentDetector::joints
protected

Definition at line 71 of file AgentDetector.h.

◆ kinect2icub

Matrix AgentDetector::kinect2icub
protected

conversion matrix from kinect frame to icub frame

Definition at line 81 of file AgentDetector.h.

◆ m

Mutex AgentDetector::m
protected

Definition at line 97 of file AgentDetector.h.

◆ opc

OPCClient* AgentDetector::opc
protected

OPC client object.

Definition at line 76 of file AgentDetector.h.

◆ outputSkeletonPort

yarp::os::BufferedPort<Bottle> AgentDetector::outputSkeletonPort
protected

Output Yarp Buffered Port of Bottle contains skeleton properties.

Definition at line 59 of file AgentDetector.h.

◆ partner

Agent* AgentDetector::partner
protected

human as an agent object

Definition at line 89 of file AgentDetector.h.

◆ partner_default_name

string AgentDetector::partner_default_name
protected

string value of default name of partner

Definition at line 73 of file AgentDetector.h.

◆ period

double AgentDetector::period
protected

Definition at line 66 of file AgentDetector.h.

◆ players

Matrix AgentDetector::players
protected

Definition at line 72 of file AgentDetector.h.

◆ playersImage

ImageOf<PixelBgr> AgentDetector::playersImage
protected

partner image in a Yarp format

Definition at line 54 of file AgentDetector.h.

◆ playersPort

yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelBgr> > AgentDetector::playersPort
protected

Output Yarp Buffered Port of partner images.

Definition at line 62 of file AgentDetector.h.

◆ pointsCnt

int AgentDetector::pointsCnt
protected

integer of number of points

Definition at line 84 of file AgentDetector.h.

◆ rfh

Port AgentDetector::rfh
protected

port to referenceFrameHandler

Definition at line 77 of file AgentDetector.h.

◆ rgb

ImageOf<PixelRgb> AgentDetector::rgb
protected

Definition at line 51 of file AgentDetector.h.

◆ rgbTmp

IplImage* AgentDetector::rgbTmp
protected

Definition at line 57 of file AgentDetector.h.

◆ rpc

Port AgentDetector::rpc
protected

rpc server port to receive requests

Definition at line 78 of file AgentDetector.h.

◆ showImages

bool AgentDetector::showImages
protected

Definition at line 67 of file AgentDetector.h.

◆ showMode

string AgentDetector::showMode
protected

string value of show mode of module: rgb, depth, skeleton, players

Definition at line 68 of file AgentDetector.h.

◆ skeletonImage

ImageOf<PixelBgr> AgentDetector::skeletonImage
protected

skeleton imange in a Yarp format

Definition at line 55 of file AgentDetector.h.

◆ skeletonPatterns

map<string, Vector> AgentDetector::skeletonPatterns
protected

properties of skeleton obtained from kinect

Definition at line 91 of file AgentDetector.h.

◆ skeletonPort

yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelBgr> > AgentDetector::skeletonPort
protected

Output Yarp Buffered Port of skeleton images.

Definition at line 63 of file AgentDetector.h.

Enumeration Type Documentation

◆ clickType

enum clickType
Enumerator
idle 
clicked_left 
clicked_right 

Definition at line 38 of file AgentDetector.h.