-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43003a4
commit ba9ae88
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
import numpy as np | ||
import pywavemap as wave | ||
|
||
# Load the map | ||
user_home = os.path.expanduser('~') | ||
input_map_path = os.path.join(user_home, "your_map.wvmp") | ||
your_map = wave.Map.load(input_map_path) | ||
|
||
# Define a transformation that flips the map upside down, for illustration | ||
translation = np.array([0.0, 0.0, 0.0]) | ||
rotation = wave.Rotation(w=0.0, x=1.0, y=0.0, z=0.0) | ||
transformation = wave.Pose(rotation, translation) | ||
|
||
# Transform the map | ||
your_map = wave.edit.transform(your_map, transformation) | ||
|
||
# Save the map | ||
output_map_path = os.path.join(user_home, "your_map_transformed.wvmp") | ||
your_map.store(output_map_path) |
This file contains 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
This file contains 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