本文整理汇总了C++中Bot::get_yaw方法的典型用法代码示例。如果您正苦于以下问题:C++ Bot::get_yaw方法的具体用法?C++ Bot::get_yaw怎么用?C++ Bot::get_yaw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bot
的用法示例。
在下文中一共展示了Bot::get_yaw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: found_beacon
void found_beacon(string top, string bottom, pair<double, double> position) {
double d = position.first;
double theta = position.second;
pair<double, double> bot_pos = bot.get_position();
double beacon_yaw = bot.get_yaw() + theta;
double b_x = bot_pos.first + d*cos(beacon_yaw);
double b_y = bot_pos.second + d*sin(beacon_yaw);
ROS_INFO_STREAM("BOT POS: " << top << " " << bottom << " " << b_x << "," << b_y << "beacon_yaw: " <<
beacon_yaw << " d: " << d << "robot_yaw " << bot.get_yaw() << "theta: " << theta);
for (auto it = beacons.begin(); it != beacons.end(); ++it) {
if (it->top == top && it->bottom == bottom) {
it->known_location = true;
it->x = b_x;
it->y = b_y;
}
}
}