Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PGO: Rotation/translation swapped in relative pose noise #482

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Swapping rot/trans in gt_relative_pose, and adding optimizer damping
  • Loading branch information
suddhu committed Apr 10, 2023
commit aa3ad7cae892ece049ceefdf119e95d55792b56c
2 changes: 1 addition & 1 deletion examples/configs/pose_graph/pose_graph_synthetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ profile: True
savemat: True

num_poses: 256
rotation_noise: 0.02
translation_noise: 0.05
mhmukadam marked this conversation as resolved.
Show resolved Hide resolved
rotation_noise: 0.02
loop_closure_ratio: 0.2
loop_closure_outlier_ratio: 0.25
dataset_size: 256
Expand Down
1 change: 1 addition & 0 deletions examples/pose_graph/pose_graph_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def main(cfg):
step_size=1,
linearization_cls=th.SparseLinearization,
linear_solver_cls=th.CholmodSparseSolver,
linear_solver_kwargs={"damping": 1e-6},
vectorize=True,
)

Expand Down
4 changes: 3 additions & 1 deletion examples/pose_graph/pose_graph_synthetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# SE(3) convention in this example is translation then rotation.

import cProfile
import io
import logging
Expand Down Expand Up @@ -121,8 +123,8 @@ def run(cfg: omegaconf.OmegaConf):
dtype = torch.float64
pg, _ = theg.PoseGraphDataset.generate_synthetic_3D(
num_poses=cfg.num_poses,
rotation_noise=cfg.rotation_noise,
translation_noise=cfg.translation_noise,
rotation_noise=cfg.rotation_noise,
loop_closure_ratio=cfg.loop_closure_ratio,
loop_closure_outlier_ratio=cfg.loop_closure_outlier_ratio,
batch_size=cfg.batch_size,
Expand Down
11 changes: 6 additions & 5 deletions theseus/utils/examples/pose_graph/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ def histogram(self) -> str:
@staticmethod
def generate_synthetic_3D(
num_poses: int,
rotation_noise: float = 0.05,
translation_noise: float = 0.1,
rotation_noise: float = 0.05,
loop_closure_ratio: float = 0.2,
loop_closure_outlier_ratio: float = 0.05,
max_num_loop_closures: int = 10,
Expand Down Expand Up @@ -273,8 +273,9 @@ def generate_synthetic_3D(
gt_relative_pose = th.SE3.exp_map(
torch.cat(
[
torch.rand(dataset_size, 3, dtype=dtype) - 0.5,
2.0 * torch.rand(dataset_size, 3, dtype=dtype) - 1,
2.0 * torch.rand(dataset_size, 3, dtype=dtype)
- 1, # translation
torch.rand(dataset_size, 3, dtype=dtype) - 0.5, # rotation
],
dim=1,
)
Expand Down Expand Up @@ -323,7 +324,7 @@ def generate_synthetic_3D(
torch.cat(
[
translation_noise
* (2 * torch.rand(1, 3, dtype=dtype) - 1),
* (2.0 * torch.rand(1, 3, dtype=dtype) - 1),
rotation_noise
* (2.0 * torch.rand(1, 3, dtype=dtype) - 1),
],
Expand Down Expand Up @@ -354,7 +355,7 @@ def generate_synthetic_3D(
noise_pose = th.SE3.exp_map(
torch.cat(
[
translation_noise * (2 * torch.rand(1, 3, dtype=dtype) - 1),
translation_noise * (2.0 * torch.rand(1, 3, dtype=dtype) - 1),
rotation_noise * (2.0 * torch.rand(1, 3, dtype=dtype) - 1),
],
dim=1,
Expand Down