Interface settings the way the robot interacts with the environment: basic interaction types are Stiff and Compliant. More...
#include <yarp/dev/ImplementInteractionMode.h>
Public Member Functions | |
ImplementInteractionMode (yarp::dev::IInteractionModeRaw *Class_p) | |
Constructor. More... | |
virtual | ~ImplementInteractionMode () |
Destructor. More... | |
bool | getInteractionMode (int axis, yarp::dev::InteractionModeEnum *mode) override |
Get the current interaction mode of the robot, values can be stiff or compliant. More... | |
bool | getInteractionModes (int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override |
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant. More... | |
bool | getInteractionModes (yarp::dev::InteractionModeEnum *modes) override |
Get the current interaction mode of the robot for a all the joints, values can be stiff or compliant. More... | |
bool | setInteractionMode (int axis, yarp::dev::InteractionModeEnum mode) override |
Set the interaction mode of the robot, values can be stiff or compliant. More... | |
bool | setInteractionModes (int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override |
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant. More... | |
bool | setInteractionModes (yarp::dev::InteractionModeEnum *modes) override |
Set the interaction mode of the robot for a all the joints, values can be stiff or compliant. More... | |
Public Member Functions inherited from yarp::dev::IInteractionMode | |
virtual | ~IInteractionMode () |
Destructor. More... | |
Protected Member Functions | |
bool | initialize (int size, const int *amap) |
Initialize the internal data and alloc memory, smaller version. More... | |
bool | initialize (int size, const int *amap, const double *enc, const double *zos) |
Initialize the internal data and alloc memory. More... | |
bool | uninitialize () |
Clean up internal data and memory. More... | |
Protected Attributes | |
yarp::dev::IInteractionModeRaw * | iInteraction |
void * | helper |
yarp::dev::impl::FixedSizeBuffersManager< yarp::dev::InteractionModeEnum > * | imodeBuffManager |
yarp::dev::impl::FixedSizeBuffersManager< int > * | intBuffManager |
Interface settings the way the robot interacts with the environment: basic interaction types are Stiff and Compliant.
This setting is intended to work in conjunction with other settings like position or velocity control.
Definition at line 40 of file ImplementInteractionMode.h.
ImplementInteractionMode::ImplementInteractionMode | ( | yarp::dev::IInteractionModeRaw * | Class_p | ) |
Constructor.
Class_p | is the pointer to the class instance inheriting from this implementation. |
Definition at line 20 of file ImplementInteractionMode.cpp.
|
virtual |
Destructor.
Perform uninitialize if needed.
Definition at line 28 of file ImplementInteractionMode.cpp.
|
overridevirtual |
Get the current interaction mode of the robot, values can be stiff or compliant.
axis | joint number |
mode | contains the requested information about interaction mode of the joint |
Implements yarp::dev::IInteractionMode.
Definition at line 87 of file ImplementInteractionMode.cpp.
|
overridevirtual |
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
n_joints | how many joints this command is referring to |
joints | list of joints controlled. The size of this array is n_joints |
modes | array containing the requested information about interaction mode, one value for each joint, the size is n_joints. for example: n_joint 3 joints 0 2 4 refs VOCAB_IM_STIFF VOCAB_IM_STIFF VOCAB_IM_COMPLIANT |
Implements yarp::dev::IInteractionMode.
Definition at line 93 of file ImplementInteractionMode.cpp.
|
overridevirtual |
Get the current interaction mode of the robot for a all the joints, values can be stiff or compliant.
mode | array containing the requested information about interaction mode, one value for each joint. |
Implements yarp::dev::IInteractionMode.
Definition at line 110 of file ImplementInteractionMode.cpp.
|
protected |
Initialize the internal data and alloc memory, smaller version.
Allocate memory for internal data.
size | is the number of controlled axes the driver deals with. |
amap | is a lookup table mapping axes onto physical drivers. |
size | the number of joints |
amap | axis map for this device wrapper |
Definition at line 39 of file ImplementInteractionMode.cpp.
|
protected |
Initialize the internal data and alloc memory.
size | is the number of controlled axes the driver deals with. |
amap | is a lookup table mapping axes onto physical drivers. |
enc | is an array containing the encoder to angles conversion factors. |
zos | is an array containing the zeros of the encoders. respect to the control/output values of the driver. |
Definition at line 44 of file ImplementInteractionMode.cpp.
|
overridevirtual |
Set the interaction mode of the robot, values can be stiff or compliant.
Please note that some robot may not implement certain types of interaction, so always check the return value.
axis | joint number |
mode | the desired interaction mode |
Implements yarp::dev::IInteractionMode.
Definition at line 127 of file ImplementInteractionMode.cpp.
|
overridevirtual |
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
Please note that some robot may not implement certain types of interaction, so always check the return value.
n_joints | how many joints this command is referring to |
joints | list of joints controlled. The size of this array is n_joints |
modes | array containing the desired interaction mode, one value for each joint, the size is n_joints. for example: n_joint 3 joints 0 2 4 refs VOCAB_IM_STIFF VOCAB_IM_STIFF VOCAB_IM_COMPLIANT |
Implements yarp::dev::IInteractionMode.
Definition at line 133 of file ImplementInteractionMode.cpp.
|
overridevirtual |
Set the interaction mode of the robot for a all the joints, values can be stiff or compliant.
Some robot may not implement some types of interaction, so always check the return value
mode | array with the desired interaction mode for all joints, length is the total number of joints for the part |
Implements yarp::dev::IInteractionMode.
Definition at line 149 of file ImplementInteractionMode.cpp.
|
protected |
Clean up internal data and memory.
Definition at line 65 of file ImplementInteractionMode.cpp.
|
protected |
Definition at line 44 of file ImplementInteractionMode.h.
|
protected |
Definition at line 43 of file ImplementInteractionMode.h.
|
protected |
Definition at line 46 of file ImplementInteractionMode.h.
|
protected |
Definition at line 47 of file ImplementInteractionMode.h.