Skip to content
Snippets Groups Projects
Commit f6314de7 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add Names to Location BOs

parent 7038ae8c
No related branches found
No related tags found
1 merge request!402Add Names to Locations
This commit is part of merge request !402. Comments created here will be created in the context of that merge request.
#pragma once
#include <memory>
#include <optional>
#include <string>
#include <SimoxUtility/shapes/OrientedBox.h>
#include <RobotAPI/libraries/core/FramedPose.h>
#include <RobotAPI/libraries/core/Names.h>
namespace armarx::priorknowledge::util
{
......@@ -31,8 +33,12 @@ namespace armarx::priorknowledge::util
{
LocationId id;
LocationType type;
std::optional<Names> names;
Location(const LocationId& i, const LocationType t) : id(i), type(t)
Location(const LocationId& i,
const LocationType t,
const std::optional<Names>& names = std::nullopt) :
id(i), type(t), names(names)
{
}
......@@ -45,12 +51,13 @@ namespace armarx::priorknowledge::util
std::string agent;
Eigen::Matrix4f pose;
FramedLocation(const LocationId& i,
const LocationType t,
const std::string& f,
const std::string& a,
const Eigen::Matrix4f& p) :
Location(i, t), frame(f), agent(a), pose(p)
FramedLocation(const LocationId& id,
const LocationType type,
const std::string& frame,
const std::string& agent,
const Eigen::Matrix4f& pose,
const std::optional<Names>& names = std::nullopt) :
Location(id, type, names), frame(frame), agent(agent), pose(pose)
{
}
......@@ -63,13 +70,14 @@ namespace armarx::priorknowledge::util
{
Eigen::Vector3f extents;
FramedBoxedLocation(const LocationId& i,
const LocationType t,
const std::string& f,
const std::string& a,
const Eigen::Matrix4f& p,
const Eigen::Vector3f& e) :
FramedLocation(i, t, f, a, p), extents(e)
FramedBoxedLocation(const LocationId& id,
const LocationType type,
const std::string& frame,
const std::string& agent,
const Eigen::Matrix4f& pose,
const Eigen::Vector3f& extents,
const std::optional<Names>& names = std::nullopt) :
FramedLocation(id, type, frame, agent, pose, names), extents(extents)
{
}
......
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