class
TelemetryDeviceDumperThe telemetryDeviceDumper
is a yarp device that has to be launched through the yarprobotinterface
for dumping quantities from your robot(for example encoders, velocities etc) in base of what specified in the configuration.
Parameters
Parameter name | Type | Units | Default | Required | Description |
---|---|---|---|---|---|
axesNames | List of strings | - | - | Yes | The axes contained in the axesNames parameter are then mapped to the wrapped controlboard in the attachAll method, using controlBoardRemapper class. |
logIEncoders | bool | - | true | No | Enable the log of joints_state::positions , joints_state::velocities and joints_state::accelerations (http://yarp.it/git-master/classyarp_ |
logITorqueControl | bool | - | false | No | Enable the log of joints_state::torques (http://yarp.it/git-master/classyarp_ |
logIMotorEncoders | bool | - | false | No | Enable the log of motors_state::positions , motors_state::velocities and motors_state::accelerations (http://yarp.it/git-master/classyarp_ |
logIControlMode | bool | - | false | No | Enable the log of joints_state::control_mode (http://yarp.it/git-master/classyarp_ |
logIInteractionMode | bool | - | false | No | Enable the log of joints_state::interaction_mode (http://yarp.it/git-master/classyarp_ |
logIPidControl | bool | - | false | No | Enable the log of PIDs::position_error , PIDs::position_reference , PIDs::torque_error , PIDs::torque_reference (http://yarp.it/git-master/classyarp_ |
logIAmplifierControl | bool | - | false | No | Enable the log of motors_state::pwm and motors_state::currents (http://yarp.it/git-master/classyarp_ |
logControlBoardQuantities | bool | - | false | No | Enable the log of all the quantities that requires the attach to a control board (logIEncoders , logITorqueControl , logIMotorEncoders , logIControlMode , logIInteractionMode , logIPidControl , logIAmplifierControl ). |
logILocalization2D | bool | - | false | No | Enable the log of odometry_data (http://yarp.it/git-master/classyarp_ |
saveBufferManagerConfiguration | bool | - | false | No | Enable the save of the configuration of the BufferManager into path + "bufferConfig" + experimentName + ".json" |
json_file | string | - | - | No | Configure the robometry:: s reading from a json file like in Example configuration file. Note that this configuration will overwrite the parameter-by-parameter configuration |
experimentName | string | - | - | Yes | Prefix of the files that will be saved. The files will be named: experimentName +timestamp + ".mat" . |
path | string | - | - | No | Path of the folder where the data will be saved. |
n_samples | size_t | - | - | Yes | The max number of samples contained in the circular buffer/s |
save_periodically | bool | - | false | No(but it has to be set to true if auto_save is set to false) | The flag for enabling the periodic save thread. |
save_period | double | seconds | - | Yes(if save_periodically is set to true) | The period in seconds of the save thread |
data_threshold | size_t | - | 0 | No | The save thread saves to a file if there are at least data_threshold samples |
auto_save | bool | - | false | No(but it has to be set to true if save_periodically is set to false) | the flag for enabling the save in the destructor of the robometry:: |
yarp_robot_name | string | - | "" | No | Name of the robot used during the experiment. |
Mapping .mat variables -> YARP interfaces
Variable name | YARP interface |
---|---|
joints_state::positions | yarp::dev::IEncoders::getEncoders |
joints_state::velocities | yarp::dev::IEncoders::getEncoderSpeeds |
joints_state::accelerations | yarp::dev::IEncoders::getEncoderAccelerations |
motors_state::positions | yarp::dev::IMotorEncoders::getMotorEncoders |
motors_state::velocities | yarp::dev::IMotorEncoders::getMotorEncoderSpeeds |
motors_state::accelerations | yarp::dev::IMotorEncoders::getMotorEncoderAccelerations |
joints_state::control_mode | yarp::dev::IControlMode::getControlModes |
joints_state::interaction_mode | yarp::dev::IInteractionMode::getInteractionModes |
PIDs::position_error | yarp::dev::IPidControl::getPidErrors |
PIDs::position_reference | yarp::dev::IPidControl::getPidReferences |
PIDs::torque_error | yarp::dev::IPidControl::getPidErrors |
PIDs::torque_reference | yarp::dev::IPidControl::getPidReferences |
PIDs::odometry_data | yarp::dev::Nav2D::ILocalization2D::getEstimatedOdometry |
Example of xml
Example of xml file for using it on the iCub
robot:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> <device xmlns:xi="http://www.w3.org/2001/XInclude" name="telemetryDeviceDumper" type="telemetryDeviceDumper"> <param name="axesNames">(torso_pitch,torso_roll,torso_yaw,neck_pitch, neck_roll,neck_yaw,l_shoulder_pitch,l_shoulder_roll,l_shoulder_yaw,l_elbow,l_wrist_prosup,l_wrist_pitch,l_wrist_yaw,r_shoulder_pitch,r_shoulder_roll,r_shoulder_yaw,r_elbow,r_wrist_prosup,r_wrist_pitch,r_wrist_yaw,l_hip_pitch,l_hip_roll,l_hip_yaw,l_knee,l_ankle_pitch,l_ankle_roll,r_hip_pitch,r_hip_roll,r_hip_yaw,r_knee,r_ankle_pitch,r_ankle_roll)</param> <param name="logIEncoders">true</param> <param name="logITorqueControl">true</param> <param name="logIMotorEncoders">true</param> <param name="logIControlMode">true</param> <param name="logIInteractionMode">true</param> <param name="logIPidControl">false</param> <param name="logIAmplifierControl">true</param> <param name="saveBufferManagerConfiguration">true</param> <param name="experimentName">test_telemetry</param> <param name="path">/home/icub/test_telemetry/</param> <param name="n_samples">100000</param> <param name="save_periodically">true</param> <param name="save_period">120.0</param> <param name="data_threshold">300</param> <param name="auto_save">true</param> <action phase="startup" level="15" type="attach"> <paramlist name="networks"> <!-- motorcontrol and virtual torque sensors --> <elem name="left_lower_leg">left_leg-eb7-j4_5-mc</elem> <elem name="right_lower_leg">right_leg-eb9-j4_5-mc</elem> <elem name="left_upper_leg">left_leg-eb6-j0_3-mc</elem> <elem name="right_upper_leg">right_leg-eb8-j0_3-mc</elem> <elem name="torso">torso-eb5-j0_2-mc</elem> <elem name="right_lower_arm">right_arm-eb27-j4_7-mc</elem> <elem name="left_lower_arm">left_arm-eb24-j4_7-mc</elem> <elem name="right_upper_arm">right_arm-eb3-j0_3-mc</elem> <elem name="left_upper_arm">left_arm-eb1-j0_3-mc</elem> <elem name="head-j0">head-eb20-j0_1-mc</elem> <elem name="head-j2">head-eb21-j2_5-mc</elem> <!-- ft --> </paramlist> </action> <action phase="shutdown" level="2" type="detach" /> </device>
Constructors, destructors, conversion operators
- TelemetryDeviceDumper()
- ~TelemetryDeviceDumper() override
Public functions
Public variables
Function documentation
bool robometry:: TelemetryDeviceDumper:: open(yarp::os::Searchable& config) override
Configure with a set of options.
Parameters | |
---|---|
config | The options to use |
Returns | true iff the object could be configured. |