40 ROS_WARN(
"Confidence evaluation can get compromised if this is not the right value!");
55 for (
unsigned int i = 0; i < msg->markers.size(); i++) {
56 ss <<
" " << msg->markers[i].id;
59 if(msg->markers.size() > 0) {
60 ROS_DEBUG_STREAM(
"AR Marker Tracking : received markers [" << ss.str() <<
"]");
76 for (
unsigned int i = 0; i < msg->markers.size(); i++)
78 if (msg->markers[i].id >= tracked_markers.size())
81 ROS_WARN(
"Discarding AR marker with unrecognized id (%d)", msg->markers[i].id);
102 geometry_msgs::PoseStamped prev = msgMarker.pose;
103 for (ObsList::iterator it = marker.
obs_list_.begin(); it != marker.
obs_list_.end(); ++it)
105 double age = (now - it->header.stamp).toSec();
111 ROS_DEBUG(
"%d observations discarded (first one with position %d in the list) for being %f seconds old ( > %f)", s0 - s1, position, age, ((position + 1)/
ar_tracker_freq_) + 1.5);
136 marker.
obs_list_.begin()->header = msgMarker.header;
137 if (marker.
obs_list_.size() > obs_list_max_size)
void maintainTrackedMarkers(const ar_track_alvar_msgs::AlvarMarkers::ConstPtr &msg, std::vector< TrackedMarker > &tracked_markers)
virtual ~ARMarkerTracking()
void maintainTrackedMarker(TrackedMarker &marker, const ar_track_alvar_msgs::AlvarMarker &msgMarker, const int obs_list_max_size, const double max_valid_d_inc, const double max_valid_h_inc)
ar_track_alvar_msgs::AlvarMarkers spotted_markers_
const double MAX_RELIABLE_HEAD
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
const double MAX_VALID_H_INC
const double AR_TRACKER_FREQ
static double getYaw(const Quaternion &bt_q)
std::vector< TrackedMarker > tracked_markers_
double max_reliable_head_
double min_penalized_dist_
void arPoseMarkersCB(const ar_track_alvar_msgs::AlvarMarkers::ConstPtr &msg)
ROSCPP_DECL void spin(Spinner &spinner)
double distance2D(double ax, double ay, double bx, double by)
const uint32_t MARKERS_COUNT
const double MAX_VALID_D_INC
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
double max_reliable_dist_
const double MIN_PENALIZED_DIST
const double MAX_RELIABLE_DIST
const double MAX_TRACKING_TIME
#define ROS_DEBUG_STREAM(args)
ros::Subscriber sub_ar_markers_
virtual void customCB(const ar_track_alvar_msgs::AlvarMarkers &spotted_markers, const std::vector< TrackedMarker > &tracked_markers)
double max_tracking_time_
const double MIN_PENALIZED_HEAD
bool getParam(const std::string &key, std::string &s) const
double minAngle(geometry_msgs::Quaternion a, geometry_msgs::Quaternion b)
double min_penalized_head_
double distance3D(double ax, double ay, double az, double bx, double by, double bz)