1.2.4 • Published 4 years ago
three-dimensional v1.2.4
visualization
3D visualization npm module for Dorabot project that does not use typescript.
Install
$ yarn add three-dimensional
or
$ npm install three-dimensional
Import
import initThree from 'three-dimensional/lib'
Call Function
initThree(robot_info, robot_collision_info, bin_position, robotData, pointCloud, id)
Note:
Five parameters needed
robot_info/robot_collision_info =[
{
frame_id:'', // mapping robot data child_frame_id('f_link','s_link','l_link',etc)
filePath:'', // 3D model (.stl file) path
color:'' // model color(default:0x3155a5)
}
]
# Information of the elements that needed to be rendered on the scene;
init_position = [{
size:[2.8, 0.8, 0.01], // size
color: 0x555555, // color
pose:[2.42, 0, 1.3], // position
type:'', // box/conveyor/''
draggable:false // 'if object can be dragged'
}]
# Robot position and orientation
robotData = [{
{"child_frame_id":"gp12_rotational_fixed_base_link","frame_id":"world_frame","pose":{"orientation":{"w":1.0,"x":0.0,"y":0.0,"z":0.0},"position":{"x":0.0,"y":0.0,"z":0.0}},"stamp":{"nsec":1570594000635174919}},
}]
# Point cloud data
pointcloud: .pcd ( point cloud data) file path
# id name
id: id name of the container that render 3D visualization scene, if the value is null, it will be rendered in the body.