diff --git a/hardware_interface/include/hardware_interface/handle.hpp b/hardware_interface/include/hardware_interface/handle.hpp index 2b2372176f..a73b28b4c0 100644 --- a/hardware_interface/include/hardware_interface/handle.hpp +++ b/hardware_interface/include/hardware_interface/handle.hpp @@ -35,6 +35,9 @@ class Handle { } + /// \brief returns true if handle references a value + inline operator bool() const {return value_ptr_ != nullptr;} + HARDWARE_INTERFACE_PUBLIC HandleType with_value_ptr(double * value_ptr) { diff --git a/joint_limits_interface/include/joint_limits_interface/joint_limits_interface.hpp b/joint_limits_interface/include/joint_limits_interface/joint_limits_interface.hpp index a4f893bc11..aeed166bef 100644 --- a/joint_limits_interface/include/joint_limits_interface/joint_limits_interface.hpp +++ b/joint_limits_interface/include/joint_limits_interface/joint_limits_interface.hpp @@ -54,9 +54,9 @@ #include "joint_limits_interface/joint_limits_interface_exception.hpp" -#define DEFAULT_POSITION_HANDLE { std::string(), "position" } -#define DEFAULT_VELOCITY_HANDLE { std::string(), "velocity" } -#define DEFAULT_COMMAND_HANDLE { std::string(), "position_command" } +#define DEFAULT_POSITION_HANDLE {std::string(), "position"} +#define DEFAULT_VELOCITY_HANDLE {std::string(), "velocity"} +#define DEFAULT_COMMAND_HANDLE {std::string(), "position_command"} namespace joint_limits_interface {