100 bSub.addList().read(m_ego_copy);
161 bSub.addString(
"object_area");
187 !b.check(
"object_area") ||
215 std::ostringstream oss;
217 oss<<
"self xyz : \t";
224 oss<<
m_color.toString(3,3)<<endl;
225 oss<<
"saliency : \t";
231 oss<<
"object area : \t";
238 Vector targetAbsolute(4,1.0);
239 targetAbsolute.setSubvector(0,vInitialRoot);
240 Vector targetRelative(4,1.0);
244 targetAbsolute[1] = targetAbsolute[1] - this->m_ego_position[1];
248 targetRelative[0] = targetAbsolute[0] * cos(theta) + targetAbsolute[1]*sin(theta);
249 targetRelative[1] = -targetAbsolute[0]*sin(theta) + targetAbsolute[1]*cos(theta);
250 targetRelative[2] = targetAbsolute[2];
251 return targetRelative;
262 return "NotReachable";
264 yError() <<
"Something went wrong in objectAreaAsString()";
272 }
else if(o==
"RobotOnly") {
274 }
else if(o==
"Shared") {
276 }
else if(o==
"NotReachable") {
279 yError() <<
"Something went wrong in stringToObjectArea()";
yarp::sig::VectorOf< double > m_color
Mean color of the object (r,g,b) used mainly for debugging/displaying purposes in the iCubGUI...
virtual bool fromBottle(const yarp::os::Bottle &b)
Fill entity fields from a bottle representation.
Represent any entity that can be stored within the OPC.
std::string objectAreaAsString() const
yarp::sig::VectorOf< double > m_ego_orientation
Orientation of the Object, in the initial ego-centered reference frame of the agent mainting the OPC ...
double value() const
Get value of object.
static icubclient::ObjectArea stringToObjectArea(const std::string &o)
void setSaliency(double saliency)
Set saliency of object.
double m_present
Is the object present in the scene A value of 1.0 means that the object currently is in the scene A v...
yarp::sig::VectorOf< double > getSelfRelativePosition(const yarp::sig::VectorOf< double > &vInitialRoot) const
Express a point given in the initial ego-centered reference frame in respect to the object reference ...
Represent any physical entity (including objects and agents) that can be stored within the OPC...
yarp::sig::VectorOf< double > m_ego_position
Position of the Object, in the initial ego-centered reference frame of the agent mainting the OPC (in...
virtual bool fromBottle(const yarp::os::Bottle &b)
Fill entity fields from a bottle representation.
yarp::sig::VectorOf< double > m_dimensions
Dimensions of the Object, in meters.
virtual std::string toString() const
Return a human readable description of the entity.
void setValue(double value)
Set value of object.
virtual std::string toString() const
Return a human readable description of the entity.
ObjectArea m_objectarea
Whether the object is accessible by only the robot, only the human, both or neither agent...
virtual yarp::os::Bottle asBottle() const
Return the entity as a bottle.
double m_saliency
A measurement of the object saliency [0,1].
virtual yarp::os::Bottle asBottle() const
Return the entity as a bottle.
double m_value
A measurement of the object subjective value [0,1].
double saliency() const
Get saliency of object.
std::string m_entity_type