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

Merge branch 'ObjectPoseObserver'

parents 29069e92 6dd7b747
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,14 @@ set(SOURCES
ObjectPoseProviderPlugin.cpp
ObjectFinder.cpp
ice_conversions.cpp
)
set(HEADERS
ObjectPoseObserver.h
ObjectPoseProviderPlugin.h
ObjectFinder.h
ice_conversions.h
)
......
......@@ -32,13 +32,6 @@
#include <RobotAPI/libraries/core/FramedPose.h>
std::ostream& armarx::objpose::operator<<(std::ostream& os, const ObjectID& id)
{
return os << "'" << id.dataset << "/" << id.name << "'";
}
namespace armarx
{
......
......@@ -33,15 +33,11 @@
#include <RobotAPI/libraries/RobotAPIComponentPlugins/RobotStateComponentPlugin.h>
#include "ObjectFinder.h"
#include "ice_conversions.h"
#define ICE_CURRENT_ARG const Ice::Current& = Ice::emptyCurrent
namespace armarx::objpose
{
std::ostream& operator<<(std::ostream& os, const ObjectID& id);
}
namespace armarx
{
......
#include "ice_conversions.h"
namespace armarx
{
std::ostream& objpose::operator<<(std::ostream& os, const ObjectID& id)
{
return os << "'" << id.dataset << "/" << id.name << "'";
}
}
#pragma once
#include <RobotAPI/interface/objectpose/types.h>
#include <RobotAPI/interface/objectpose/ObjectPoseProvider.h>
namespace armarx::objpose
{
std::ostream& operator<<(std::ostream& os, const ObjectID& id);
}
......@@ -31,6 +31,7 @@ set(SLICE_FILES
observers/SpeechObserverInterface.ice
observers/GraspCandidateObserverInterface.ice
objectpose/types.ice
objectpose/ObjectPoseObserver.ice
objectpose/ObjectPoseProvider.ice
......
......@@ -26,6 +26,8 @@
#include <ArmarXCore/interface/core/BasicTypes.ice>
#include <ArmarXCore/interface/observers/ObserverInterface.ice>
#include <RobotAPI/interface/objectpose/types.ice>
#include <RobotAPI/interface/objectpose/ObjectPoseProvider.ice>
......@@ -36,7 +38,12 @@ module armarx
struct ObjectPose
{
/// Name of the providing component.
string providerName;
/// Known or unknown object.
ObjectTypeEnum objectType = AnyObject;
/// The object ID, i.e. dataset and name.
ObjectID objectID;
PoseBase objectPoseRobot;
......@@ -52,7 +59,8 @@ module armarx
/// Source timestamp.
long timestampMicroSeconds = -1;
string providerName;
/// Object bounding box in object's local coordinate frame.
Box localOOBB;
};
sequence<ObjectPose> ObjectPoseSeq;
......
......@@ -24,9 +24,8 @@
#pragma once
#include <ArmarXCore/interface/core/BasicTypes.ice>
#include <RobotAPI/interface/core/FramedPoseBase.ice>
#include <ArmarXCore/interface/observers/VariantBase.ice>
#include <ArmarXCore/interface/observers/RequestableService.ice>
#include <RobotAPI/interface/objectpose/types.ice>
module armarx
......@@ -34,21 +33,14 @@ module armarx
// A struct's name cannot cannot differ only in capitalization from its immediately enclosing module name.
module objpose
{
enum ObjectTypeEnum
{
AnyObject, KnownObject, UnknownObject
};
struct ObjectID
{
string dataset; ///< e.g. "KIT", "YCB", "SecondHands", ...
string name; ///< e.g. "Amicelli", "001_chips_can", ...
};
sequence<ObjectID> ObjectIDSeq;
struct ProvidedObjectPose
{
/// Name of the providing component.
string providerName;
/// Known or unknown object.
ObjectTypeEnum objectType = AnyObject;
/// The object ID, i.e. dataset and name.
ObjectID objectID;
/// Pose in `objectPoseFrame`.
......@@ -60,7 +52,8 @@ module armarx
/// Source timestamp.
long timestampMicroSeconds = -1;
string providerName;
/// Object bounding box in object's local coordinate frame.
Box localOOBB;
};
sequence<ProvidedObjectPose> ProvidedObjectPoseSeq;
......
/**
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI
* @author Rainer Kartmann
* @copyright 2020 Humanoids Group, H2T, KIT
* @license http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#pragma once
#include <RobotAPI/interface/core/PoseBase.ice>
module armarx
{
// A struct's name cannot cannot differ only in capitalization from its immediately enclosing module name.
module objpose
{
enum ObjectTypeEnum
{
AnyObject, KnownObject, UnknownObject
};
struct ObjectID
{
string dataset; ///< e.g. "KIT", "YCB", "SecondHands", ...
string name; ///< e.g. "Amicelli", "001_chips_can", ...
};
sequence<ObjectID> ObjectIDSeq;
struct AABB
{
Vector3Base center;
Vector3Base extents;
};
struct Box
{
Vector3Base position;
QuaternionBase orientation;
Vector3Base 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