aruco_pose: rename snap_orientation to known_orientation

This commit is contained in:
Oleg Kalachev
2019-02-22 16:44:01 +03:00
parent 6382c25417
commit 022eaed76c
2 changed files with 9 additions and 9 deletions

View File

@@ -65,7 +65,7 @@ private:
bool estimate_poses_, send_tf_;
double length_;
std::unordered_map<int, double> length_override_;
std::string frame_id_prefix_, snap_orientation_;
std::string frame_id_prefix_, known_orientation_;
Mat camera_matrix_, dist_coeffs_;
aruco_pose::MarkerArray array_;
visualization_msgs::MarkerArray vis_array_;
@@ -86,7 +86,7 @@ public:
}
readLengthOverride();
nh_priv_.param<std::string>("snap_orientation", snap_orientation_, "");
nh_priv_.param<std::string>("known_orientation", known_orientation_, "");
nh_priv_.param<std::string>("frame_id_prefix", frame_id_prefix_, "aruco_");
camera_matrix_ = cv::Mat::zeros(3, 3, CV_64F);
@@ -151,9 +151,9 @@ private:
}
}
if (!snap_orientation_.empty()) {
if (!known_orientation_.empty()) {
try {
snap_to = tf_buffer_.lookupTransform(msg->header.frame_id, snap_orientation_,
snap_to = tf_buffer_.lookupTransform(msg->header.frame_id, known_orientation_,
msg->header.stamp, ros::Duration(0.02));
} catch (const tf2::TransformException& e) {
ROS_WARN_THROTTLE(5, "aruco_detect: can't snap: %s", e.what());
@@ -175,7 +175,7 @@ private:
fillPose(marker.pose.pose, rvecs[i], tvecs[i]);
// snap orientation (if enabled and snap frame avaiable)
if (!snap_orientation_.empty() && !snap_to.header.frame_id.empty()) {
if (!known_orientation_.empty() && !snap_to.header.frame_id.empty()) {
snapOrientation(marker.pose.pose.orientation, snap_to.transform.rotation);
}