YARP
Yet Another Robot Platform
ControlBoardArbitraryAxesDecomposition Class Reference

Class storing the decomposition of a subset of the total remapped axes of the remapped controlboard in the corresponding subsets of the axes of the SubControlBoard. More...

#include <ControlBoardRemapper/ControlBoardRemapperHelpers.h>

Public Member Functions

bool configure (const RemappedControlBoards &remappedControlBoards)
 Resize the buffers using the information in the RemappedControlBoards. More...
 
void fillSubControlBoardBuffersFromArbitraryJointVector (const double *arbitraryVec, const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Fill buffers for the SubControlBoard from a vector of joints of the RemappedControlBoards. More...
 
void fillSubControlBoardBuffersFromArbitraryJointVector (const int *arbitraryVec, const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Fill buffers for the SubControlBoard from a vector of joints of the RemappedControlBoards (Version for ControlModes methods) More...
 
void fillSubControlBoardBuffersFromArbitraryJointVector (const yarp::dev::InteractionModeEnum *arbitraryVec, const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Fill buffers for the SubControlBoard from a vector of joints of the RemappedControlBoards (Version for InteractionModes methods) More...
 
void resizeSubControlBoardBuffers (const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Resize buffers to have the dimension of specified by the method (used for multi joint methods that read the data from the subcontrolboards). More...
 
void fillArbitraryJointVectorFromSubControlBoardBuffers (double *arbitraryVec, const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Fill a vector of joints of the ControlBoardRemapper from the buffers of the SubControlBoard . More...
 
void fillArbitraryJointVectorFromSubControlBoardBuffers (int *arbitraryVec, const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Fill a vector of joints of the ControlBoardRemapper from the buffers of the SubControlBoard . More...
 
void fillArbitraryJointVectorFromSubControlBoardBuffers (yarp::dev::InteractionModeEnum *arbitraryVec, const int n_joints, const int *joints, const RemappedControlBoards &remappedControlBoards)
 Fill a vector of joints of the ControlBoardRemapper from the buffers of the SubControlBoard . More...
 

Public Attributes

std::mutex mutex
 Mutex to grab to use this class. More...
 
int m_nrOfControlledAxesInRemappedCtrlBrd
 
std::vector< int > m_nJointsInSubControlBoard
 
std::vector< std::vector< int > > m_jointsInSubControlBoard
 
std::vector< std::vector< double > > m_bufferForSubControlBoard
 
std::vector< std::vector< int > > m_bufferForSubControlBoardControlModes
 
std::vector< std::vector< yarp::dev::InteractionModeEnum > > m_bufferForSubControlBoardInteractionModes
 
std::vector< int > m_counterForControlBoard
 

Detailed Description

Class storing the decomposition of a subset of the total remapped axes of the remapped controlboard in the corresponding subsets of the axes of the SubControlBoard.

This class is meant to be used when implementing multiple joint methods (the one with the signature const int n_joints, const int *joints, double *dpos )

Definition at line 243 of file ControlBoardRemapperHelpers.h.

Member Function Documentation

◆ configure()

bool ControlBoardArbitraryAxesDecomposition::configure ( const RemappedControlBoards remappedControlBoards)

Resize the buffers using the information in the RemappedControlBoards.

Definition at line 356 of file ControlBoardRemapperHelpers.cpp.

◆ fillArbitraryJointVectorFromSubControlBoardBuffers() [1/3]

void ControlBoardArbitraryAxesDecomposition::fillArbitraryJointVectorFromSubControlBoardBuffers ( double *  arbitraryVec,
const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Fill a vector of joints of the ControlBoardRemapper from the buffers of the SubControlBoard .

Before calling this method you should have called the resizeSubControlBoardBuffers method.

Definition at line 402 of file ControlBoardRemapperHelpers.cpp.

◆ fillArbitraryJointVectorFromSubControlBoardBuffers() [2/3]

void ControlBoardArbitraryAxesDecomposition::fillArbitraryJointVectorFromSubControlBoardBuffers ( int *  arbitraryVec,
const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Fill a vector of joints of the ControlBoardRemapper from the buffers of the SubControlBoard .

Before calling this method you should have called the resizeSubControlBoardBuffers method. (Version for ControlModes methods)

Definition at line 441 of file ControlBoardRemapperHelpers.cpp.

◆ fillArbitraryJointVectorFromSubControlBoardBuffers() [3/3]

void ControlBoardArbitraryAxesDecomposition::fillArbitraryJointVectorFromSubControlBoardBuffers ( yarp::dev::InteractionModeEnum arbitraryVec,
const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Fill a vector of joints of the ControlBoardRemapper from the buffers of the SubControlBoard .

Before calling this method you should have called the resizeSubControlBoardBuffers method. (Version for InteractionModes methods)

Definition at line 480 of file ControlBoardRemapperHelpers.cpp.

◆ fillSubControlBoardBuffersFromArbitraryJointVector() [1/3]

void ControlBoardArbitraryAxesDecomposition::fillSubControlBoardBuffersFromArbitraryJointVector ( const double *  arbitraryVec,
const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Fill buffers for the SubControlBoard from a vector of joints of the RemappedControlBoards.

Definition at line 421 of file ControlBoardRemapperHelpers.cpp.

◆ fillSubControlBoardBuffersFromArbitraryJointVector() [2/3]

void ControlBoardArbitraryAxesDecomposition::fillSubControlBoardBuffersFromArbitraryJointVector ( const int *  arbitraryVec,
const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Fill buffers for the SubControlBoard from a vector of joints of the RemappedControlBoards (Version for ControlModes methods)

Definition at line 460 of file ControlBoardRemapperHelpers.cpp.

◆ fillSubControlBoardBuffersFromArbitraryJointVector() [3/3]

void ControlBoardArbitraryAxesDecomposition::fillSubControlBoardBuffersFromArbitraryJointVector ( const yarp::dev::InteractionModeEnum arbitraryVec,
const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Fill buffers for the SubControlBoard from a vector of joints of the RemappedControlBoards (Version for InteractionModes methods)

Definition at line 499 of file ControlBoardRemapperHelpers.cpp.

◆ resizeSubControlBoardBuffers()

void ControlBoardArbitraryAxesDecomposition::resizeSubControlBoardBuffers ( const int  n_joints,
const int *  joints,
const RemappedControlBoards remappedControlBoards 
)

Resize buffers to have the dimension of specified by the method (used for multi joint methods that read the data from the subcontrolboards).

Definition at line 539 of file ControlBoardRemapperHelpers.cpp.

Member Data Documentation

◆ m_bufferForSubControlBoard

std::vector< std::vector<double> > ControlBoardArbitraryAxesDecomposition::m_bufferForSubControlBoard

Definition at line 343 of file ControlBoardRemapperHelpers.h.

◆ m_bufferForSubControlBoardControlModes

std::vector< std::vector<int> > ControlBoardArbitraryAxesDecomposition::m_bufferForSubControlBoardControlModes

Definition at line 344 of file ControlBoardRemapperHelpers.h.

◆ m_bufferForSubControlBoardInteractionModes

std::vector< std::vector<yarp::dev::InteractionModeEnum> > ControlBoardArbitraryAxesDecomposition::m_bufferForSubControlBoardInteractionModes

Definition at line 345 of file ControlBoardRemapperHelpers.h.

◆ m_counterForControlBoard

std::vector<int> ControlBoardArbitraryAxesDecomposition::m_counterForControlBoard

Definition at line 350 of file ControlBoardRemapperHelpers.h.

◆ m_jointsInSubControlBoard

std::vector< std::vector<int> > ControlBoardArbitraryAxesDecomposition::m_jointsInSubControlBoard

Definition at line 338 of file ControlBoardRemapperHelpers.h.

◆ m_nJointsInSubControlBoard

std::vector<int> ControlBoardArbitraryAxesDecomposition::m_nJointsInSubControlBoard

Definition at line 337 of file ControlBoardRemapperHelpers.h.

◆ m_nrOfControlledAxesInRemappedCtrlBrd

int ControlBoardArbitraryAxesDecomposition::m_nrOfControlledAxesInRemappedCtrlBrd

Definition at line 334 of file ControlBoardRemapperHelpers.h.

◆ mutex

std::mutex ControlBoardArbitraryAxesDecomposition::mutex

Mutex to grab to use this class.

Definition at line 331 of file ControlBoardRemapperHelpers.h.


The documentation for this class was generated from the following files: