FancySafeBot 0.0.1
A safe robotics library
Loading...
Searching...
No Matches
fsb::urdf::UrdfNameMap Class Reference

Detailed Description

Name-index map of joints and bodies in rigid body tree.

#include <fsb_urdf_name_map.h>

Collaboration diagram for fsb::urdf::UrdfNameMap:
Collaboration graph

Public Member Functions

void set_robot_name (const std::string &name)
 Set robot name.
 
NameMapError add_body (const size_t index, const std::string &name)
 
NameMapError add_joint (const size_t index, const std::string &name)
 
size_t get_body_index (const std::string &name, NameMapError &err) const
 Get index of body in tree.
 
size_t get_joint_index (const std::string &name, NameMapError &err) const
 Get index of joint in body tree.
 
bool body_exists (const std::string &name) const
 Check if body name is set in map.
 
bool joint_exists (const std::string &name) const
 Check if joint name is set in map.
 
size_t get_num_bodies () const
 Get number of bodies in map.
 
size_t get_num_joints () const
 Get number of joints in map.
 

Member Function Documentation

◆ add_body()

NameMapError fsb::urdf::UrdfNameMap::add_body ( const size_t  index,
const std::string &  name 
)
inline
Parameters
indexBody index in tree
nameBody name
Returns
Error result of operation

◆ add_joint()

NameMapError fsb::urdf::UrdfNameMap::add_joint ( const size_t  index,
const std::string &  name 
)
inline
Parameters
indexJoint index in tree
nameJoint name
Returns
Error result of operation

◆ body_exists()

bool fsb::urdf::UrdfNameMap::body_exists ( const std::string &  name) const
inline

Check if body name is set in map.

Parameters
nameName of body to check
Returns
true if body exists in map

◆ get_body_index()

size_t fsb::urdf::UrdfNameMap::get_body_index ( const std::string &  name,
NameMapError err 
) const
inline

Get index of body in tree.

Parameters
nameBody name
errError status
Returns
Index of body in body tree

◆ get_joint_index()

size_t fsb::urdf::UrdfNameMap::get_joint_index ( const std::string &  name,
NameMapError err 
) const
inline

Get index of joint in body tree.

Parameters
nameJoint name
errError status
Returns
Index of joint in body tree

◆ get_num_bodies()

size_t fsb::urdf::UrdfNameMap::get_num_bodies ( ) const
inline

Get number of bodies in map.

Returns
Number of bodies in map

◆ get_num_joints()

size_t fsb::urdf::UrdfNameMap::get_num_joints ( ) const
inline

Get number of joints in map.

Returns
Number of joints in map

◆ joint_exists()

bool fsb::urdf::UrdfNameMap::joint_exists ( const std::string &  name) const
inline

Check if joint name is set in map.

Parameters
nameName of joint to check
Returns
true if joint exists in map

◆ set_robot_name()

void fsb::urdf::UrdfNameMap::set_robot_name ( const std::string &  name)
inline

Set robot name.

Parameters
nameRobot name

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