xviz
xviz copied to clipboard
Polyline primitive is not displayed in case of too close GEOGRAPHIC coordinates.
I would like to use the polyline primitive to mark the pose's covered route.
In the metadata I set the polyline's coordinates to GEOGRAPHIC, since what I get are live gps coordinates.
In every frame I push the pose's current position into a list (Array:Point3D) and it is not displayed.
Playing with playground it is easy to reproduce the problem.
For example when the vertices are [[11.3909919,48.2958628,0], [11.3736340,48.284889,0]] the polyline is not displayed. When I change the at least the first decimal digit or the altitude, the polyline gets displayed.
Examples:
[[11.3xxxx, 48.2xxxx, 0], [11.3xxxx, 48.2xxxx, 0]] -> NOT DISPLAYED
[[11.3xxxx, 48.2xxxx, 0], [11.3xxxx, 48.3xxxx, 0]] -> DISPLAYED
[[11.3xxxx, 48.2xxxx, 0], [11.4xxxx, 48.2xxxx,0]] -> DISPLAYED
[[11.3xxxx, 48.2xxxx, 0], [11.3xxxx, 48.2xxxx, 1]] -> DISPLAYED
Thanks for the test data.
For avs.auto/playground
metadata
xvizMetadataBuilder
.startTime(1000)
.endTime(1005)
.stream('/vehicle_pose')
.category('POSE')
.stream('/objects/points')
.type('POINT')
.category('PRIMITIVE')
.coordinate('GEOGRAPHIC')
.streamStyle({radius_pixels: 5, point_color_mode: 'distance_to_vehicle'})
.stream('/objects/lines')
.type('POLYLINE')
.category('PRIMITIVE')
.coordinate('GEOGRAPHIC')
.streamStyle({
stroke_color: '#FFC043',
stroke_width: 5,
stroke_width_min_pixels: 1
})
Frame Message
const timestamp = 1003.1;
xvizBuilder
.pose('/vehicle_pose')
.timestamp(timestamp)
.mapOrigin(11.3908919,48.2959628, 0)
.orientation(0, 0, 0)
xvizBuilder
.primitive('/objects/points')
.points([[11.3909919,48.2958628,0], [11.3736340,48.284889,0]])
// Original values - Nothing green shows up
xvizBuilder
.primitive('/objects/lines')
.polyline([[11.3909919,48.2958628,0], [11.3736340,48.284889,0]])
.style({
stroke_color: [0, 255, 0, 255]
});
//Add z 0.1 and the orange color shows up
xvizBuilder
.primitive('/objects/lines')
.polyline([[11.3909919,48.2958628,0.1], [11.3736340,48.284889,0]])
// Changed 48.29 -> 48.39, and a red line shoots off the left
xvizBuilder
.primitive('/objects/lines')
.polyline([[11.3909919,48.3958628,0.1], [11.3736340,48.284889,0]])
.style({
stroke_color: [255, 0, 0, 255]
});
I have a similar problem that polyline can't display correctly. I have test it in playground. the metedata is
// metadata
xvizMetadataBuilder
.startTime(1000)
.endTime(1005)
.stream('/vehicle_pose')
.category('POSE')
.stream('/prediction/trajectory')
.category('PRIMITIVE')
.type('POLYLINE')
.coordinate('GEOGRAPHIC')
.streamStyle({
stroke_color: '#0f0'
})
and the state_update is
const timestamp = 1000.4;
xvizBuilder
.pose('/vehicle_pose')
.timestamp(timestamp)
.mapOrigin(-83.046385,42.508557,0)
.orientation(0, 0, 0)
xvizBuilder
.primitive('/prediction/trajectory')
.polyline([[-83.046385,42.508557,0], [-83.046512, 42.511854, 0], [-83.047093, 42.520714, 0], [-83.049987, 42.520722, 0], [-83.052827, 42.520669, 0]])
.id('object-1')
.style({stroke_width: 5})
but after I changed the altitude value at intervals, it looks like correct.
const timestamp = 1000.5;
xvizBuilder
.pose('/vehicle_pose')
.timestamp(timestamp)
.mapOrigin(-83.046385,42.508557,0)
.orientation(0, 0, 0)
xvizBuilder
.primitive('/prediction/trajectory')
.polyline([[-83.046385,42.508557,0], [-83.046512, 42.511854, 1], [-83.047093, 42.520714, 0], [-83.049987, 42.520722, 1], [-83.052827, 42.520669, 0]])
.id('object-1')
.style({stroke_width: 5})
Another problems when there is a u-turn, the polyline will also display incorrectly the state_update
// frame
const timestamp = 1001.4;
xvizBuilder
.pose('/vehicle_pose')
.timestamp(timestamp)
.mapOrigin(-83.046385,42.508557,0)
.orientation(0, 0, 0)
xvizBuilder
.primitive('/prediction/trajectory')
.polyline([[-83.046385,42.508557,0], [-83.046512, 42.511854, 1], [-83.047093, 42.520714, 0], [-83.046512, 42.511854, 0]])
.id('object-1')
.style({stroke_width: 5})
ref #274 #402 #551
By setting XVIZ Config "pathDistanceThreshold" wih the default 0.1 value to 0, the problems is solved. May be that should be stated in the document
The threshold is intended to protect against rendering issues when sequential points are very close
On Wed, Aug 5, 2020, 17:59 Eliot [email protected] wrote:
By setting XVIZ Config "pathDistanceThreshold" to 0, the problems is solved.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/uber/xviz/issues/551#issuecomment-669621575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALUBXFRCKGPAGWVNVHCM2DR7H57XANCNFSM4JQ2STRQ .
The threshold is intended to protect against rendering issues when sequential points are very close … On Wed, Aug 5, 2020, 17:59 Eliot @.***> wrote: By setting XVIZ Config "pathDistanceThreshold" to 0, the problems is solved. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub <#551 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALUBXFRCKGPAGWVNVHCM2DR7H57XANCNFSM4JQ2STRQ .
Got it, thanks.