Closed lx-ynu closed 1 year ago
have you solved it? thank you!
You can add some spheres in the viewer using add_spheres(track_points, del_after_show=False) to represent tracks. An example is as follows:
from viewer.viewer import Viewer
import numpy as np
vi = Viewer() # set box_type='OpenPCDet' if you use OpenPCDet boxes
len_dataset = 1000
for i in range(len_dataset):
pseudo_boxes = np.array([[i*0.05, -1, 1, 1, 1, 1, 0], [i*0.05, 1, 1, 1, 1, 1, 0]]) # your boxes
ids = np.array([0,1]) # your boxes ids (optional)
pseudo_points = np.random.randn(100, 3) # your points
vi.add_points(pseudo_points, radius=4, scatter_filed=pseudo_points[:, 0])
vi.add_3D_boxes(pseudo_boxes, ids=ids,caption_size=(0.09,0.09))
vi.add_spheres(pseudo_boxes[:, 0:3],radius=0.03,res=10,color='red',del_after_show=False, alpha=1) # Draw motion track
vi.show_3D() # press the Enter key to view
This won't generate the "trace" as you showed right? This will only generate a point in the box at the current time, just like add cars. Correct me if I'm wrong?
Hello, your paper also shows the motion trajectory drawn by you. I would like to ask if you can provide the relevant code for drawing the motion trajectory?