本文整理汇总了C++中tf::Transform::setIdentity方法的典型用法代码示例。如果您正苦于以下问题:C++ Transform::setIdentity方法的具体用法?C++ Transform::setIdentity怎么用?C++ Transform::setIdentity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tf::Transform
的用法示例。
在下文中一共展示了Transform::setIdentity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Synchronizer
CaptureServer() :
nh_private("~") {
ROS_INFO("Creating localization");
tf_prefix_ = tf::getPrefixParam(nh_private);
odom_frame = tf::resolve(tf_prefix_, "odom_combined");
map_frame = tf::resolve(tf_prefix_, "map");
map_to_odom.setIdentity();
queue_size_ = 1;
rgb_sub.subscribe(nh_, "rgb/image_raw", queue_size_);
depth_sub.subscribe(nh_, "depth/image_raw", queue_size_);
info_sub.subscribe(nh_, "rgb/camera_info", queue_size_);
// Synchronize inputs.
sync.reset(
new Synchronizer(SyncPolicy(queue_size_), rgb_sub, depth_sub,
info_sub));
sync->registerCallback(
boost::bind(&CaptureServer::RGBDCallback, this, _1, _2, _3));
tracked_points.reset(new std::vector<cv::Vec2f>);
}
示例2: PoseTransform
void PoseTransform()
{
tf::Vector3 point_vec(ARTag_pose.position.x, ARTag_pose.position.y, ARTag_pose.position.z);
tf::Quaternion quat_vec(ARTag_pose.orientation.x, ARTag_pose.orientation.y, ARTag_pose.orientation.z, ARTag_pose.orientation.w);
artag_tf.setIdentity();
artag_tf.setOrigin(point_vec);
artag_tf.setRotation(quat_vec);
tf::Vector3 point_vec_1(ARTag_pose_1.position.x, ARTag_pose_1.position.y, ARTag_pose_1.position.z);
tf::Quaternion quat_vec_1(ARTag_pose_1.orientation.x, ARTag_pose_1.orientation.y, ARTag_pose_1.orientation.z, ARTag_pose_1.orientation.w);
artag_tf_1.setIdentity();
artag_tf_1.setOrigin(point_vec_1);
artag_tf_1.setRotation(quat_vec_1);
}