3 #include <hector_nav_msgs/GetDistanceToObstacle.h> 4 #include <hector_nav_msgs/GetNormal.h> 5 #include <hector_worldmodel_msgs/VerifyObject.h> 6 #include <hector_worldmodel_msgs/VerifyPercept.h> 13 #include <boost/algorithm/string.hpp> 40 std_msgs::ColorRGBA default_color;
41 default_color.r = 0.8; default_color.a = 1.0;
63 for(
int i = 0; i < verification_services.size(); ++i) {
66 ROS_ERROR(
"Verification service %d could not be intialized: no service name given", i);
70 ROS_ERROR(
"Verification service %d could not be intialized: no service type given", i);
75 if (item[
"type"] ==
"object") {
76 *client =
nh.
serviceClient<hector_worldmodel_msgs::VerifyObject>(item[
"service"]);
77 }
else if (item[
"type"] ==
"percept") {
78 *client =
nh.
serviceClient<hector_worldmodel_msgs::VerifyPercept>(item[
"service"]);
81 if (!client || !client->isValid())
continue;
82 if (!client->exists()) {
83 if (!item.
hasMember(
"required") || !item[
"required"]) {
84 ROS_WARN(
"Verification service %s is not (yet) there...", client->getService().c_str());
86 ROS_WARN(
"Required verification service %s is not available... waiting...", client->getService().c_str());
92 if (item.
hasMember(
"class_id")) class_id = std::string(item[
"class_id"]);
94 if (item[
"type"] ==
"object") {
96 if (class_id.empty()) {
97 ROS_INFO(
"Using object verification service %s for all object classes", client->getService().c_str());
99 ROS_INFO(
"Using object verification service %s for objects of class %s", client->getService().c_str(), class_id.c_str());
101 }
else if (item[
"type"] ==
"percept") {
103 if (class_id.empty()) {
104 ROS_INFO(
"Using percept verification service %s for all percept classes", client->getService().c_str());
106 ROS_INFO(
"Using percept verification service %s for percepts of class %s", client->getService().c_str(), class_id.c_str());
151 for(
int i = 0; i < merge.
size(); ++i) {
155 options.
topic =
static_cast<std::string
>(merge[i][
"topic"]);
156 if (merge[i].hasMember(
"prefix")) info->prefix = static_cast<std::string>(merge[i][
"prefix"]);
158 options.
topic =
static_cast<std::string
>(merge[i]);
161 if (options.
topic.empty()) {
162 ROS_ERROR(
"Each entry in parameter merge must be either a string containing the topic to subscribe or a struct.");
167 ROS_INFO(
"Subscribed to object model %s.", options.
topic.c_str());
173 for(
int i = 0; i < negative_update.size(); ++i) {
178 info->negative_support = 0.0;
179 info->min_support = 0.0;
180 info->min_distance = 0.0;
181 info->max_distance = 0.0;
182 info->ignore_border_pixels = 0.0;
186 if (negative_update[i].hasMember(
"topic")) options.
topic = static_cast<std::string>(negative_update[i][
"topic"]);
187 if (negative_update[i].hasMember(
"class_id")) info->class_id = static_cast<std::string>(negative_update[i][
"class_id"]);
188 if (negative_update[i].hasMember(
"negative_support")) info->negative_support = static_cast<double>(negative_update[i][
"negative_support"]);
189 if (negative_update[i].hasMember(
"min_support")) info->min_support = static_cast<double>(negative_update[i][
"min_support"]);
190 if (negative_update[i].hasMember(
"min_distance")) info->min_distance = static_cast<double>(negative_update[i][
"min_distance"]);
191 if (negative_update[i].hasMember(
"max_distance")) info->max_distance = static_cast<double>(negative_update[i][
"max_distance"]);
192 if (negative_update[i].hasMember(
"ignore_border_pixels")) info->ignore_border_pixels = static_cast<double>(negative_update[i][
"ignore_border_pixels"]);
193 if (negative_update[i].hasMember(
"not_seen_duration")) info->not_seen_duration =
ros::Duration(static_cast<double>(negative_update[i][
"not_seen_duration"]));
195 if (options.
topic.empty()) {
196 ROS_ERROR(
"Each entry in parameter negative_update must have a camera_info topic to subscribe to.");
213 if (sysCommand->data ==
"reset") {
214 ROS_INFO(
"Resetting object model.");
218 (*it)->model.reset();
225 hector_worldmodel_msgs::PosePerceptPtr posePercept(
new hector_worldmodel_msgs::PosePercept);
230 ROS_DEBUG(
"Incoming image percept with image coordinates [%f,%f] in frame %s", percept->x, percept->y, percept->header.frame_id.c_str());
232 posePercept->header = percept->header;
233 posePercept->info = percept->info;
242 cv::Point2d rectified = cameraModel->rectifyPoint(cv::Point2d(percept->x, percept->y));
243 cv::Point3d direction_cv = cameraModel->projectPixelTo3dRay(rectified);
244 tf::Point direction(direction_cv.x, direction_cv.y, direction_cv.z);
253 if (d.
y() >= 0.999) {
257 }
else if (d.
y() <= -0.999) {
262 double c = 1./sqrt(1. - d.
y()*d.
y());
268 d.
z(), c*d.
x(), c*d.
y()*d.
z() ));
272 ROS_DEBUG(
"--> Rectified image coordinates: [%f,%f]", rectified.x, rectified.y);
273 ROS_DEBUG(
"--> Projected 3D ray (OpenCV): [%f,%f,%f]", direction_cv.x, direction_cv.y, direction_cv.z);
277 hector_nav_msgs::GetDistanceToObstacle::Request request;
278 hector_nav_msgs::GetDistanceToObstacle::Response response;
281 request.point.header = percept->header;
284 if (client && client->call(request, response)) {
285 if (response.distance > 0.0) {
287 distance = std::max(response.distance, 0.0f);
289 ROS_DEBUG(
"Projected percept to a distance of %.1f m", distance);
291 ROS_DEBUG(
"Ignoring percept due to unknown or infinite distance: service %s returned %f", client->getService().c_str(), response.distance);
295 ROS_DEBUG(
"Ignoring percept due to unknown or infinite distance: service is not available");
301 Eigen::Matrix3f covariance(Eigen::Matrix3f::Zero());
303 covariance(1,1) = covariance(0,0);
307 Eigen::Matrix3f rotation_camera_object;
311 covariance = rotation_camera_object * covariance * rotation_camera_object.
transpose();
316 posePercept->pose.covariance[0] = covariance(0,0);
317 posePercept->pose.covariance[1] = covariance(0,1);
318 posePercept->pose.covariance[2] = covariance(0,2);
319 posePercept->pose.covariance[6] = covariance(1,0);
320 posePercept->pose.covariance[7] = covariance(1,1);
321 posePercept->pose.covariance[8] = covariance(1,2);
322 posePercept->pose.covariance[12] = covariance(2,0);
323 posePercept->pose.covariance[13] = covariance(2,1);
324 posePercept->pose.covariance[14] = covariance(2,2);
337 geometry_msgs::PoseStamped pose;
338 pose.pose = percept->pose.pose;
339 pose.header = percept->header;
344 float support_added_by_percept_verification = 0.0;
346 if (!percept_verification_services.empty()) {
347 hector_worldmodel_msgs::VerifyPercept::Request request;
348 hector_worldmodel_msgs::VerifyPercept::Response response;
350 request.percept = *percept;
352 for(ServiceClientsWithProperties::iterator it = percept_verification_services.begin(); it != percept_verification_services.end(); ++it) {
353 if (!(it->first) || !(it->first->isValid()))
continue;
355 if (it->second.hasMember(
"ignore") && it->second[
"ignore"]) {
356 ROS_DEBUG(
"Calling service %s for percept of class '%s'', but ignoring its answer...", it->first->getService().c_str(), percept->info.class_id.c_str());
357 it->first->call(request, response);
359 }
else if (it->first->call(request, response)) {
360 if (response.response == response.DISCARD) {
361 ROS_DEBUG(
"Discarded percept of class '%s' due to DISCARD message from service %s", percept->info.class_id.c_str(), it->first->getService().c_str());
364 if (response.response == response.CONFIRM) {
365 ROS_DEBUG(
"We got a CONFIRMation for percept of class '%s' from service %s!", percept->info.class_id.c_str(), it->first->getService().c_str());
366 support_added_by_percept_verification = 100.0;
368 if (response.response == response.UNKNOWN) {
369 ROS_DEBUG(
"Verification service %s cannot help us with percept of class %s at the moment :-(", it->first->getService().c_str(), percept->info.class_id.c_str());
371 }
else if (it->second.hasMember(
"required") && it->second[
"required"]) {
372 ROS_DEBUG(
"Discarded percept of class '%s' as required service %s is not available", percept->info.class_id.c_str(), it->first->getService().c_str());
403 Eigen::Matrix<float,6,6> temp;
404 for(
unsigned int i = 0; i < 36; ++i) temp(i) = percept->pose.covariance[i];
405 Eigen::Matrix3f covariance = temp.block<3,3>(0,0);
408 if (covariance.isZero()) {
417 ROS_DEBUG(
"Transforming percept from %s frame to %s frame", percept->header.frame_id.c_str(),
_frame_id.c_str());
422 tf.lookupTransform(
_frame_id, percept->header.frame_id, percept->header.stamp, cameraTransform);
428 pose = cameraTransform * pose;
431 Eigen::Matrix3f rotation_map_camera;
432 rotation_map_camera << cameraTransform.
getBasis()[0][0], cameraTransform.
getBasis()[0][1], cameraTransform.
getBasis()[0][2],
435 covariance = rotation_map_camera * covariance * rotation_map_camera.
transpose();
441 ROS_INFO(
"Discarding %s percept with height %f", percept->info.class_id.c_str(), relative_height);
447 if (get_normal_client) {
449 hector_nav_msgs::GetNormal get_normal;
450 get_normal.request.point.point.x = pose.
getOrigin().
x();
451 get_normal.request.point.point.y = pose.
getOrigin().
y();
452 get_normal.request.point.point.z = pose.
getOrigin().
z();
453 get_normal.request.point.header.frame_id =
"map";
454 get_normal.request.point.header.stamp = percept->header.stamp;
456 if (get_normal_client->call(get_normal.request, get_normal.response)) {
457 tf::Vector3 normal(get_normal.response.normal.x, get_normal.response.normal.y, get_normal.response.normal.z);
468 if (n.
z() >= 0.999) {
470 }
else if (n.
z() <= -0.999) {
473 double c = 1./sqrt(1. - n.
z()*n.
z());
475 n.
y(), c*n.
x(), -c*n.
y()*n.
z(),
482 ROS_DEBUG(
"Object orientation was updated from wall normals: %f", y * 180./M_PI);
487 ROS_DEBUG(
"View angle was used as object orientation: %f", y * 180./M_PI);
496 if (!percept->info.object_id.empty()) {
497 support = percept->info.object_support;
498 }
else if (!percept->info.class_id.empty()) {
499 support = percept->info.class_support + support_added_by_percept_verification;
502 if (support == 0.0) {
503 ROS_WARN(
"Ignoring percept with support == 0.0");
512 if (percept->info.object_id.empty()) {
518 if (
object && object->getState() < 0) {
519 ROS_DEBUG(
"Percept was associated to object %s, which has a fixed state", object->getObjectId().c_str());
526 object =
model.
add(percept->info.class_id, percept->info.object_id);
528 object->setPose(pose);
529 object->setCovariance(covariance);
530 object->setSupport(support);
532 ROS_INFO(
"Found new object %s of class %s at (%f,%f)!", object->getObjectId().c_str(),
object->getClassId().c_str(), pose.
getOrigin().
getX(), pose.
getOrigin().
getY());
535 }
else if (support > 0.0) {
537 object->intersect(pose, covariance, support);
541 object->addSupport(support);
545 if ((object->getState() == ObjectState::UNKNOWN ||
object->getState() == ObjectState::INACTIVE) &&
parameter(
_pending_support, percept->info.class_id) > 0) {
547 object->setState(ObjectState::PENDING);
552 object->setState(ObjectState::ACTIVE);
557 std_msgs::Header header;
558 header.stamp = percept->header.stamp;
560 object->setHeader(header);
563 if (!percept->info.name.empty()) object->setName(percept->info.name);
570 if (!object_verification_services.empty()) {
571 hector_worldmodel_msgs::VerifyObject::Request request;
572 hector_worldmodel_msgs::VerifyObject::Response response;
574 object->getMessage(request.object);
576 for(ServiceClientsWithProperties::iterator it = object_verification_services.begin(); it != object_verification_services.end(); ++it) {
577 if (it->second.hasMember(
"ignore") && it->second[
"ignore"]) {
578 ROS_DEBUG(
"Calling service %s for object %s, but ignoring its answer...", it->first->getService().c_str(),
object->getObjectId().c_str());
579 it->first->call(request, response);
581 }
else if (it->first->call(request, response)) {
582 if (response.response == response.DISCARD) {
583 ROS_DEBUG(
"Discarded object %s due to DISCARD message from service %s", object->getObjectId().c_str(), it->first->getService().c_str());
584 object->setState(ObjectState::DISCARDED);
586 if (response.response == response.CONFIRM) {
587 ROS_DEBUG(
"We got a CONFIRMation for object %s from service %s!", object->getObjectId().c_str(), it->first->getService().c_str());
588 object->addSupport(100.0);
590 if (response.response == response.UNKNOWN) {
591 ROS_DEBUG(
"Verification service %s cannot help us with object %s at the moment :-(", it->first->getService().c_str(),
object->getObjectId().c_str());
593 }
else if (it->second.hasMember(
"required") && it->second[
"required"]) {
594 ROS_DEBUG(
"Discarded object %s as required service %s is not available", object->getObjectId().c_str(), it->first->getService().c_str());
595 object->setState(ObjectState::DISCARDED);
602 geometry_msgs::PoseStamped pose;
603 object->getPose(pose.pose);
604 pose.header =
object->getHeader();
617 if (!cameraModel->fromCameraInfo(camera_info)) {
618 ROS_ERROR(
"Could not initialize camera model from CameraInfo given in the percept");
630 ROS_DEBUG(
"ageing of all objects by %f", ageing->data);
641 object->setSupport(object->getSupport() - ageing->data);
645 ROS_INFO(
"remove object %s with support %f", object->getObjectId().c_str(),
object->getSupport());
646 it = objects.erase(it);
660 for(hector_worldmodel_msgs::ObjectModel::_objects_type::const_iterator it = update->objects.begin(); it != update->objects.end(); ++it)
662 hector_worldmodel_msgs::AddObject object;
663 object.request.map_to_next_obstacle =
false;
664 object.request.object = *it;
665 if (!
addObjectCb(
object.request,
object.response)) {
666 ROS_WARN(
"Could not update object %s", it->info.object_id.c_str());
680 object->setState(request.new_state.state);
685 if ((min_distance_between_objects > 0.0) && (request.new_state.state == hector_worldmodel_msgs::ObjectState::CONFIRMED)) {
688 if (other ==
object)
continue;
689 if (other->getClassId() !=
object->getClassId())
continue;
691 if (other->getDistance(*
object) < min_distance_between_objects) {
692 other->setState(hector_worldmodel_msgs::ObjectState::DISCARDED);
712 object->setName(request.name);
720 bool ObjectTracker::addObjectCb(hector_worldmodel_msgs::AddObject::Request& request, hector_worldmodel_msgs::AddObject::Response& response) {
722 bool newObject =
false;
725 if (!request.object.info.object_id.empty()) {
726 ROS_INFO(
"add_object service called for known %s object %s in frame %s", request.object.info.class_id.c_str(), request.object.info.object_id.c_str(), request.object.header.frame_id.c_str());
729 ROS_INFO(
"add_object service called for new %s object in frame %s", request.object.info.class_id.c_str(), request.object.header.frame_id.c_str());
734 object.reset(
new Object(request.object.info.class_id, request.object.info.object_id));
738 std_msgs::Header header = request.object.header;
741 geometry_msgs::PoseWithCovariance pose;
742 if (request.map_to_next_obstacle) {
743 pose.covariance = request.object.pose.covariance;
744 if (!
mapToNextObstacle(request.object.pose.pose, header, request.object.info, pose.pose)) {
748 pose = request.object.pose;
752 if (pose.covariance[0] == 0 && pose.covariance[7] == 0 && pose.covariance[14] == 0 &&
753 pose.covariance[21] == 0 && pose.covariance[28] == 0 && pose.covariance[35] == 0) {
754 pose.covariance.assign(0.0);
755 pose.covariance[0] = 1.0;
756 pose.covariance[7] = 1.0;
757 pose.covariance[14] = 1.0;
764 object->setHeader(header);
765 object->setPose(pose);
766 object->setState(request.object.state.state);
767 object->setSupport(request.object.info.support);
770 object->getMessage(response.object);
786 info->model = *new_model;
801 tf.lookupTransform(camera_info->header.frame_id,
_frame_id, camera_info->header.stamp, cameraInverseTransform);
807 ROS_DEBUG_NAMED(
"negative_update",
"Doing negative update for frame_id %s", camera_info->header.frame_id.c_str());
814 if (object->getState() < 0)
continue;
817 if (!info->class_id.empty() && info->class_id !=
object->getClassId()) {
818 ROS_DEBUG_NAMED(
"negative_update",
"%s: wrong class_id %s", object->getObjectId().c_str(),
object->getClassId().c_str());
823 if (object->getStamp() >= camera_info->header.stamp - info->not_seen_duration) {
824 ROS_DEBUG_NAMED(
"negative_update",
"%s: seen %f seconds ago", object->getObjectId().c_str(), (camera_info->header.stamp -
object->getStamp()).toSec());
830 object->getPose(pose);
831 pose = cameraInverseTransform * pose;
832 cv::Point3d xyz(pose.getOrigin().x(), pose.getOrigin().y(), pose.getOrigin().z());
835 float distance = pose.getOrigin().length();
836 if (distance < info->min_distance || (info->max_distance > 0.0 && distance > info->max_distance)) {
837 ROS_DEBUG_NAMED(
"negative_update",
"%s: wrong distance: %f", object->getObjectId().c_str(), distance);
842 cv::Point2d point = cameraModel->project3dToPixel(xyz);
845 if (!(point.x > 0 + info->ignore_border_pixels &&
846 point.x < camera_info->width - info->ignore_border_pixels &&
847 point.y > 0 + info->ignore_border_pixels &&
848 point.y < camera_info->height - info->ignore_border_pixels)) {
849 ROS_DEBUG_NAMED(
"negative_update",
"%s: not within field of view (image coordinates (%f,%f))", object->getObjectId().c_str(), point.x, point.y);
854 ROS_DEBUG(
"Doing negative update of %s. Should be at image coordinates (%f,%f).", object->getObjectId().c_str(), point.x, point.y);
855 object->addSupport(-info->negative_support);
856 if (object->getSupport() < info->min_support) object->setSupport(info->min_support);
858 if (object->getState() == ObjectState::PENDING ||
object->getState() == ObjectState::ACTIVE)
859 object->setState(ObjectState::INACTIVE);
874 if (!client || !client->exists()) {
875 ROS_ERROR(
"Could not map object to next obstacle as the distance service %s is not available", client->getService().c_str());
881 hector_nav_msgs::GetDistanceToObstacle::Request request;
882 hector_nav_msgs::GetDistanceToObstacle::Response response;
885 request.point.header = header;
886 request.point.point = source.position;
891 if (client->call(request, response) && response.distance > 0.0) {
893 distance = std::max(response.distance, 0.0f);
895 ROS_DEBUG(
"Could not map object to next obstacle due to unknown or infinite distance");
912 tf.lookupTransform(
_frame_id, header.frame_id, header.stamp, transform);
920 tfPose = transform * tfPose;
924 if (transform_ptr) *transform_ptr = transform;
932 if (!
transformPose(from.pose, to.pose, header, &transform))
return false;
950 merged.mergeWith((*it)->model,
tf, (*it)->prefix);
967 visualization_msgs::MarkerArray markers;
985 int main(
int argc,
char **argv)
std::map< std::string, double > _inactive_support
void getVisualization(visualization_msgs::MarkerArray &markers) const
std::map< std::string, double > _pending_support
std::map< std::string, ros::ServiceClientPtr > _distance_to_obstacle_service
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
bool transformPose(const geometry_msgs::Pose &from, geometry_msgs::Pose &to, std_msgs::Header &header, tf::StampedTransform *transform=0)
std::map< std::string, double > _inactive_time
static void poseMsgToTF(const geometry_msgs::Pose &msg, Pose &bt)
boost::shared_ptr< void const > VoidConstPtr
ros::Publisher objectPoseDebugPublisher
ros::Subscriber sysCommandSubscriber
std::map< std::string, double > _min_height
void remove(ObjectPtr object)
void publish(const boost::shared_ptr< M > &message) const
void publishModelEvent(const ros::TimerEvent &)
virtual void sendAndResetData()
ros::Subscriber objectAgeingSubscriber
std::map< std::string, double > _active_time
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
std::map< std::string, double > _pending_time
std::vector< ServiceClientWithProperties > ServiceClientsWithProperties
ros::ServiceServer addObject
std::map< std::string, double > _min_distance_between_objects
void imagePerceptCb(const hector_worldmodel_msgs::ImagePerceptConstPtr &)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
std::map< std::string, ros::ServiceClientPtr > _get_normal_service
std::map< std::string, CameraModelPtr > cameraModels
std::map< std::string, std_msgs::ColorRGBA > _marker_color
bool setObjectNameCb(hector_worldmodel_msgs::SetObjectName::Request &request, hector_worldmodel_msgs::SetObjectName::Response &response)
TFSIMD_FORCE_INLINE const tfScalar & getY() const
TFSIMD_FORCE_INLINE tfScalar distance(const Vector3 &v) const
std::map< std::string, bool > _with_orientation
static void setNamespace(const std::string &ns)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
std::map< std::string, double > _max_height
Type const & getType() const
TFSIMD_FORCE_INLINE const tfScalar & y() const
ObjectList getObjects() const
std::vector< NegativeUpdatePtr > negativeUpdate
ROSCPP_DECL void spin(Spinner &spinner)
void sysCommandCb(const std_msgs::StringConstPtr &)
TFSIMD_FORCE_INLINE const Vector3 & getRow(int i) const
ros::ServiceServer getObjectModel
std::vector< MergedModelPtr > merged_models
ObjectList::iterator iterator
ObjectModel getMergedModel()
boost::shared_ptr< image_geometry::PinholeCameraModel > CameraModelPtr
std::list< ObjectPtr > ObjectList
TFSIMD_FORCE_INLINE const tfScalar & x() const
#define ROS_DEBUG_NAMED(name,...)
void modelUpdateCb(const hector_worldmodel_msgs::ObjectModelConstPtr &)
bool addObjectCb(hector_worldmodel_msgs::AddObject::Request &request, hector_worldmodel_msgs::AddObject::Response &response)
void negativeUpdateCallback(const sensor_msgs::CameraInfoConstPtr &, const NegativeUpdatePtr &info)
void getMessage(hector_worldmodel_msgs::ObjectModel &model) const
void load(const std::string &class_id)
TFSIMD_FORCE_INLINE const tfScalar & z() const
void getRPY(tfScalar &roll, tfScalar &pitch, tfScalar &yaw, unsigned int solution_number=1) const
std::map< std::string, bool > _project_objects
void mergeModelCallback(const hector_worldmodel_msgs::ObjectModelConstPtr &new_model, const MergedModelPtr &info)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
ros::Subscriber posePerceptSubscriber
std::map< std::string, double > _default_distance
ObjectTracker::CameraModelPtr getCameraModel(const std::string &frame_id, const sensor_msgs::CameraInfo &camera_info)
TFSIMD_FORCE_INLINE Vector3 normalized() const
std::map< std::string, ServiceClientsWithProperties > _percept_verification_services
TFSIMD_FORCE_INLINE const tfScalar & y() const
void setFrameId(const std::string &frame_id)
std::string _worldmodel_ns
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
int main(int argc, char **argv)
float getBestCorrespondence(ObjectPtr &object, const tf::Pose &pose, const Eigen::Matrix3f &covariance, const std::string &class_id, const std::string &name, float max_distance=0.0) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
std::map< std::string, double > _active_support
std::map< std::string, double > _angle_variance
bool mapToNextObstacle(const geometry_msgs::Pose &source, const std_msgs::Header &header, const ObjectInfo &info, geometry_msgs::Pose &mapped)
TFSIMD_FORCE_INLINE Vector3 & normalize()
static T & parameter(std::map< std::string, T > &p, const std::string &class_id=std::string())
bool hasMember(const std::string &name) const
virtual void addMarkers(visualization_msgs::MarkerArray markers)
void posePerceptCb(const hector_worldmodel_msgs::PosePerceptConstPtr &)
uint32_t getNumSubscribers() const
static void poseTFToMsg(const Pose &bt, geometry_msgs::Pose &msg)
ros::Publisher modelUpdatePublisher
ros::Publisher modelPublisher
bool getParam(const std::string &key, std::string &s) const
ros::ServiceServer setObjectName
ros::Publisher perceptPoseDebugPublisher
ros::Subscriber imagePerceptSubscriber
TFSIMD_FORCE_INLINE const tfScalar & getX() const
std::map< std::string, double > _distance_variance
ObjectPtr getObject(const std::string &object_id) const
ros::Subscriber modelUpdateSubscriber
Matrix3x3 transpose() const
ObjectPtr add(const std::string &class_id="", const std::string &object_id="")
ros::ServiceServer setObjectState
void objectAgeingCb(const std_msgs::Float32ConstPtr &)
bool setObjectStateCb(hector_worldmodel_msgs::SetObjectState::Request &request, hector_worldmodel_msgs::SetObjectState::Response &response)
std::map< std::string, ServiceClientsWithProperties > _object_verification_services
bool getObjectModelCb(hector_worldmodel_msgs::GetObjectModel::Request &request, hector_worldmodel_msgs::GetObjectModel::Response &response)
static void pointTFToMsg(const Point &bt_v, geometry_msgs::Point &msg_v)