Go to the documentation of this file.
8 #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;
81 getSingleValue<std::nullptr_t>(RemoteGui::ValueVariant
const&
value,
const std::string& name)
92 if (
value.type != VALUE_VARIANT_BOOL)
94 throw LocalException()
96 <<
"', name = '" << name <<
"'";
106 if (
value.type != VALUE_VARIANT_INT)
108 throw LocalException()
110 <<
"', name = '" << name <<
"'";
120 if (
value.type != VALUE_VARIANT_FLOAT)
122 throw LocalException()
124 <<
"', name = '" << name <<
"'";
131 getSingleValue<std::string>(ValueVariant
const&
value,
const std::string& name)
134 if (
value.type != VALUE_VARIANT_STRING)
136 throw LocalException()
138 <<
"', name = '" << name <<
"'";
144 inline Eigen::Vector3f
145 getSingleValue<Eigen::Vector3f>(ValueVariant
const&
value,
const std::string& name)
148 if (
value.type != VALUE_VARIANT_VECTOR3)
150 throw LocalException()
152 <<
"', name = '" << name <<
"'";
154 if (
value.v.size() != 3)
156 throw LocalException()
157 <<
"Expected type 'vector3' (size = 3) but got sequence with size '"
158 <<
value.v.size() <<
"', name = '" << name <<
"'";
165 getSingleValue<Eigen::Matrix4f>(ValueVariant
const&
value,
const std::string& name)
168 if (
value.type != VALUE_VARIANT_MATRIX4)
170 throw LocalException()
172 <<
"', name = '" << name <<
"'";
174 if (
value.v.size() != 16)
176 throw LocalException()
177 <<
"Expected type 'matrix4' (size = 16) but got sequence with size '"
178 <<
value.v.size() <<
"', name = '" << name <<
"'";
188 template <
typename T>
195 ValueVariant
const& variantValue =
values.at(name);
196 return getSingleValue<T>(variantValue, name);
202 ARMARX_ERROR <<
"RemoteGui::getValue: name.size()" << name.size();
220 std::string
const& name);
222 bool operator==(ValueVariant
const& left, ValueVariant
const& right);
224 bool operator!=(ValueVariant
const& left, ValueVariant
const& right);
Vector3f toIceF(Eigen::Vector3f v)
MatrixXX< 4, 4, float > Matrix4f
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)
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)