Visual Servoing Platform  version 3.5.1 under development (2022-08-17)
vpMocap Class Referenceabstract

#include <visp3/sensor/vpMocap.h>

+ Inheritance diagram for vpMocap:

Public Member Functions

 vpMocap ()
 
virtual ~vpMocap ()
 
virtual void close ()=0
 
virtual bool connect ()=0
 
virtual bool getBodiesPose (std::map< std::string, vpHomogeneousMatrix > &bodies_pose, bool all_bodies=false)=0
 
virtual bool getSpecificBodyPose (const std::string &body_name, vpHomogeneousMatrix &body_pose)=0
 
virtual void setServerAddress (const std::string &serverAddr)
 
virtual void setVerbose (bool verbose)
 

Protected Attributes

bool m_verbose
 
std::string m_serverAddr
 

Detailed Description

Generic motion capture wrapper.

Definition at line 49 of file vpMocap.h.

Constructor & Destructor Documentation

◆ vpMocap()

vpMocap::vpMocap ( )
inline

Default constructor that turns off the verbose mode.

Definition at line 55 of file vpMocap.h.

◆ ~vpMocap()

virtual vpMocap::~vpMocap ( )
inlinevirtual

Destructor.

Definition at line 59 of file vpMocap.h.

Member Function Documentation

◆ close()

virtual void vpMocap::close ( )
pure virtual

Close connexion with the motion capture device.

Implemented in vpMocapQualisys, and vpMocapVicon.

◆ connect()

virtual bool vpMocap::connect ( )
pure virtual

Connect to the motion capture device which address is specified using setServerAddress().

See also
close(), setServerAddress()

Implemented in vpMocapQualisys, and vpMocapVicon.

◆ getBodiesPose()

virtual bool vpMocap::getBodiesPose ( std::map< std::string, vpHomogeneousMatrix > &  bodies_pose,
bool  all_bodies = false 
)
pure virtual

Get the bodies pose.

Parameters
[out]bodies_pose: Map of bodies pose.
[in]all_bodies: When true consider all the bodies, even those that are not visible and that may contain nan in their pose.
Returns
true when success, false otherwise.

Implemented in vpMocapQualisys, and vpMocapVicon.

◆ getSpecificBodyPose()

virtual bool vpMocap::getSpecificBodyPose ( const std::string &  body_name,
vpHomogeneousMatrix body_pose 
)
pure virtual

Get the pose of a specific body.

Parameters
[in]body_name: Name of the body to consider.
[out]body_pose: Body pose.
Returns
true when success, false otherwise.

Implemented in vpMocapQualisys, and vpMocapVicon.

◆ setServerAddress()

virtual void vpMocap::setServerAddress ( const std::string &  serverAddr)
inlinevirtual

Set mocap server address.

Parameters
[in]serverAddr: Server address.
See also
connect()

Reimplemented in vpMocapQualisys, and vpMocapVicon.

Definition at line 95 of file vpMocap.h.

◆ setVerbose()

virtual void vpMocap::setVerbose ( bool  verbose)
inlinevirtual

Enable or disable verbose mode.

Parameters
[in]verbose: When true enable verbose mode, otherwise disable verbose mode.

Reimplemented in vpMocapQualisys, and vpMocapVicon.

Definition at line 101 of file vpMocap.h.

Member Data Documentation

◆ m_serverAddr

std::string vpMocap::m_serverAddr
protected

Definition at line 105 of file vpMocap.h.

◆ m_verbose

bool vpMocap::m_verbose
protected

Definition at line 104 of file vpMocap.h.