Skip to content
Deep edited this page Aug 19, 2019 · 3 revisions

Core

All the visualization classes extend this class. Has common methods for subscribing, unsubscribing to topics and updates to the visualization object

Usage

Single topic

import Core from `amphion/src/core`;

const coreInstance = new Core(
  ros,
  '/markers',
  'visualization_msgs/Marker'
)

Multiple topics

import Core from `amphion/src/core`;

const coreInstance = new Core(
  ros,
  [
    { name: '/markers_sphere', messageType: 'visualization_msgs/Marker' },
    { name: '/markers_cube', messageType: 'visualization_msgs/Marker' }
  ]
)

Scene

Extends THREE.Scene.

Usage

import Scene from 'amphion/src/core/scene';

const scene = new Scene(options);

Available options

backgroundColor - Background color of the scene. Default value: #000000
gridCenterlineColor - Color of grid line passing through the origin. Default value: #333333
gridColor - Color of grid lines. Default value: #222222
gridDivisions - Number of divisions of the grid in both x and y direction. Default value: 30
gridSize - Width and length of the grid. Default value: 30

Clone this wiki locally