私はレーザースキャンデータを読み込み、それを使って環境のマップ を構築しようとしています。mrptで外部2Dレーザースキャンデータを読み取る
私の問題は、データがどのフォーマットでCObservation2DRangeScanオブジェクトに提供されなければならないか分かりません。
私が試してみた:
X,Y,X,Y,...
Y,X,Y,X,...
X,X,Y,Y,...
Y,Y,X,X,...
を私はrawlogファイルにデータを書き込み、その後、rawlogビューアでそれを見てください。 私は[1,1]を使いましたが、ポイントはX = -1とY = 0に現れます。何故ですか?ここで
はここrawlog視聴者からのデータ
Timestamp (UTC): 2016/06/21,07:22:42.166880
(as time_t): 1466493762.16688
(as TTimestamp): 131109673621668800
Sensor label: ''
Homogeneous matrix for the sensor's 3D pose, relative to robot base:
1.00000 0.00000 0.00000 0.00000
0.00000 1.00000 0.00000 0.00000
0.00000 0.00000 1.00000 0.00000
0.00000 0.00000 0.00000 1.00000(x,y,z,yaw,pitch,roll)
(0.0000,0.0000,0.0000,0.00deg,-0.00deg,0.00deg)
Samples direction: Right->Left
Points in the scan: 2
Estimated sensor 'sigma': 0.010000
Increment in pitch during the scan: 0.000000 deg
Invalid points in the scan: 0
Sensor maximum range: 80.00 m
Sensor field-of-view ("aperture"): 360.0 deg
Raw scan values: [1.000 1.000 ]
Raw valid-scan values: [1 1 ]
は、私が使用しているコードです:
CSensoryFrame SF;
CActionCollection actionCol;
CPose2D actualOdometryReading(0.0f, 0.0f, DEG2RAD(.0f));
// Prepare the "options" structure:
CActionRobotMovement2D actMov;
CActionRobotMovement2D::TMotionModelOptions opts;
opts.modelSelection = CActionRobotMovement2D::mmThrun;
opts.thrunModel.alfa3_trans_trans = 0.10f;
// Create the probability density distribution (PDF) from a 2D odometry reading:
actMov.computeFromOdometry(actualOdometryReading, opts);
actionCol.insert(actMov);
CObservation2DRangeScanPtr myObs = CObservation2DRangeScan::Create();
myObs->scan = scan; // = [1,0]
myObs->validRange = vranges; // = [1,1]
myObs->aperture = 2 * M_PI;
SF.insert(myObs);
それでは、範囲測定の代わりに、ポイントの形でレーザースキャンデータを使用する方法が問題です。 – mase
おそらく['CSimplePointsMap'](http://reference.mrpt.org/devel/classmrpt_1_1maps_1_1_c_simple_points_map.html)のようなものを使いたいと思うでしょう。 – mindriot