talos-torque-control  1.1.0
Collection of dynamic-graph entities aiming at the implementation of torque control on TALOS.
ForceUtil Struct Reference

Map from force names to force ids. More...

#include <sot/torque-control/talos-common.hh>

Static Public Member Functions

static std::map< unsigned int, ForceLimitscreate_id_2_limits_map ()
 
static std::map< unsigned int, std::string > create_id_2_name_map (const std::map< std::string, unsigned int > &name_2_id_map)
 
static std::map< std::string, unsigned int > create_name_2_id_map ()
 
static int get_id_from_name (std::string name)
 
static ForceLimits get_limits_from_id (unsigned int id)
 
static std::string get_name_from_id (unsigned int id)
 

Static Public Attributes

static const std::map< unsigned int, ForceLimitsid_2_limits = ForceUtil::create_id_2_limits_map()
 
static const std::map< unsigned int, std::string > id_2_name = ForceUtil::create_id_2_name_map(ForceUtil::name_2_id)
 
static const std::map< std::string, unsigned int > name_2_id = ForceUtil::create_name_2_id_map()
 

Detailed Description

Map from force names to force ids.

Definition at line 254 of file talos-common.hh.

Member Function Documentation

◆ create_id_2_limits_map()

static std::map<unsigned int, ForceLimits> create_id_2_limits_map ( )
inlinestatic

Definition at line 255 of file talos-common.hh.

◆ create_id_2_name_map()

static std::map<unsigned int, std::string> create_id_2_name_map ( const std::map< std::string, unsigned int > &  name_2_id_map)
inlinestatic

Definition at line 276 of file talos-common.hh.

◆ create_name_2_id_map()

static std::map<std::string, unsigned int> create_name_2_id_map ( )
inlinestatic

Definition at line 267 of file talos-common.hh.

◆ get_id_from_name()

static int get_id_from_name ( std::string  name)
inlinestatic

Given a force name it finds the associated id. If the specified force name is not found it returns -1;

Parameters
nameName of the force to find.
Returns
The id of the specified force, -1 if not found.

Definition at line 289 of file talos-common.hh.

◆ get_limits_from_id()

static ForceLimits get_limits_from_id ( unsigned int  id)
inlinestatic

Given a force id it finds the associated limits. If the specified force is not found it returns ForceLimits(0,0).

Parameters
idId of the force to find.
Returns
The limits of the specified force, ForceLimits(0,0) if not found.

Definition at line 311 of file talos-common.hh.

◆ get_name_from_id()

static std::string get_name_from_id ( unsigned int  id)
inlinestatic

Given a force id it finds the associated name. If the specified force is not found it returns "Force name not found";

Parameters
idId of the force to find.
Returns
The name of the specified force, "Force name not found" if not found.

Definition at line 300 of file talos-common.hh.

Member Data Documentation

◆ id_2_limits

const std::map< unsigned int, ForceLimits > id_2_limits = ForceUtil::create_id_2_limits_map()
static

Definition at line 320 of file talos-common.hh.

◆ id_2_name

const std::map< unsigned int, std::string > id_2_name = ForceUtil::create_id_2_name_map(ForceUtil::name_2_id)
static

Definition at line 319 of file talos-common.hh.

◆ name_2_id

const std::map< std::string, unsigned int > name_2_id = ForceUtil::create_name_2_id_map()
static

Definition at line 318 of file talos-common.hh.


The documentation for this struct was generated from the following file: