Skip to content
Snippets Groups Projects
Commit 7017dcab authored by Timo Weberruß's avatar Timo Weberruß
Browse files

Use human segment instead of special human group

as a human group segment does not exist and the writer writes it in the
human segment
parent 898594e3
No related branches found
No related tags found
2 merge requests!109Social layers,!55Draft: Implement human grouping
......@@ -421,13 +421,11 @@ namespace armarx::navigation::components::navigation_memory
void
Component::visuRun()
{
memory::Visu visu{
arviz,
workingMemory().getCoreSegment(navigation::location::coreSegmentID),
workingMemory().getCoreSegment(navigation::graph::coreSegmentID),
workingMemory().getCoreSegment(memory::constants::CostmapCoreSegmentName),
workingMemory().getCoreSegment(memory::constants::HumanCoreSegmentName),
workingMemory().getCoreSegment(memory::constants::HumanGroupCoreSegmentName)};
memory::Visu visu{arviz,
workingMemory().getCoreSegment(navigation::location::coreSegmentID),
workingMemory().getCoreSegment(navigation::graph::coreSegmentID),
workingMemory().getCoreSegment(memory::constants::CostmapCoreSegmentName),
workingMemory().getCoreSegment(memory::constants::HumanCoreSegmentName)};
Properties::LocationGraph p;
......@@ -460,6 +458,9 @@ namespace armarx::navigation::components::navigation_memory
// Humans
visu.drawHumans(layers, p.visuHumans, p.visuTransparent);
// Groups
visu.drawHumanGroups(layers, p.visuHumanGroups);
arviz.commit(layers);
metronome.waitForNextTick();
......
......@@ -105,6 +105,7 @@ namespace armarx::navigation::components::navigation_memory
bool visuGraphEdges = true;
bool visuCostmaps = true;
bool visuHumans = true;
bool visuHumanGroups = true;
bool visuTransparent = false;
......
......@@ -53,14 +53,12 @@ namespace armarx::navigation::memory
const armem::server::wm::CoreSegment& locSegment,
const armem::server::wm::CoreSegment& graphSegment,
const armem::server::wm::CoreSegment& costmapSegment,
const armem::server::wm::CoreSegment& humanSegment,
const armem::server::wm::CoreSegment& humanGroupSegment) :
const armem::server::wm::CoreSegment& humanSegment) :
arviz(arviz),
locSegment(locSegment),
graphSegment(graphSegment),
costmapSegment(costmapSegment),
humanSegment(humanSegment),
humanGroupSegment(humanGroupSegment),
visu(std::make_unique<graph::GraphVisu>())
{
}
......@@ -218,9 +216,6 @@ namespace armarx::navigation::memory
void
visualize(const human::HumanGroups& humanGroups, viz::Layer& layer)
{
const Eigen::Translation3f human_T_mmm(Eigen::Vector3f{0, 0, 1000});
for (const auto& humanGroup : humanGroups)
{
viz::Polygon polygon(std::to_string(layer.size()));
......@@ -332,12 +327,12 @@ namespace armarx::navigation::memory
std::map<std::string, navigation::human::HumanGroups> namedProviderHumanGroups;
humanGroupSegment.doLocked(
humanSegment.doLocked(
[&]()
{
using namespace armem::server;
humanGroupSegment.forEachEntity(
humanSegment.forEachEntity(
[&](const wm::Entity& entity)
{
entity.getLatestSnapshot().forEachInstance(
......
......@@ -48,8 +48,7 @@ namespace armarx::navigation::memory
const armem::server::wm::CoreSegment& locSegment,
const armem::server::wm::CoreSegment& graphSegment,
const armem::server::wm::CoreSegment& costmapSegment,
const armem::server::wm::CoreSegment& humanSegment,
const armem::server::wm::CoreSegment& humanGroupSegment);
const armem::server::wm::CoreSegment& humanSegment);
~Visu();
......@@ -66,7 +65,6 @@ namespace armarx::navigation::memory
const armem::server::wm::CoreSegment& graphSegment;
const armem::server::wm::CoreSegment& costmapSegment;
const armem::server::wm::CoreSegment& humanSegment;
const armem::server::wm::CoreSegment& humanGroupSegment;
std::unique_ptr<navigation::graph::GraphVisu> visu;
};
......
......@@ -33,7 +33,6 @@ namespace armarx::navigation::memory::constants
inline const std::string LocationCoreSegmentName = "Location";
inline const std::string CostmapCoreSegmentName = "Costmap";
inline const std::string HumanCoreSegmentName = "Human";
inline const std::string HumanGroupCoreSegmentName = "HumanGroup";
inline const std::string GlobalPlannerResultCoreSegment = "Results_GlobalPlanner";
inline const std::string LocalPlannerResultCoreSegment = "Results_LocalPlanner";
......
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