Skip to content
Snippets Groups Projects
Commit 7a15afb5 authored by Fabian Reister's avatar Fabian Reister
Browse files

Merge remote-tracking branch 'origin/master' into feature/armem-human-client-reader

parents 08d826b1 5af0d18a
No related branches found
No related tags found
1 merge request!139adding HumanPoseReader and native types for human pose
......@@ -41,15 +41,6 @@ namespace pcl
return lhs.indices == rhs.indices;
}
}
namespace std
{
template <class T, class U>
std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& rhs)
{
return os << "(" << rhs.first << ", " << rhs.second << ")";
}
}
constexpr uint32_t POINT_CLOUD_SIZE = 64;
......
......@@ -39,32 +39,32 @@
namespace armarx::human
{
void arondto::to_json(simox::json::json& j, const PersonProfile& bo)
void arondto::to_json(simox::json::json& j, const PersonProfile& arondto)
{
j["name"] = bo.name;
j["familyName"] = bo.familyName;
j["spokenNames"] = bo.spokenNames;
j["recognizedNames"] = bo.recognizedNames;
j["gender"] = bo.gender;
j["handedness"] = bo.handedness;
j["name"] = arondto.name;
j["familyName"] = arondto.familyName;
j["spokenNames"] = arondto.spokenNames;
j["recognizedNames"] = arondto.recognizedNames;
j["gender"] = arondto.gender;
j["handedness"] = arondto.handedness;
{
DateTime birthday;
fromIce(bo.birthday, birthday);
birthday = arondto.birthday;
j["birthday"] = birthday;
}
j["heightInMillimeters"] = bo.heightInMillimeters;
j["weightInGrams"] = bo.weightInGrams;
j["heightInMillimeters"] = arondto.heightInMillimeters;
j["weightInGrams"] = arondto.weightInGrams;
{
simox::Color favouriteColor;
simox::fromAron(bo.favouriteColor, favouriteColor);
simox::fromAron(arondto.favouriteColor, favouriteColor);
j["favouriteColor"] = favouriteColor;
}
j["roles"] = bo.roles;
j["roles"] = arondto.roles;
if (bo.attributes)
if (arondto.attributes)
{
j["attributes"] = aron::converter::AronNlohmannJSONConverter::ConvertToNlohmannJSON(bo.attributes);
j["attributes"] = aron::converter::AronNlohmannJSONConverter::ConvertToNlohmannJSON(arondto.attributes);
}
else
{
......@@ -73,34 +73,34 @@ namespace armarx::human
}
void arondto::from_json(const simox::json::json& j, PersonProfile& bo)
void arondto::from_json(const simox::json::json& j, PersonProfile& arondto)
{
using namespace simox::json;
get_to_if_exists(j, "name", bo.name);
get_to_if_exists(j, "familyName", bo.familyName);
get_to_if_exists(j, "name", arondto.name);
get_to_if_exists(j, "familyName", arondto.familyName);
get_to_if_exists(j, "spokenNames", bo.spokenNames);
get_to_if_exists(j, "recognizedNames", bo.recognizedNames);
get_to_if_exists(j, "spokenNames", arondto.spokenNames);
get_to_if_exists(j, "recognizedNames", arondto.recognizedNames);
get_to_if_exists(j, "gender", bo.gender, PersonGender::DIVERSE);
get_to_if_exists(j, "handedness", bo.handedness, PersonHandedness::BOTH);
get_to_if_exists(j, "gender", arondto.gender, PersonGender::DIVERSE);
get_to_if_exists(j, "handedness", arondto.handedness, PersonHandedness::BOTH);
{
DateTime birthday;
get_to_if_exists(j, "birthday", birthday, DateTime::Invalid());
toIce(bo.birthday, birthday);
arondto.birthday = birthday;
}
get_to_if_exists(j, "heightInMillimeters", bo.heightInMillimeters, -1);
get_to_if_exists(j, "weightInGrams", bo.weightInGrams, -1);
get_to_if_exists(j, "heightInMillimeters", arondto.heightInMillimeters, -1);
get_to_if_exists(j, "weightInGrams", arondto.weightInGrams, -1);
{
simox::Color favouriteColor;
get_to_if_exists(j, "favouriteColor", favouriteColor, simox::Color::gray());
simox::toAron(bo.favouriteColor, favouriteColor);
simox::toAron(arondto.favouriteColor, favouriteColor);
}
get_to_if_exists(j, "roles", bo.roles);
get_to_if_exists(j, "roles", arondto.roles);
if (j.count("attributes"))
{
......@@ -108,16 +108,16 @@ namespace armarx::human
aron::converter::AronNlohmannJSONConverter::ConvertFromNlohmannJSON(data, j.at("attributes"));
if (auto dict = std::dynamic_pointer_cast<aron::data::Dict>(data))
{
bo.attributes = dict;
arondto.attributes = dict;
}
else
{
bo.attributes = nullptr;
arondto.attributes = nullptr;
}
}
else
{
bo.attributes = nullptr;
arondto.attributes = nullptr;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment