iCub-main
Loading...
Searching...
No Matches
eomcParser.cpp File Reference
#include <yarp/os/Bottle.h>
#include <algorithm>
#include <string.h>
#include <iostream>
#include <eomcParser.h>
#include <embObjMotionControlDefaults.h>
#include <yarp/os/LogStream.h>
#include "EoCommon.h"
#include "EOarray.h"
#include "EoProtocol.h"
#include "EoProtocolMN.h"
#include "EoProtocolMC.h"
#include "EoProtocolAS.h"
#include <vector>
Include dependency graph for eomcParser.cpp:

Go to the source code of this file.

Classes

struct  CtrlOutTypeInfo

Functions

void loadStrings (std::vector< std::string > &dest, const yarp::os::Bottle &source)
bool getCtrlOutTypeFromConfig (const std::string &configName, eOmc_ctrl_out_type_t &outType, std::string &description)
 A map of control output types from configuration strings to their enum values and descriptions.

Variables

static const std::map< std::string, CtrlOutTypeInfo > ctrlOutTypeConfigMap

Function Documentation

◆ getCtrlOutTypeFromConfig()

bool getCtrlOutTypeFromConfig ( const std::string & configName,
eOmc_ctrl_out_type_t & outType,
std::string & description )

A map of control output types from configuration strings to their enum values and descriptions.

NOTE: in this map the velocity output is mapped to eomc_ctrl_out_type_vel_pwm, and in the parse of velocitydirect control there is a check for the output required. If it is current, then the parse changes the output type to eomc_ctrl_out_type_vel_cur, otherwise it remains eomc_ctrl_out_type_vel_pwm.

Definition at line 72 of file eomcParser.cpp.

◆ loadStrings()

void loadStrings ( std::vector< std::string > & dest,
const yarp::os::Bottle & source )
inline

Definition at line 41 of file eomcParser.cpp.

Variable Documentation

◆ ctrlOutTypeConfigMap

const std::map<std::string, CtrlOutTypeInfo> ctrlOutTypeConfigMap
static
Initial value:
=
{
{std::string(eomc::ParamValues::outputType::n_a), {eomc_ctrl_out_type_n_a, "Not applicable / Not set"}},
{std::string(eomc::ParamValues::outputType::pwm), {eomc_ctrl_out_type_pwm, "PWM (Pulse Width Modulation)"}},
{std::string(eomc::ParamValues::outputType::velocity), {eomc_ctrl_out_type_vel_pwm, "Velocity control output"}},
{std::string(eomc::ParamValues::outputType::current), {eomc_ctrl_out_type_cur, "Current control output"}},
{std::string(eomc::ParamValues::outputType::vel_cur), {eomc_ctrl_out_type_vel_cur, "Velocity control output with inner current loop"}}
}

Definition at line 58 of file eomcParser.cpp.