本文整理汇总了C++中KeyPair::find方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyPair::find方法的具体用法?C++ KeyPair::find怎么用?C++ KeyPair::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyPair
的用法示例。
在下文中一共展示了KeyPair::find方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: obj_pose_callback
void TimeManager::obj_pose_callback(const std_msgs::Time::ConstPtr& obj_pose_timestamp_msg) {
// ROS_INFO("obj_pose: \t\t\t%d.%d", obj_pose_timestamp_msg->data.sec, obj_pose_timestamp_msg->data.nsec);
obj_pose_.push_front(obj_pose_timestamp_msg->data, get_walltime_now());
static ros::Time pre_sensor_time;
synchronization::time_monitor time_monitor_msg;
time_monitor_msg.header.frame_id = "0";
time_monitor_msg.header.stamp = ros::Time::now();
// ROS_INFO("-------------------------------------");
// ROS_INFO("image_raw");
if (!ros::Time::isSimTime()) {
time_monitor_msg.image_raw = time_diff(obj_pose_timestamp_msg->data,
image_raw_.find(obj_pose_timestamp_msg->data));
} else {
time_monitor_msg.image_raw = 0;
}
// ROS_INFO("points_raw");
if (!ros::Time::isSimTime()) {
time_monitor_msg.points_raw = time_diff(obj_pose_timestamp_msg->data,
points_raw_.find(obj_pose_timestamp_msg->data));
} else {
time_monitor_msg.points_raw = 0;
}
if (is_points_image_) {
// ROS_INFO("points_image");
time_monitor_msg.points_image = time_diff(points_raw_.find(obj_pose_timestamp_msg->data),
points_image_.find(obj_pose_timestamp_msg->data));
}
if (is_vscan_image_) {
// ROS_INFO("vscan_points");
time_monitor_msg.vscan_points = time_diff(points_raw_.find(obj_pose_timestamp_msg->data),
vscan_points_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("vscan_image");
time_monitor_msg.vscan_image = time_diff(vscan_points_.find(obj_pose_timestamp_msg->data),
vscan_image_.find(obj_pose_timestamp_msg->data));
}
// ROS_INFO("image_obj");
time_monitor_msg.image_obj = time_diff(image_raw_.find(obj_pose_timestamp_msg->data),
image_obj_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("image_obj_ranged");
time_monitor_msg.image_obj_ranged = time_diff(sync_image_obj_ranged_.find(obj_pose_timestamp_msg->data),
image_obj_ranged_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("image_obj_tracked");
time_monitor_msg.image_obj_tracked = time_diff(sync_image_obj_tracked_.find(obj_pose_timestamp_msg->data),
image_obj_tracked_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("current_pose");
time_monitor_msg.current_pose = time_diff(points_raw_.find(obj_pose_timestamp_msg->data),
current_pose_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("obj_label");
time_monitor_msg.obj_label = time_diff(sync_obj_label_.find(obj_pose_timestamp_msg->data),
obj_label_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("cluster_centroids");
time_monitor_msg.cluster_centroids = time_diff(points_raw_.find(obj_pose_timestamp_msg->data),
cluster_centroids_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("obj_pose");
time_monitor_msg.obj_pose = time_diff(sync_obj_pose_.find(obj_pose_timestamp_msg->data),
obj_pose_.find(obj_pose_timestamp_msg->data));
// ROS_INFO("-------------------------------------");
if (!ros::Time::isSimTime()) {
time_monitor_msg.execution_time = time_diff(obj_pose_timestamp_msg->data, obj_pose_.find(obj_pose_timestamp_msg->data));
} else {
time_monitor_msg.execution_time = time_diff(points_raw_.find(obj_pose_timestamp_msg->data), obj_pose_.find(obj_pose_timestamp_msg->data));
}
time_monitor_msg.cycle_time = time_diff(pre_sensor_time, obj_pose_timestamp_msg->data); // cycle time
time_monitor_msg.time_diff = ros_time2msec(time_diff_.find(obj_pose_timestamp_msg->data)); // time difference
time_monitor_pub.publish(time_monitor_msg);
pre_sensor_time = obj_pose_timestamp_msg->data;
}