本文整理汇总了C++中Chart::getTanBasisOne方法的典型用法代码示例。如果您正苦于以下问题:C++ Chart::getTanBasisOne方法的具体用法?C++ Chart::getTanBasisOne怎么用?C++ Chart::getTanBasisOne使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chart
的用法示例。
在下文中一共展示了Chart::getTanBasisOne方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createNodeMarker
/**
* \brief create a marker from a chart and stores it into markers array
*/
virtual void createNodeMarker(const Chart &c)
{
if (!markers){
ROS_WARN_THROTTLE(30,"[ExplorerBase::%s]\tNo marker array to update is provided, visualization is disabled.",__func__);
return;
}
visualization_msgs::Marker disc;
disc.header.frame_id = mark_frame;
disc.header.stamp = ros::Time();
disc.lifetime = ros::Duration(0.5);
disc.ns = "Atlas Nodes";
disc.id = c.getId();
disc.type = visualization_msgs::Marker::CYLINDER;
disc.action = visualization_msgs::Marker::ADD;
disc.scale.x = c.getRadius()*2;
disc.scale.y = c.getRadius()*2;
disc.scale.z = 0.001;
disc.color.a = 0.75;
disc.color.r = 0.3;
disc.color.b = 0.35;
disc.color.g = 0.5;
Eigen::Matrix3d rot;
rot.col(0) = c.getTanBasisOne();
rot.col(1) = c.getTanBasisTwo();
rot.col(2) = c.getNormal();
Eigen::Quaterniond q(rot);
q.normalize();
disc.pose.orientation.x = q.x();
disc.pose.orientation.y = q.y();
disc.pose.orientation.z = q.z();
disc.pose.orientation.w = q.w();
disc.pose.position.x = c.getCenter()[0];
disc.pose.position.y = c.getCenter()[1];
disc.pose.position.z = c.getCenter()[2];
std::lock_guard<std::mutex> guard(*mtx_ptr);
markers->markers.push_back(disc);
}