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

Map from joint names to joint ids. More...

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

Static Public Member Functions

static std::map< unsigned int, JointLimitscreate_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 JointLimits 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, JointLimitsid_2_limits = JointUtil::create_id_2_limits_map()
 
static const std::map< unsigned int, std::string > id_2_name = JointUtil::create_id_2_name_map(JointUtil::name_2_id)
 
static const std::map< std::string, unsigned int > name_2_id = JointUtil::create_name_2_id_map()
 

Detailed Description

Map from joint names to joint ids.

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

Member Function Documentation

◆ create_id_2_limits_map()

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

Definition at line 105 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 179 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 142 of file talos-common.hh.

◆ get_id_from_name()

static int get_id_from_name ( std::string  name)
inlinestatic

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

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

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

◆ get_limits_from_id()

static JointLimits get_limits_from_id ( unsigned int  id)
inlinestatic

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

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

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

◆ get_name_from_id()

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

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

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

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

Member Data Documentation

◆ id_2_limits

const std::map< unsigned int, JointLimits > id_2_limits = JointUtil::create_id_2_limits_map()
static

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

◆ id_2_name

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

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

◆ name_2_id

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

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


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