Add optional seed argument to CreatePoints::CreatePoints() constructor to fix randomness and gain reproducability in python scripts:
synthetic = mrob.registration.CreatePoints(N_points,N_planes,N_poses, 0.01, 0.0, T0)
# now here every run result will be different
GTtraj = synthetic.get_trajectory()
target = np.array(synthetic.get_point_cloud(0))
May be can add overload for CreatePoints in C++ and add optional argument in python bindings:
#set seeds here if needed
torch.manual_seed(777)
np.random.seed(777)
...
synthetic = mrob.registration.CreatePoints(N_points,N_planes,N_poses, 0.01, 0.0, T0, seed = 777)
# now results are the same every run
GTtraj = synthetic.get_trajectory()
target = np.array(synthetic.get_point_cloud(0))
Or do this in more global manner for all mrob modules in a single line:
mrob.seed(777)
...
synthetic = mrob.registration.CreatePoints(N_points,N_planes,N_poses, 0.01, 0.0, T0)
...
Add optional
seedargument toCreatePoints::CreatePoints()constructor to fix randomness and gain reproducability in python scripts:May be can add overload for
CreatePointsin C++ and add optional argument in python bindings:Or do this in more global manner for all
mrobmodules in a single line: