I am doing trajectory planning using reinforcement learning and for that I want to see how training is going on for that I want to use real time plotting using figurewidget
currently
1)I have a numpy array of 256256256 which has obstacles
i want to keep these obstacles and want to add dynamic path points.
ia=np.argwhere((img[:,:,:]==1)|(img[:,:,:]==2)|(img[:,:,:]==3))<br />
x1=ia[:,0]<br />
y1=ia[:,1]<br />
z1=ia[:,2]<br />
c=
for i,j,k in zip(x1,y1,z1):
c.append(img[i,j,k])
fig1 = px.scatter_3d(x=x1, y=y1,z=z1,opacity=1.0,color=c,range_x=[0,255],range_y=[0,255],range_z=[0,255])
fig1.update_traces(marker_size = 2)
here i am plotting the numpy image with obstacles
4)
fig2 = go.Figure(data=px.scatter_3d(x=path[:,0], y=path[:,1], z=path[:,2],opacity=1.0))
fig2.update_traces(marker_size = 2)
fig3 = go.Figure(data=fig1.data + fig2.data)
fig3.show()
what i want to do is just update the path points on the obstacle plot,how can ido this?