31 using namespace MemoryXUtility;
40 memoryx::ObjectInstanceMemorySegmentBasePrx instanceMemory = getWorkingMemory()->getObjectInstancesSegment();
41 std::string attachedObjectId;
43 if (in.isAttachedObjectChannelSet() and in.getAttachedObjectChannel())
47 TimedVariantPtr idField = ChannelRefPtr::dynamicCast(in.getAttachedObjectChannel())->getDataField(
"id");
48 attachedObjectId = idField->getString();
50 catch (std::exception
const& ex)
52 ARMARX_WARNING <<
"Could not get ID of attached object from channel. Reason:\n"
57 else if (in.isAttachedObjectIDSet())
59 attachedObjectId = in.getAttachedObjectID();
63 ARMARX_INFO <<
"Attached object is not defined. Either set ID or channel!";
69 getWorkingMemory()->getObjectInstancesSegment()->setNewMotionModel(attachedObjectId, newMotionModel);