本文整理汇总了C++中Pose::robotRelativeToNeckCoord方法的典型用法代码示例。如果您正苦于以下问题:C++ Pose::robotRelativeToNeckCoord方法的具体用法?C++ Pose::robotRelativeToNeckCoord怎么用?C++ Pose::robotRelativeToNeckCoord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pose
的用法示例。
在下文中一共展示了Pose::robotRelativeToNeckCoord方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeResultToBlackboard
void LocalisationAdapter::writeResultToBlackboard(void) {
AbsCoord robotPos = L->getRobotPose();
AbsCoord ballPosition = L->getBallPosition();
RRCoord ballPosRR = ballPosition.convertToRobotRelative(robotPos);
AbsCoord ballPosRRC = ballPosition.convertToRobotRelativeCartesian(robotPos);
AbsCoord ballVelocity = L->getBallVelocity();
double robotPosUncertainty = L->getRobotPosUncertainty();
double robotHeadingUncertainty = L->getRobotHeadingUncertainty();
double ballPosUncertainty = L->getBallPosUncertainty();
double ballVelEigenvalue = L->getBallVelocityUncertainty();
AbsCoord nextBall(ballPosition.x() + ballVelocity.x(), ballPosition.y() + ballVelocity.y(), 0.0f);
AbsCoord nextBallRRC = nextBall.convertToRobotRelativeCartesian(robotPos);
AbsCoord ballVelRRC(nextBallRRC.x() - ballPosRRC.x(), nextBallRRC.y() - ballPosRRC.y(), 0.0f);
Pose pose = readFrom(motion, pose);
XYZ_Coord ballNeckRelative = pose.robotRelativeToNeckCoord(ballPosRR, BALL_RADIUS);
uint32_t ballLostCount = L->getBallLostCount();
SharedLocalisationUpdateBundle sharedLocalisationBundle = L->getSharedUpdateData();
acquireLock(serialization);
writeTo(localisation, robotPos, robotPos);
writeTo(localisation, ballLostCount, ballLostCount);
writeTo(localisation, ballPos, ballPosition);
writeTo(localisation, ballPosRR, ballPosRR);
writeTo(localisation, ballPosRRC, ballPosRRC);
writeTo(localisation, ballVelRRC, ballVelRRC);
writeTo(localisation, ballVel, ballVelocity);
writeTo(localisation, robotPosUncertainty, robotPosUncertainty);
writeTo(localisation, robotHeadingUncertainty, robotHeadingUncertainty);
writeTo(localisation, ballPosUncertainty, ballPosUncertainty);
writeTo(localisation, ballVelEigenvalue, ballVelEigenvalue);
writeTo(localisation, teamBall, TeamBallInfo()); // TODO: make this a different value?
writeTo(localisation, ballNeckRelative, ballNeckRelative);
writeTo(localisation, sharedLocalisationBundle, sharedLocalisationBundle);
writeTo(localisation, havePendingOutgoingSharedBundle, true);
writeTo(localisation, havePendingIncomingSharedBundle, std::vector<bool>(5, false));
writeTo(localisation, robotObstacles, robotFilter->filteredRobots);
releaseLock(serialization);
}