Repository navigation
Conversation
Replace the hand-written rotation matrices in XYArray.homogeneous_transformation() and InformedRrtStarPathPlanner.sample_informed() with rot_mat_22, add the translation in XYArray with plain broadcasting, and add a docstring to rot_mat_22. Behavior is unchanged. Closes ShisatoYano#125
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #125.
Overview
XYArray.homogeneous_transformation()now usesrot_mat_22instead of a hand-written rotation matrix, and adds the translation with plain broadcasting (+ np.array([[x], [y]])) instead ofnp.ones(shape) * [[x], [y]].InformedRrtStarPathPlanner.sample_informed()now usesrot_mat_22(theta)for its rotation matrix.rot_mat_22gets a docstring in the same style ashom_mat_33.Both files load
matrix_libwith the samesys.path.append(...)pattern the existing code uses. The other-sinmatches insrc/components(cubic spline course, L-shape fitting) are projections, not rotation matrices, so I left them as they are. Behavior is unchanged.How I confirmed it works
rot_mat_22builds the same matrix as the code it replaces, and broadcasting a 2x1 column gives the same result as multiplying it withnp.onesfirst.test_xy_array.py(includingtest_homogeneous_transformation),test_matrix_lib.pyandtest_informed_rrt_star_path_planning.py, which run in GitHub Actions on this PR.