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

Mesh Nav Update #6

Merged
merged 9 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 11 additions & 3 deletions mesh_navigation_tutorials/config/mbf_mesh_nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ move_base_flex:
cmd_vel_ignored_tolerance: 10.0

mesh_map:
mesh_part: 'mesh'
# input
# mesh_file: '/home/amock/mesh_nav_ws/src/mesh_navigation_tutorials/mesh_navigation_tutorials/maps/parking_garage.ply'
mesh_part: '/'
# storage
# mesh_working_file: 'parking_garage.h5'
mesh_working_part: 'mesh'

# half-edge-mesh implementation
hem: pmp # pmp (default), lvr

layers: ['border', 'height_diff', 'roughness', 'inflation']

Expand All @@ -53,8 +61,8 @@ move_base_flex:
inflation:
type: 'mesh_layers/InflationLayer'
factor: 1.0
inflation_radius: 0.4
inscribed_radius: 0.2
inflation_radius: 0.2
inscribed_radius: 0.4
lethal_value: 1.0
inscribed_value: 0.8
repulsive_field: false
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ def generate_launch_description():
launch_args = [
DeclareLaunchArgument(
"mesh_map_path",
description="Path to the mesh file that defines the map.",
description="Path to the mesh file that defines the map."
"Allowed formats are our internal HDF5 format and all"
"standard mesh formats loadable by Assimp.",
),
DeclareLaunchArgument(
"mesh_map_working_path",
description="Path to the mesh file used by the mesh navigation "
"to store costs during operation. Only HDF5 formats are permitted.",
),
]
mesh_map_path = LaunchConfiguration("mesh_map_path")
mesh_map_working_path = LaunchConfiguration("mesh_map_working_path")

mbf_mesh_nav_config = os.path.join(
get_package_share_directory("mesh_navigation_tutorials"), "config", "mbf_mesh_nav.yaml"
Expand All @@ -60,8 +68,11 @@ def generate_launch_description():
],
parameters=[
mbf_mesh_nav_config,
{"mesh_map.mesh_file": mesh_map_path},
],
{
"mesh_map.mesh_file": mesh_map_path,
"mesh_map.mesh_working_file": mesh_map_working_path
}
]
)

return LaunchDescription(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ def generate_launch_description():
# Comment Alex: One can have different maps for same worlds
# Is this to much choice for a tutorial?

# Launch arguments
# Loading a map files with the following extension
mesh_nav_map_ext = ".ply"

available_map_names = [
f[:-3]
f[:-len(mesh_nav_map_ext)]
for f in os.listdir(os.path.join(pkg_mesh_navigation_tutorials, "maps"))
if f.endswith(".h5")
if f.endswith(mesh_nav_map_ext)
]

# Launch arguments
launch_args = [
DeclareLaunchArgument(
"map_name",
Expand Down Expand Up @@ -165,9 +168,10 @@ def generate_launch_description():
[
pkg_mesh_navigation_tutorials,
"maps",
PythonExpression(['"', map_name, '" + ".h5"']),
PythonExpression(['"', map_name, mesh_nav_map_ext, '"']),
]
),
"mesh_map_working_path": PythonExpression(['"', map_name, '" + ".h5"'])
}.items(),
)

Expand Down
6 changes: 3 additions & 3 deletions source_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ repositories:
lvr2:
type: git
url: https://github.com/uos/lvr2.git
version: humble
version: version-upgrade
mesh_tools:
type: git
url: https://github.com/naturerobots/mesh_tools.git
version: humble
version: lvr-update
mesh_navigation:
type: git
url: https://github.com/naturerobots/mesh_navigation.git
version: humble
version: lvr-update
move_base_flex:
type: git
url: https://github.com/naturerobots/move_base_flex.git
Expand Down
Loading