Skip to content
Snippets Groups Projects
Commit e82f8335 authored by Tilman Daab's avatar Tilman Daab
Browse files

fix color definition of OpenPose to avoid map::at error when using the Nose...

fix color definition of OpenPose to avoid map::at error when using the Nose keypoint; now (again) matching the color convention of the main branch
parent a049b4b3
No related branches found
No related tags found
1 merge request!141feature: Azure Kinect Body Tracking SDK
......@@ -2,6 +2,7 @@
#include <RobotAPI/components/ArViz/Client/Elements.h>
#include <VisionX/libraries/human/pose/model/openpose_body_25.h>
#include <ArmarXCore/core/logging/Logging.h>
namespace armarx::viz
......@@ -14,6 +15,7 @@ namespace armarx::viz
armarx::viz::Layer& layer,
const std::string& prefix)
{
ARMARX_TRACE;
static const int segmentThickness = 20;
static const int jointThickness = 30;
......
......@@ -114,31 +114,32 @@ namespace armarx::human::pose::model::openpose_body_25
inline const std::map<Joints, simox::Color> Colors = {
{Joints::Neck, {1.f, 0.f, 85.f / 255.f}},
{Joints::ShoulderRight, {1.f, 0.f, 0.f}},
{Joints::ElbowRight, {1.f, 85.f / 255.f, 0.f}},
{Joints::WristRight, {1.f, 170.f / 255.f, 0.f}},
{Joints::ShoulderLeft, {1.f, 1.f, 0.f}},
{Joints::ElbowLeft, {170.f / 255.f, 1.f, 0.f}},
{Joints::WristLeft, {85.f / 255.f, 1.f, 0.f}},
{Joints::Pelvis, {0.f, 1.f, 0.f}},
{Joints::HipRight, {1.f, 0.f, 0.f}},
{Joints::KneeRight, {0.f, 1.f, 85.f / 255.f}},
{Joints::AnkleRight, {0.f, 1.f, 170.f / 255.f}},
{Joints::HipLeft, {0.f, 1.f, 1.f}},
{Joints::KneeLeft, {0.f, 170.f / 255.f, 1.f}},
{Joints::AnkleLeft, {0.f, 85.f / 255.f, 1.f}},
{Joints::EyeRight, {0.f, 0.f, 1.f}},
{Joints::EyeLeft, {1.f, 0.f, 170.f / 255.f}},
{Joints::EarRight, {170.f / 255.f, 0.f, 1.f}},
{Joints::EarLeft, {1.f, 0.f, 1.f}},
{Joints::BigToeLeft, {85.f / 255.f, 0.f, 1.f}},
{Joints::Nose, {1.f, 0.f, 85.f / 255.f}},
{Joints::Neck, {1.f, 0.f, 0.f}},
{Joints::ShoulderRight, {1.f, 85.f / 255.f, 0.f}},
{Joints::ElbowRight, {1.f, 170.f / 255.f, 0.f}},
{Joints::WristRight, {1.f, 1.f, 0.f}},
{Joints::ShoulderLeft, {170.f / 255.f, 1.f, 0.f}},
{Joints::ElbowLeft, {85.f / 255.f, 1.f, 0.f}},
{Joints::WristLeft, {0.f, 1.f, 0.f}},
{Joints::Pelvis, {1.f, 0.f, 0.f}},
{Joints::HipRight, {0.f, 1.f, 85.f / 255.f}},
{Joints::KneeRight, {0.f, 1.f, 170.f / 255.f}},
{Joints::AnkleRight, {0.f, 1.f, 1.f}},
{Joints::HipLeft, {0.f, 170.f / 255.f, 1.f}},
{Joints::KneeLeft, {0.f, 85.f / 255.f, 1.f}},
{Joints::AnkleLeft, {0.f, 0.f, 1.f}},
{Joints::EyeRight, {1.f, 0.f, 170.f / 255.f}},
{Joints::EyeLeft, {170.f / 255.f, 0.f, 1.f}},
{Joints::EarRight, {1.f, 0.f, 1.f}},
{Joints::EarLeft, {85.f / 255.f, 0.f, 1.f}},
{Joints::BigToeLeft, {0.f, 0.f, 1.f}},
{Joints::SmallToeLeft, {0.f, 0.f, 1.f}},
{Joints::HeelLeft, {0.f, 0.f, 1.f}},
{Joints::BigToeRight, {0.f, 0.f, 1.f}},
{Joints::BigToeRight, {0.f, 1.f, 1.f}},
{Joints::SmallToeRight, {0.f, 1.f, 1.f}},
{Joints::HeelRight, {0.f, 1.f, 1.f}},
{Joints::Background, {0.f, 1.f, 1.f}}};
{Joints::HeelRight, {0.f, 1.f, 1.f}}};
// Joints::Background has no color assigned
} // namespace armarx::human::pose::model::openpose_body_25
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