-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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)
...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request