aurora-opensource / streetscape.gl

Visualization framework for autonomy and robotics data encoded in XVIZ
http://www.streetscape.gl
MIT License
912 stars 220 forks source link

Camera does not handle position values with Z >= 0 #283

Open jlisee opened 5 years ago

jlisee commented 5 years ago

You can try this out in https://avs.auto/playground Add a position: [0, 0, 200] to the vehicle pose manually and everything disappears. If you instead set the Z to zero and use the mapOrigin, altitude field it works.

jlisee commented 5 years ago

The workaround did not work with continuous frame data, here is what I did in the playground:

// metadata
xvizMetadataBuilder
  .stream('/vehicle_pose')
  .category('pose')

  .stream('/object/tracking_point')
  .category('primitive')
  .type('circle')
  .streamStyle({
    fill_color: '#fb0'
  })

  .stream('/object/shape')
  .category('primitive')
  .type('polygon')
  .streamStyle({
    extruded: true
  })

  .startTime(1000)
  .endTime(1010);
// frame
const timestamp = 1000.6;

xvizBuilder.pose('/vehicle_pose')
  .timestamp(timestamp)
  .mapOrigin(0, 0, 200)
  .orientation(0, 0, 0)
  .position(0, 0, 0);

xvizBuilder.primitive('/object/tracking_point')
  .circle([10, 10, 200])
  .id('object-1');

xvizBuilder.primitive('/object/shape')
  .polygon([[-5, 20, 200], [5, 14, 200], [8, 18, 200]])
  .style({
    fill_color: '#08f',
    height: 2
  })
  .id('object-2');