Skip to content

Commit

Permalink
add interface_name to InterfaceDescription
Browse files Browse the repository at this point in the history
Co-authored-by: Sai Kishor Kothakota <[email protected]>
  • Loading branch information
mamueluth and saikishor committed Aug 19, 2024
1 parent 8555ac9 commit e8fa131
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions hardware_interface/include/hardware_interface/hardware_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ struct TransmissionInfo
struct InterfaceDescription
{
InterfaceDescription(const std::string & prefix_name_in, const InterfaceInfo & interface_info_in)
: prefix_name(prefix_name_in), interface_info(interface_info_in)
: prefix_name(prefix_name_in),
interface_info(interface_info_in),
interface_name(prefix_name + "/" + interface_info.name)
{
}

Expand All @@ -147,9 +149,16 @@ struct InterfaceDescription
*/
InterfaceInfo interface_info;

std::string get_name() const { return prefix_name + "/" + interface_info.name; }
/**
* Name of the interface
*/
std::string interface_name;

std::string get_prefix_name() const { return prefix_name; }

std::string get_interface_name() const { return interface_info.name; }

std::string get_interface_type() const { return interface_info.name; }
std::string get_name() const { return interface_name; }
};

/// This structure stores information about hardware defined in a robot's URDF.
Expand Down

0 comments on commit e8fa131

Please sign in to comment.