Skip to content

Commit

Permalink
fix lint issues (#54)
Browse files Browse the repository at this point in the history
Co-authored-by: Maurizio Monge <[email protected]>
  • Loading branch information
maurimo and Maurizio Monge authored Jan 31, 2022
1 parent 0308a9a commit 62a1ae4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion theseus/core/tests/test_objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def test_objective_error():
np.testing.assert_almost_equal(error, expected_objective_error)

# Test the squared error function
squared_error = np.sum(expected_objective_error ** 2)
squared_error = np.sum(expected_objective_error**2)
np.testing.assert_almost_equal(
objective.error_squared_norm().numpy(), squared_error
)
Expand Down
2 changes: 1 addition & 1 deletion theseus/geometry/se2.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def exp_map(tangent_vector: torch.Tensor) -> LieGroup:
idx_small_thetas = theta.abs() < theseus.constants.EPS
if idx_small_thetas.any():
small_theta = theta[idx_small_thetas]
small_theta_sq = small_theta ** 2
small_theta_sq = small_theta**2
sin_theta_by_theta[idx_small_thetas] = -small_theta_sq / 6 + 1
one_minus_cos_theta_by_theta[idx_small_thetas] = (
0.5 * small_theta - small_theta / 24 * small_theta_sq
Expand Down
2 changes: 1 addition & 1 deletion theseus/utils/examples/motion_planning/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def forward(self, batch: Dict[str, Any]):
for t_step in range(1, trajectory_len):
idx = 4 * t_step
cur_t += start_goal_dist / (trajectory_len - 1)
add = 2 * bend_factor * ((cur_t ** 2 - c) / c).view(-1, 1)
add = 2 * bend_factor * ((cur_t**2 - c) / c).view(-1, 1)
trajectory[:, idx : idx + 2] += normal_vector * add

# Compute resulting velocities
Expand Down

0 comments on commit 62a1ae4

Please sign in to comment.