|
@@ -10,7 +10,7 @@
|
|
|
static int gnLineIndex = 0;
|
|
|
|
|
|
|
|
|
-void DrawLine(std::vector<iv::LanePoint> & xveclastlp,std::vector<iv::LanePoint> & xveclp,pcl::visualization::PCLVisualizer& viewer)
|
|
|
+void DrawLine(std::vector<iv::LanePoint> & xveclastlp,std::vector<iv::LanePoint> & xveclp,pcl::visualization::PCLVisualizer& viewer, double fz)
|
|
|
{
|
|
|
|
|
|
|
|
@@ -24,8 +24,8 @@ void DrawLine(std::vector<iv::LanePoint> & xveclastlp,std::vector<iv::LanePoint>
|
|
|
{
|
|
|
iv::LanePoint xLast = xveclastlp[j];
|
|
|
|
|
|
- pcl::PointXYZ mass_center(xLast.mfX,xLast.mfY,0);
|
|
|
- pcl::PointXYZ kinectZ(xNow.mfX,xNow.mfY,0);
|
|
|
+ pcl::PointXYZ mass_center(xLast.mfX,xLast.mfY,fz);
|
|
|
+ pcl::PointXYZ kinectZ(xNow.mfX,xNow.mfY,fz);
|
|
|
|
|
|
char strgeoname[256];
|
|
|
snprintf(strgeoname,256,"xodr%d",gnLineIndex);
|
|
@@ -41,7 +41,7 @@ void DrawLine(std::vector<iv::LanePoint> & xveclastlp,std::vector<iv::LanePoint>
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void ShowRoad(pcl::visualization::PCLVisualizer& viewer,Road * pRoad)
|
|
|
+void ShowRoad(pcl::visualization::PCLVisualizer& viewer,Road * pRoad,double fz)
|
|
|
{
|
|
|
|
|
|
if(pRoad->GetLaneSectionCount()<1)
|
|
@@ -79,7 +79,7 @@ void ShowRoad(pcl::visualization::PCLVisualizer& viewer,Road * pRoad)
|
|
|
{
|
|
|
|
|
|
//Draw Line
|
|
|
- DrawLine(xveclastlp,xveclp,viewer);
|
|
|
+ DrawLine(xveclastlp,xveclp,viewer,fz);
|
|
|
xveclastlp = xveclp;
|
|
|
flasthdg = fhdg;
|
|
|
flastS = s;
|
|
@@ -92,7 +92,7 @@ void ShowRoad(pcl::visualization::PCLVisualizer& viewer,Road * pRoad)
|
|
|
{
|
|
|
pRoad->GetGeometryCoords(fRoadLen,x,y,fhdg);
|
|
|
xveclp = xodrfunc::GetAllLanePoint(pRoad,s,x,y,fhdg);
|
|
|
- DrawLine(xveclastlp,xveclp,viewer);
|
|
|
+ DrawLine(xveclastlp,xveclp,viewer,fz);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -100,7 +100,7 @@ void ShowRoad(pcl::visualization::PCLVisualizer& viewer,Road * pRoad)
|
|
|
|
|
|
}
|
|
|
|
|
|
-void ShowXODRINVTK(pcl::visualization::PCLVisualizer& viewer)
|
|
|
+void ShowXODRINVTK(pcl::visualization::PCLVisualizer& viewer,double fz)
|
|
|
{
|
|
|
|
|
|
char strpath[256];
|
|
@@ -114,7 +114,7 @@ void ShowXODRINVTK(pcl::visualization::PCLVisualizer& viewer)
|
|
|
unsigned int i;
|
|
|
for(i=0;i<xxodr.GetRoadCount();i++)
|
|
|
{
|
|
|
- ShowRoad(viewer,xxodr.GetRoad(i));
|
|
|
+ ShowRoad(viewer,xxodr.GetRoad(i),fz);
|
|
|
}
|
|
|
|
|
|
|