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

Add interface for object poses

parent 7dd0dfc9
No related branches found
No related tags found
1 merge request!70Add ObjectPoseObserver (WIP)
......@@ -31,6 +31,9 @@ set(SLICE_FILES
observers/SpeechObserverInterface.ice
observers/GraspCandidateObserverInterface.ice
objectpose/ObjectPoseObserver.ice
objectpose/ObjectPoseProvider.ice
units/MultiHandUnitInterface.ice
units/ForceTorqueUnit.ice
units/InertialMeasurementUnit.ice
......
/**
* 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 <ArmarXCore/interface/core/BasicTypes.ice>
#include <ArmarXCore/interface/observers/ObserverInterface.ice>
#include <RobotAPI/interface/objectpose/ObjectPoseProvider.ice>
module armarx
{
module objpose
{
interface ObjectPoseObserverInterface extends ObserverInterface, ObjectPoseTopic
{
InfoMap getAvailableProvidersWithInfo();
Ice::StringSeq getAvailableProviderNames();
ProviderInfo getProviderInfo(string providerName);
bool hasProvider(string providerName);
ObjectPoseSeq getObjectPoses();
ObjectPoseSeq getObjectPosesByProvider(string providerName);
int getUpdateCounterByProvider(string providerName);
StringIntDictionary getAllUpdateCounters();
bool setProviderConfig(string providerName, StringVariantBaseMap config);
};
};
};
/**
* 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 <ArmarXCore/interface/core/BasicTypes.ice>
#include <RobotAPI/interface/core/FramedPoseBase.ice>
#include <ArmarXCore/interface/observers/VariantBase.ice>
#include <ArmarXCore/interface/observers/RequestableService.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 project; ///< e.g. "KIT", "YCB", "SecondHands", ...
string name; ///< e.g. "Amicelli", "001_chips_can", ...
};
struct ObjectPose
{
ObjectTypeEnum objectType = AnyObject;
ObjectID objectID;
PoseBase objectPose; ///< In robot frame.
PoseBase robotPose; ///< In global frame.
/// Confidence in [0, 1] (1 = full, 0 = none).
float confidence = 0;
/// Source timestamp.
long timestampMicroSeconds = -1;
string providerName;
};
sequence<ObjectPose> ObjectPoseSeq;
struct ProviderInfo
{
ObjectTypeEnum objectType = AnyObject;
StringVariantBaseMap currentConfig;
};
dictionary<string, ProviderInfo> InfoMap;
interface ObjectPoseTopic
{
void reportProviderInfo(string providerName, ProviderInfo info);
void reportObjectPoses(string providerName, ObjectPoseSeq candidates);
};
interface ObjectPoseProviderInterface extends RequestableServiceListenerInterface
{
};
};
};
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