Closed yumianhuli2 closed 4 years ago
@yumianhuli2
CalculateSpiralPoints(..)
and CalculatePoly3Points(..)
also need to compute elevation. We have fixed it internally, you will see it in next release.0
angle. Finally we need to rotate them by the given heading.CalculateLinePoints()--This is probably not the right function, it doesn't use (hdg)angles to compute the coordinates,Especially the Z is always Zero.
@yumianhuli2 As you can in this line, it is using hdg
angle to compute the coordinates. z
is 0 because it first computes without rotation along x
direction, then rotates the coordinate to get correct result.
@yumianhuli2 As you can in this line, it is using
hdg
angle to compute the coordinates.z
is 0 because it first computes without rotation alongx
direction, then rotates the coordinate to get correct result.
Hi! luqiang! 1、pos = Quaternion.Euler(0f, -(float)(geometry.hdg 180f / Math.PI), 0f) pos You can only change the rotation but you can't change the coordinates???
2、For example,CalculateParamPoly3Points() ---The calculation result is going to be in UV coordinates, so where's the code for converting to XY coordinates?
Thanks!
@yumianhuli2
What do you mean by can only change the rotation but can't change the coordinates
? There is no rotation for each pos
, it is only a 3D coordinate with x
, y
, z
.
In CalculateParamPoly3Points()
, following two lines are converting from UV
space to XY
space.
pos = Quaternion.Euler(0f, -(float)(geometry.hdg * 180f / Math.PI), 0f) * pos;
points.Add(origin + pos);
@yumianhuli2
1. What do you mean by `can only change the rotation but can't change the coordinates`? There is no rotation for each `pos`, it is only a 3D coordinate with `x`, `y`, `z`. 2. In `CalculateParamPoly3Points()`, following two lines are converting from `UV` space to `XY` space.
pos = Quaternion.Euler(0f, -(float)(geometry.hdg * 180f / Math.PI), 0f) * pos; points.Add(origin + pos);
OK!Hope for fixing elevation bug.Thanks
@yumianhuli2
1. What do you mean by `can only change the rotation but can't change the coordinates`? There is no rotation for each `pos`, it is only a 3D coordinate with `x`, `y`, `z`. 2. In `CalculateParamPoly3Points()`, following two lines are converting from `UV` space to `XY` space.
pos = Quaternion.Euler(0f, -(float)(geometry.hdg * 180f / Math.PI), 0f) * pos; points.Add(origin + pos);
路强你好!你的邮箱或者其他联系方式是什么?我引用了部分源码计算参考线对应的lane宽度发现和odrViewer中的坐标对不上,但形状是一致的。 是不是计算公式有点问题呢?我有一个xodr的文件和工程需要发给你看一下哈!
@yumianhuli2 You already asked this https://github.com/lgsvl/simulator/issues/931 right? I am checking it.
Hello LgsvlTeam! I have some questions in this post. 1 In the OpenDriveMapImporter script,CalculateLinePoints(..)、 CalculateArcPoints(..)、CalculateParamPoly3Points(..) have coordinates y that compute the elevation, but why does CalculateSpiralPoints(..) and CalculatePoly3Points(..)not compute the coordinate y of this elevation?
2 Superelevation - I have not found the code to calculate the tilt Angle of the cross section. Do you know the formula and method for calculating it?
3 pos = Quaternion.Euler(0f, -(float)(geometry.hdg 180f / Math.PI), 0f) pos; Why do point(pos) have to do with angles/direction?I think calculating the pose point has nothing to do with rotation.
Thanks!