Go to the documentation of this file.
3 #include <ArmarXGui/interface/RemoteGuiInterface.h>
12 Vector3f
toIceF(Eigen::Vector3f
v);
14 Vector3i
toIceI(Eigen::Vector3i
v);
34 template <ValueVariantType Type_>
37 using Type = std::nullptr_t;
67 using Type = Eigen::Vector3f;
82 inline std::nullptr_t getSingleValue<std::nullptr_t>(RemoteGui::ValueVariant
const&
value,
const std::string& name)
92 if (
value.type != VALUE_VARIANT_BOOL)
94 throw LocalException()
95 <<
"Expected type 'bool' but got type '"
105 if (
value.type != VALUE_VARIANT_INT)
107 throw LocalException()
108 <<
"Expected type 'int' but got type '"
118 if (
value.type != VALUE_VARIANT_FLOAT)
120 throw LocalException()
121 <<
"Expected type 'float' but got type '"
128 inline std::string getSingleValue<std::string>(ValueVariant
const&
value,
const std::string& name)
131 if (
value.type != VALUE_VARIANT_STRING)
133 throw LocalException()
134 <<
"Expected type 'string' but got type '"
141 inline Eigen::Vector3f getSingleValue<Eigen::Vector3f>(ValueVariant
const&
value,
const std::string& name)
144 if (
value.type != VALUE_VARIANT_VECTOR3)
146 throw LocalException()
147 <<
"Expected type 'vector3' but got type '"
150 if (
value.v.size() != 3)
152 throw LocalException()
153 <<
"Expected type 'vector3' (size = 3) but got sequence with size '"
154 <<
value.v.size() <<
"', name = '" << name <<
"'";
163 if (
value.type != VALUE_VARIANT_MATRIX4)
165 throw LocalException()
166 <<
"Expected type 'matrix4' but got type '"
169 if (
value.v.size() != 16)
171 throw LocalException()
172 <<
"Expected type 'matrix4' (size = 16) but got sequence with size '"
173 <<
value.v.size() <<
"', name = '" << name <<
"'";
183 template <
typename T>
189 ValueVariant
const& variantValue =
values.at(name);
190 return getSingleValue<T>(variantValue, name);
196 ARMARX_ERROR <<
"RemoteGui::getValue: name.size()" << name.size();
214 bool operator == (ValueVariant
const& left, ValueVariant
const& right);
216 bool operator != (ValueVariant
const& left, ValueVariant
const& right);
Vector3f toIceF(Eigen::Vector3f v)
bool operator!=(const ValueVariant &left, const ValueVariant &right)
float getSingleValue< float >(ValueVariant const &value, const std::string &name)
int getSingleValue< int >(ValueVariant const &value, const std::string &name)
std::map< std::string, ValueVariant > ValueMap
T getAndReturnValue(ValueMap const &values, std::string const &name)
std::string GetHandledExceptionString()
std::shared_ptr< Value > value()
Vector3i toIceI(Eigen::Vector3i v)
T getSingleValue(ValueVariant const &value, const std::string &name="")
bool operator==(const ValueVariant &left, const ValueVariant &right)
bool getSingleValue< bool >(ValueVariant const &value, const std::string &name)
ValueVariant makeValue(bool value)
Eigen::Vector3f fromIce(Vector3f v)
double v(double t, double v0, double a0, double j)
MatrixXX< 4, 4, float > Matrix4f
const char * getVariantTypeName(ValueVariantType type)
bool buttonClicked(RemoteGui::ValueMap const &newValues, RemoteGui::ValueMap const &oldValues, std::string const &name)
std::enable_if_t< meta::cfg::gui_definition_enabled_v< T >, void > getValueFromMap(T &cfg, RemoteGui::ValueMap const &values, std::string const &name)