### Run XViz ROS Example 2 Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros/README.md These commands set up and run the XViz ROS converter with the specified configuration. It involves navigating to the example directory, installing dependencies with yarn, and starting the server with the correct data path and configuration file. ```bash $ cd examples/converters/ros $ yarn $ node index.js -d ../../../data/kitti/ --rosConfig config-2.json ``` -------------------------------- ### Start Live Example (JavaScript) Source: https://github.com/aurora-opensource/xviz/blob/master/python/README.md Starts the live example for XVIZ protocol integration with streetscape.gl. This requires navigating to the examples directory and using yarn. ```bash cd examples/get-started && yarn start-live ``` -------------------------------- ### Serve XVIZ Data with ROS Configuration Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros/README.md This command starts the XVIZ data server using the specified ROS configuration (config-1.json) and data directory. It requires Node.js and the 'yarn' package manager to be installed. ```bash cd examples/converters/ros yarn node index.js -d ../../../data/kitti/ --rosConfig config-1.json ``` -------------------------------- ### Server Startup with XVIZServer Source: https://github.com/aurora-opensource/xviz/blob/master/dev-docs/004-server-module-rfc.md Demonstrates the basic setup for starting an XVIZ server by instantiating XVIZServer and providing custom handlers. This code initializes the server and prepares it to handle incoming connections. ```javascript import {CustomHandler} from './custom-handler'; import {XVIZServer} from '@xviz/server'; function main() { // This is the code that will receive the const myHandler = new CustomHandler(...); // This starts the server. const server = new XVIZServer([myHandlers], ...); } ``` -------------------------------- ### Start XVIZ Stream Server Source: https://github.com/aurora-opensource/xviz/blob/master/docs/getting-started/running-the-example.md Starts an XVIZ stream server to serve converted data. This requires installing dependencies, building modules, and then running the server executable with the data directory and port specified. ```bash yarn bootstrap # Install deps and build modules ./modules/server/bin/babel-xvizserver -d data/generated/kitti/2011_09_26/2011_09_26_drive_0005_sync --port 8081 ``` -------------------------------- ### Install Dependencies and Build Modules Source: https://github.com/aurora-opensource/xviz/blob/master/docs/getting-started/xviz-server.md This command installs project dependencies and builds the necessary modules using yarn. ```bash yarn bootstrap ``` -------------------------------- ### XVIZ Start Message (JSON) Source: https://github.com/aurora-opensource/xviz/blob/master/docs/protocol-formats/json-protocol.md Example of the XVIZ 'start' message sent from the server to the client. It includes version, session type, and message format. ```JSON { "type": "xviz/start", "data": { "version": "2.0.0", "session_type": "LIVE", "message_format": "JSON" } } ``` -------------------------------- ### Clone and Bootstrap XVIZ Project Source: https://github.com/aurora-opensource/xviz/blob/master/README.md This snippet demonstrates how to clone the XVIZ repository and install its dependencies using yarn. It's the initial setup step for working with the project. ```bash # Clone XVIZ $ git clone https://github.com/uber/xviz.git $ cd xviz # Install dependencies $ yarn bootstrap ``` -------------------------------- ### Install XVIZ Builder with yarn Source: https://github.com/aurora-opensource/xviz/blob/master/docs/developers-guide/installing-xviz.md Installs the @xviz/builder module using yarn, which provides classes to help build and write XVIZ data. ```bash yarn add @xviz/builder ``` -------------------------------- ### Setup XVIZ Server and Conversion Commands Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros-custom/README.md Configures command-line arguments for XVIZ server and conversion using yargs. It sets up a middleware to run the custom ROS provider registration before executing any commands. ```javascript import {serverArgs} from '@xviz/server'; import {convertArgs} from '@xviz/ros'; function main() { const yargs = require('yargs'); let args = yargs.alias('h', 'help'); args = convertArgs(args); args = serverArgs(args); // This will parse and execute the server command args.middleware(setupROSProvider).parse(); } main(); ``` -------------------------------- ### Install XVIZ Builder with npm Source: https://github.com/aurora-opensource/xviz/blob/master/docs/developers-guide/installing-xviz.md Installs the @xviz/builder module using npm, which provides classes to help build and write XVIZ data. ```bash npm install @xviz/builder ``` -------------------------------- ### Convert KITTI to XVIZ Source: https://github.com/aurora-opensource/xviz/blob/master/docs/getting-started/running-the-example.md Converts KITTI dataset to XVIZ format using a provided script. This involves installing dependencies and running the start command with the data directory. Options are available to control output, disable streams, and resize images. ```bash cd examples/converters/kitti yarn # install dependencies yarn start -d 2011_09_26/2011_09_26_drive_0005_sync ``` ```bash yarn start -d 2011_09_26/2011_09_26_drive_0005_sync --image-max-width=300 --disable-streams=image_01,image_02 ``` -------------------------------- ### Run XVIZ Server with ROS Data Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros-custom/README.md Starts the XVIZ server to serve ROS data. Requires a ROS configuration file and data directory. The server can be accessed via a web browser at http://localhost:8080. ```Shell $ node index.js server -d ../../../data/kitti --rosConfig kitti.json ``` -------------------------------- ### Serve Converted XVIZ Data Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros-custom/README.md Starts the XVIZ server to serve data that has already been converted to the XVIZ format. Requires specifying the directory where the converted data is stored. ```Shell $ node index.js server -d ../../../data/kitti/custom-example ``` -------------------------------- ### Start Streaming Local Client Source: https://github.com/aurora-opensource/xviz/blob/master/docs/getting-started/running-the-example.md Starts the streetscape.gl client application to connect to a local streaming server. This command is used after setting up the streetscape.gl starter kit. ```javascript streetscape.gl/examples/get-started$ yarn start-streaming-local ``` -------------------------------- ### xvizros bagdump Command Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/ros/tools/xvizros-tool.md An example of using the 'bagdump' command with the '--dumpTopics' option to list topics in a specific ROS bag file. ```bash ./modules/ros/bin/xvizros bagdump --dumpTopics data/kitti/kitti_2011_09_26_drive_0005_synced.bag ``` -------------------------------- ### Run KITTI Example with XVIZ Source: https://github.com/aurora-opensource/xviz/blob/master/README.md This snippet shows how to download KITTI data and then convert it (if necessary) to run the XVIZ Server and Client. This is a practical example of using XVIZ with real-world autonomous driving data. ```bash # Download KITTI data $ ./scripts/download-kitti-data.sh # Convert KITTI data if necessary and run the XVIZ Server and Client $ ./scripts/run-kitti-example.sh ``` -------------------------------- ### Convert KITTI Data to ROS Bag Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros/README.md This command converts KITTI dataset into a ROS Bag file using the kitti2bag tool, which is necessary for this example. It mounts the local 'data/kitti' directory to the container's '/data' path and specifies the KITTI dataset details. ```bash docker run -v `pwd`/data/kitti:/data -it tomas789/kitti2bag -t 2011_09_26 -r 0005 raw_synced ``` -------------------------------- ### Install jq for Contribution Source: https://github.com/aurora-opensource/xviz/blob/master/README.md This command installs the 'jq' utility, which is a requirement for the pre-commit hook 'yarn test-fast' in the XVIZ project. 'jq' is a lightweight and flexible command-line JSON processor. ```shell brew install jq ``` -------------------------------- ### Reconfiguration Message Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md An example of a 'reconfigure' message format sent to the backend when a user selects an option in the XVIZ Select component, illustrating the structure of the configuration update. ```json { "update_type": "DELTA", "config_update": { "system": { "info": { "type": "newvalue" } } } } ``` -------------------------------- ### XViz ROS Configuration for Example 2 Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros/README.md This JSON configuration defines how ROS topics are mapped to XViz streams and specifies important metadata like frame_id for point cloud data. It includes configurations for GPS fix, IMU data, and point cloud topics. ```json { "topicConfig": [ { "topic": "/kitti/oxts/gps/fix", "type": "sensor_msgs/NavSatFix", "config": { "xvizStream": "/vehicle_pose", "imuTopic": "/kitti/oxts/imu" } }, { "topic": "/kitti/oxts/imu", "type": "sensor_msgs/Imu" }, { "topic": "/kitti/velo/pointcloud", "type": "sensor_msgs/PointCloud2", "config": { "frameId": "velo_link" } } ] } ``` -------------------------------- ### YAML Example for TreeTable Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md An example configuration in YAML format for a TreeTable component in XVIZ, specifying its description, display object ID setting, stream, and title. ```yaml components: - description: These are the details of the TreeTable display_object_id: false stream: /some/stream/of/treetable/primmatives title: A TreeTable! type: TREETABLE ``` -------------------------------- ### ExampleSession Setup with XVIZServerMiddlewareStack Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/server/overview-middleware.md Demonstrates how to instantiate and configure an ExampleSession using XVIZServerMiddlewareStack. This includes setting up a pipeline with XVIZProviderRequestHandler and XVIZWebsocketSender to handle requests and send messages. ```JavaScript import { XVIZProviderRequestHandler, XVIZMessageToMiddleware, XVIZServerMiddlewareStack, XVIZSessionContext, XVIZWebsocketSender} from '@xviz/server'; export class ExampleSession { constructor(socket, request, provider, options) { this.socket = socket; this.provider = provider; this.request = request; this.options = options; // Session shared storage for the middlewares this.context = new XVIZSessionContext(); // The middleware will manage calling the components in the stack this.middleware = new XVIZServerMiddlewareStack(); // Setup a pipeline to respond to request and send back messages const stack = [ new XVIZProviderRequestHandler(this.context, this.provider, this.middleware, this.options), new XVIZWebsocketSender(this.context, this.socket, this.options) ]; this.middleware.set(stack); // The XVIZMessageToMiddleware object is a convenience class to // simply inspect a message and if it is an XVIZ message call the middleware this.handler = new XVIZMessageToMiddleware(this.middleware); this.socket.onmessage = message => { if (!this.handler.onMessage(message)) { // Handle non-XVIZ message here } }; } } ``` -------------------------------- ### Initialize XVIZServer Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/server/xviz-server.md Demonstrates how to create and start an XVIZServer instance with a handler, options, and a callback function to log the listening port. ```javascript import {XVIZServer} from '@xviz/server'; // Construction of 'handler' const ws = new XVIZServer([handler], options, () => { console.log(`Listening on port ${ws.server.address().port}`); }); ``` -------------------------------- ### Get Loaded Time Range of XVIZStreamBuffer Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/xviz-stream-buffer.md Illustrates how to get the start and end timestamps of all currently loaded timeslices in the buffer. ```javascript streamBuffer.getLoadedTimeRange(); // Returns {start, end} timestamps or null if no timeslices are loaded. ``` -------------------------------- ### Get XVIZ Time Range Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/io/xviz-json-reader.md The timeRange() method returns the start and end times of the XVIZ data source, if available. It returns an object with startTime and endTime properties. ```javascript reader.timeRange() ``` -------------------------------- ### Get XVIZ Time Range Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/io/xviz-binary-reader.md Retrieves the time range of the XVIZ data source. Returns an object containing the start and end times if known. ```JavaScript reader.timeRange() ``` -------------------------------- ### Initialize and Run XVIZServer Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/server/overview.md Demonstrates how to initialize the XVIZServer with a set of handlers and start listening for WebSocket connections. The server delegates requests to registered handlers, which in turn manage client sessions. ```JavaScript import { XVIZServer } from '@xviz/server'; import { MyCustomHandler } from './my-custom-handler'; const handlers = [ new MyCustomHandler() ]; const server = new XVIZServer(handlers); server.listen(process.env.PORT || 8080, () => { console.log(`XVIZ server listening on port ${server.address().port}`); }); ``` -------------------------------- ### Launch XVIZ Server Source: https://github.com/aurora-opensource/xviz/blob/master/docs/getting-started/xviz-server.md Launches the XVIZ server, specifying the directory containing XVIZ data and the port to listen on. ```bash ./bin/xvizserver -d --port 8081 ``` -------------------------------- ### Get Pose Trajectory Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/trajectory-helpers.md Generates a pose trajectory from a list of poses, specifying the start and end frames. The input object must include an array of pose entries and the frame numbers. ```javascript import {_getPoseTrajectory as getPoseTrajectory} from '@xviz/builder'; // Example usage: // const input = { // poses: [ // {x: 1, y: 1, z: 1, longitude: 0, latitude: 0, altitude: 0, roll: 0, pitch: 0, yaw: 0}, // {x: 2, y: 2, z: 2, longitude: 0, latitude: 0, altitude: 0, roll: 0, pitch: 0, yaw: 0} // ], // startFrame: 0, // endFrame: 1 // }; // const poseTrajectory = getPoseTrajectory(input); ``` -------------------------------- ### Run xvizserver Tool (Bash) Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/server/tools/xvizserver-tool.md Demonstrates how to run the xvizserver tool from the command line after building the modules. It shows how to specify a directory for XVIZ data. ```bash ./modules/ros/bin/xvizserver -d xvizFolder ``` -------------------------------- ### xvizros config Command Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/ros/tools/xvizros-tool.md Shows how to use the 'config' command to dump a basic ROSConfig to standard output, which can then be redirected to a file. ```bash ./modules/ros/bin/babel-xvizros config data/kitti/kitti_2011_09_26_drive_0005_synced.bag > kitti-config.json ``` -------------------------------- ### Run babel-xvizserver Tool (Bash) Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/server/tools/xvizserver-tool.md Shows an alternative way to run the xvizserver tool using babel, which can be useful for running against modules directly. It also includes an example of how to view help information. ```bash ./modules/ros/bin/babel-xvizserver -d xvizFolder ./modules/ros/bin/babel-xvizserver -h ``` -------------------------------- ### Register ROSBag Provider with Custom Converters Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/ros-custom/README.md Registers a custom ROSBag provider with specified converters and the custom BagClass. This function is typically called during application setup to enable custom data handling. ```javascript import { convertArgs, ROSBag, registerROSBagProvider, // Converters SensorImage, SensorNavSatFix, SensorPointCloud2 } from '@xviz/ros'; function setupROSProvider(args) { if (args.rosConfig) { const converters = [SensorImage, SensorNavSatFix, SensorPointCloud2, SensorImu]; registerROSBagProvider(args.rosConfig, {converters, BagClass: KittiBag}); } } ``` -------------------------------- ### Convert nuTonomy Data to XVIZ Source: https://github.com/aurora-opensource/xviz/blob/master/examples/converters/nutonomy/README.md This command initiates the conversion process from nuTonomy data to the XVIZ format. It requires specifying the paths to the nuTonomy data source (metadata, annotations, and samples) and an output directory. Optional flags allow for converting only keyframes, resizing images, and disabling specific data streams. ```bash yarn start \ -d /nutonomy/nuscenes_teaser_meta_v1/v0.1 # metadata and annotation directory \ --samples-directory=/nutonomy/samples # lidar, radar, camera data directory \ -o \ --scenes=6 # could pass more than 1 --scenes=1,2,3 ``` ```bash yarn start \ --keyframes # only convert keyframes --image-max-width --image-max-height # reduce image size --disable-streams=CAM_FRONT_LEFT,CAM_FRONT_RIGHT # disable streams ``` ```bash yarn start --help ``` -------------------------------- ### xvizros Help Command Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/ros/tools/xvizros-tool.md Displays the help information for the babel-xvizros tool, listing all available commands and options. ```bash ./modules/ros/bin/babel-xvizros -h ``` -------------------------------- ### Install @xviz/schema with yarn Source: https://github.com/aurora-opensource/xviz/blob/master/modules/schema/README.md Installs the @xviz/schema module as a development dependency using yarn. ```shell yarn add @xviz/schema ``` -------------------------------- ### Install @xviz/schema with npm Source: https://github.com/aurora-opensource/xviz/blob/master/modules/schema/README.md Installs the @xviz/schema module as a development dependency using npm. ```shell npm install --save-dev @xviz/schema ``` -------------------------------- ### Get Streams from XVIZStreamBuffer Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/xviz-stream-buffer.md Demonstrates how to get a map of stream contents, with loaded timeslices sorted by stream names. ```javascript streamBuffer.getStreams(); // Returns a map of stream contents. ``` -------------------------------- ### Open XVIZ Provider with FileSource Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/io/overview-provider.md Demonstrates how to open an XVIZ provider using `FileSource` and `XVIZProviderFactory`. This involves specifying the source and root directory to initialize the provider. ```javascript import {XVIZProviderFactory} from '@xviz/io'; import {FileSource} from '@xviz/io/node'; const root = '.'; const source = new FileSource(root); const provider = await XVIZProviderFactory.open({ source, root }); if (provider) { // ... } ``` -------------------------------- ### XVIZ Circle Primitive Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/protocol-schema/geometry-primitives.md Example of an XVIZ circle primitive, specifying its 'center' coordinates and 'radius' in meters. ```js { "center": [9, 15, 3], "radius": 2.5 } ``` -------------------------------- ### Get Numeric Value of XVIZStreamBuffer Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/xviz-stream-buffer.md Shows how to get the numeric value of the buffer, which updates whenever the buffer receives new data. ```javascript streamBuffer.valueOf(); // Returns the numeric value of the buffer. ``` -------------------------------- ### xviz Plot Component YAML Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md Example of configuring the Plot component in YAML format, detailing the independent and dependent variables for plotting. ```yaml components: - type: PLOT title: Some Other Streams vs Some Stream description: The change in some streams as a function of the other one independentVariable: /some/stream dependentVariables: - /some/other_stream - /some/second_other_stream ``` -------------------------------- ### xviz Plot Component JSON Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md Example of configuring the Plot component in JSON format, specifying the independent and dependent variables for visualization. ```js { "components": [ { "type": "PLOT", "title": "Some Other Streams vs Some Stream", "description": "The change in some streams as a function of the other one", "independentVariable": "/some/stream", "dependentVariables": ["/some/other_stream", "/some/second_other_stream"] } ] } ``` -------------------------------- ### YAML Example for Select Component Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md A YAML configuration for the XVIZ Select component, detailing its type, title, description, the stream for options, and the target for the onchange event. ```yaml components: - type: SELECT title: Additional Info Type description: Which type of additional information you want sent streams: /system/additional_info/types onchange: target: /system/info/type ``` -------------------------------- ### Table Component YAML Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md An example of a Table component configuration in YAML format. This component is used to render data in a tabular structure. ```yaml components: - description: These are the details of this table display_object_id: true stream: /prediction/some_table title: A table showing something type: TABLE ``` -------------------------------- ### Table Component JSON Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md An example of a Table component configuration in JSON format. This component is used to render data in a tabular structure. ```javascript { "components": [ { "type": "TABLE", "title": "A table showing something" "description": "These are the details of this table", "displayObjectId": true, "stream": "/prediction/some_table" } ] } ``` -------------------------------- ### Variable State Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/protocol-schema/core-types.md An example of a Variable State, mapping a stream to a list of variables. It shows a structure with a 'variables' array containing 'values'. ```JavaScript { "variables": [ { "values": { "doubles": [1001.3, 1002.3, 1003.3] } } ] } ``` -------------------------------- ### Run babel-xvizros Tool Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/ros/tools/xvizros-tool.md Shows how to execute the babel-xvizros tool, which is an alternative way to run the xvizros functionality. This example also dumps topics from a ROS bag file. ```bash ./modules/ros/bin/babel-xvizros bagdump --dumpTopics sample.bag ``` -------------------------------- ### JSON Example for Select Component Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md A JSON configuration for the XVIZ Select component, defining its title, description, type, the stream for options, and the target for the onchange event. ```javascript { "components": [ { "title": "Additional Info Type", "description": "Which type of additional information you want sent", "type": "SELECT", "stream": "/system/additional_info/types", "onchange": { "target": "/system/info/type" } } ] } ``` -------------------------------- ### Time Series State Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/protocol-schema/core-types.md An example of a time_series_state for a system producing multiple values at a specific time. It includes timestamp, streams, and values. ```JavaScript { "timestamp": 12345.5, "streams": [ "/vehicle/torque/commanded", "/vehicle/torque/actual" ], "values": { "doubles": [ 5, 4.8 ] } } ``` -------------------------------- ### Metric Component YAML Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md An example of a Metric component configuration in YAML format. This component is used to render time series data on a chart. ```yaml components: - type: METRIC title: Some metric description: The actual vs commanded value for some variable streams: - /some_value/actual - /some_value/commanded ``` -------------------------------- ### Metric Component JSON Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/declarative-ui/components.md An example of a Metric component configuration in JSON format. This component is used to render time series data on a chart. ```javascript { "components": [ { "title": "Some metric", "type": "METRIC", "description": "The actual vs commanded value for some variable", "streams": ["/some_value/actual", "/some_value/commanded"] } ] } ``` -------------------------------- ### Initialize XVIZFormatWriter and Write Data Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/io/xviz-format-writer.md Demonstrates how to initialize XVIZFormatWriter with a FileSink and a specific format (BINARY_GLB). It then shows how to write metadata and multiple messages using XVIZMetadataBuilder and XVIZBuilder, finally closing the writer. ```javascript import {XVIZMetadataBuilder, XVIZBuilder} from '@xviz/builder'; import {XVIZFormatWriter, XVIZ_FORMAT} from '@xviz/io'; import {FileSink} from '@xviz/io/node'; const sink = new FileSink('output-dir'); const xvizWriter = new XVIZFormatWriter(sink, {format: XVIZ_FORMAT.BINARY_GLB}); const metadataBuilder = new XVIZMetadataBuilder(); // build metadata xvizWriter.writeMetadata(metadataBuilder.getMetadata()); const builder = new XVIZBuilder(); for (let i = 0; i < 10; i++) { // build messages xvizWriter.writeMessage(i, builder.getMessage()); } xvizWriter.close(); ``` -------------------------------- ### Serve KITTI Data with @xviz/server Source: https://github.com/aurora-opensource/xviz/blob/master/modules/server/README.md This snippet demonstrates how to serve KITTI dataset after conversion using the @xviz/server. It involves navigating to the server module directory and executing the server with a specified data directory. ```bash cd modules/server ./bin/babel-xvizserver -d ../../data/generated/kitti/2011_09_26/2011_09_26_drive_0005_sync ``` -------------------------------- ### XVIZ Point Primitive Example Source: https://github.com/aurora-opensource/xviz/blob/master/docs/protocol-schema/geometry-primitives.md A basic example of an XVIZ point primitive, demonstrating the 'points' field which can represent a single point or a point cloud. ```js { "points": [[9, 15, 3], [20, 13, 3], [20, 5, 3]] } ``` -------------------------------- ### Initialize XVIZBinaryReader Source: https://github.com/aurora-opensource/xviz/blob/master/docs/api-reference/io/xviz-binary-reader.md Demonstrates how to initialize the XVIZBinaryReader with a MemorySource and prepare it for reading XVIZ data. This involves importing necessary classes and creating an instance of the reader. ```JavaScript import {XVIZBinaryReader, MemorySource} from '@xviz/io'; const source = new MemorySource(); // XVIZ data added to source const reader = new XVIZBinaryReader(source); ```