Visual Servoing Platform  version 3.6.1 under development (2024-12-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 50 of file vpMocap.h.

Constructor & Destructor Documentation

◆ vpMocap()

vpMocap::vpMocap ( )
inline

Default constructor that turns off the verbose mode.

Definition at line 56 of file vpMocap.h.

◆ ~vpMocap()

virtual vpMocap::~vpMocap ( )
inlinevirtual

Destructor.

Definition at line 60 of file vpMocap.h.

Member Function Documentation

◆ close()

virtual void vpMocap::close ( )
pure virtual

Close connexion with the motion capture device.

Implemented in vpMocapVicon, and vpMocapQualisys.

◆ 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 vpMocapVicon, and vpMocapQualisys.

◆ 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 vpMocapVicon, and vpMocapQualisys.

◆ 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 vpMocapVicon, and vpMocapQualisys.

◆ setServerAddress()

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

Set mocap server address.

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

Reimplemented in vpMocapVicon, and vpMocapQualisys.

Definition at line 96 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 vpMocapVicon, and vpMocapQualisys.

Definition at line 102 of file vpMocap.h.

Member Data Documentation

◆ m_serverAddr

std::string vpMocap::m_serverAddr
protected

Definition at line 106 of file vpMocap.h.

◆ m_verbose

bool vpMocap::m_verbose
protected

Definition at line 105 of file vpMocap.h.