本文整理汇总了C++中KeyValue::ToKeyId方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyValue::ToKeyId方法的具体用法?C++ KeyValue::ToKeyId怎么用?C++ KeyValue::ToKeyId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyValue
的用法示例。
在下文中一共展示了KeyValue::ToKeyId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadFloorPlan
IplImage* TrackView::loadFloorPlan( const WbConfig& runConfig )
{
Collection m_rooms = RoomsCollection();
m_rooms.SetConfig( runConfig );
const KeyValue roomId = runConfig.GetKeyValue( RunSchema::roomIdKey );
const WbConfig roomConfig = m_rooms.ElementById( roomId.ToKeyId() );
const WbConfig roomLayoutConfig(
roomConfig.GetSubConfig( RoomLayoutSchema::schemaName ) );
const QString floorPlanName(
roomLayoutConfig.GetAbsoluteFileNameFor( "floor_plan.png" ) );
m_baseImg = cvLoadImage(floorPlanName.toAscii().data(), CV_LOAD_IMAGE_GRAYSCALE);
return m_baseImg;
}
示例2: loadMetrics
bool TrackView::loadMetrics( const WbConfig& runConfig )
{
WbConfig trackConfig = runConfig.GetSubConfig( TrackRobotSchema::schemaName );
Collection m_rooms = RoomsCollection();
m_rooms.SetConfig( runConfig );
const KeyValue roomId = runConfig.GetKeyValue( RunSchema::roomIdKey );
const WbConfig roomConfig = m_rooms.ElementById( roomId.ToKeyId() );
std::vector<WbConfig> camPosConfigs = GetCameraPositionsConfigs(roomConfig);
const WbConfig firstCamPosConfigForThisRun(camPosConfigs.at(0));
WbConfig firstCamPosCalibrationCfg;
firstCamPosCalibrationCfg = firstCamPosConfigForThisRun.GetSubConfig( ExtrinsicCalibrationSchema::schemaName );
const KeyValue squareSizeCmKey = firstCamPosCalibrationCfg.GetKeyValue( ExtrinsicCalibrationSchema::gridSquareSizeInCmKey );
const KeyValue squareSizePxKey = firstCamPosCalibrationCfg.GetKeyValue( ExtrinsicCalibrationSchema::gridSquareSizeInPxKey );
const KeyValue resolutionKey = trackConfig.GetKeyValue( TrackRobotSchema::GlobalTrackingParams::resolution );
m_metricsScaleFactor = 1.0;
return true;
}