Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod
return opt_value.value();
}

void set_command(const std::string & interface_name, const double & value)
template <typename T>
void set_command(const std::string & interface_name, const T & value)
{
auto it = actuator_commands_.find(interface_name);
if (it == actuator_commands_.end())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ class LoanedCommandInterface
return std::nullopt;
}

/**
* @brief Get the data type of the command interface.
* @return The data type of the command interface.
*/
HandleDataType get_data_type() const { return command_interface_.get_data_type(); }

protected:
CommandInterface & command_interface_;
Deleter deleter_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ class LoanedStateInterface
return std::nullopt;
}

/**
* @brief Get the data type of the state interface.
* @return The data type of the state interface.
*/
HandleDataType get_data_type() const { return state_interface_.get_data_type(); }

protected:
const StateInterface & state_interface_;
Deleter deleter_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
return opt_value.value();
}

void set_command(const std::string & interface_name, const double & value)
template <typename T>
void set_command(const std::string & interface_name, const T & value)
{
auto it = system_commands_.find(interface_name);
if (it == system_commands_.end())
Expand Down
Loading