Skip to content

Commit 6d90e75

Browse files
committed
mapping updates (#96)
1 parent 81f5986 commit 6d90e75

File tree

4 files changed

+78
-48
lines changed

4 files changed

+78
-48
lines changed

configs/mp_400/mapping.yaml

+12-19
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,13 @@ slam_toolbox:
1616
scan_topic: /scan
1717
mode: mapping #localization
1818

19-
# if you'd like to immediately start continuing a map at a given pose
20-
# or at the dock, but they are mutually exclusive, if pose is given
21-
# will use pose
22-
#map_file_name: test_steve
23-
#map_start_pose: [0.0, 0.0, 0.0]
24-
#map_start_at_dock: true
25-
2619
debug_logging: false
2720
throttle_scans: 1
2821
transform_publish_period: 0.02 #if 0 never publishes odometry
2922
map_update_interval: 5.0
30-
resolution: 0.05
23+
resolution: 0.03
3124
max_laser_range: 20.0 #for rastering images
32-
minimum_time_interval: 0.5
25+
minimum_time_interval: 0.25
3326
transform_timeout: 0.2
3427
tf_buffer_duration: 30.
3528
stack_size_to_use: 40000000 #// program needs a larger stack size to serialize large maps
@@ -38,31 +31,31 @@ slam_toolbox:
3831
# General Parameters
3932
use_scan_matching: true
4033
use_scan_barycenter: true
41-
minimum_travel_distance: 0.5
42-
minimum_travel_heading: 0.5
34+
minimum_travel_distance: 0.3
35+
minimum_travel_heading: 0.3
4336
scan_buffer_size: 10
44-
scan_buffer_maximum_scan_distance: 10.0
37+
scan_buffer_maximum_scan_distance: 5.0
4538
link_match_minimum_response_fine: 0.1
4639
link_scan_maximum_distance: 1.5
47-
loop_search_maximum_distance: 3.0
40+
loop_search_maximum_distance: 1.5
4841
do_loop_closing: true
4942
loop_match_minimum_chain_size: 10
50-
loop_match_maximum_variance_coarse: 3.0
51-
loop_match_minimum_response_coarse: 0.35
52-
loop_match_minimum_response_fine: 0.45
43+
loop_match_maximum_variance_coarse: 1.5
44+
loop_match_minimum_response_coarse: 0.25
45+
loop_match_minimum_response_fine: 0.4
5346

5447
# Correlation Parameters - Correlation Parameters
55-
correlation_search_space_dimension: 0.5
48+
correlation_search_space_dimension: 0.3
5649
correlation_search_space_resolution: 0.01
5750
correlation_search_space_smear_deviation: 0.1
5851

5952
# Correlation Parameters - Loop Closure Parameters
60-
loop_search_space_dimension: 8.0
53+
loop_search_space_dimension: 1.0
6154
loop_search_space_resolution: 0.05
6255
loop_search_space_smear_deviation: 0.03
6356

6457
# Scan Matcher Parameters
65-
distance_variance_penalty: 0.5
58+
distance_variance_penalty: 0.3
6659
angle_variance_penalty: 1.0
6760

6861
fine_search_angle_offset: 0.00349

configs/mp_500/mapping.yaml

+12-19
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,13 @@ slam_toolbox:
1616
scan_topic: /scan
1717
mode: mapping #localization
1818

19-
# if you'd like to immediately start continuing a map at a given pose
20-
# or at the dock, but they are mutually exclusive, if pose is given
21-
# will use pose
22-
#map_file_name: test_steve
23-
#map_start_pose: [0.0, 0.0, 0.0]
24-
#map_start_at_dock: true
25-
2619
debug_logging: false
2720
throttle_scans: 1
2821
transform_publish_period: 0.02 #if 0 never publishes odometry
2922
map_update_interval: 5.0
30-
resolution: 0.05
23+
resolution: 0.03
3124
max_laser_range: 20.0 #for rastering images
32-
minimum_time_interval: 0.5
25+
minimum_time_interval: 0.25
3326
transform_timeout: 0.2
3427
tf_buffer_duration: 30.
3528
stack_size_to_use: 40000000 #// program needs a larger stack size to serialize large maps
@@ -38,31 +31,31 @@ slam_toolbox:
3831
# General Parameters
3932
use_scan_matching: true
4033
use_scan_barycenter: true
41-
minimum_travel_distance: 0.5
42-
minimum_travel_heading: 0.5
34+
minimum_travel_distance: 0.3
35+
minimum_travel_heading: 0.3
4336
scan_buffer_size: 10
44-
scan_buffer_maximum_scan_distance: 10.0
37+
scan_buffer_maximum_scan_distance: 5.0
4538
link_match_minimum_response_fine: 0.1
4639
link_scan_maximum_distance: 1.5
47-
loop_search_maximum_distance: 3.0
40+
loop_search_maximum_distance: 1.5
4841
do_loop_closing: true
4942
loop_match_minimum_chain_size: 10
50-
loop_match_maximum_variance_coarse: 3.0
51-
loop_match_minimum_response_coarse: 0.35
52-
loop_match_minimum_response_fine: 0.45
43+
loop_match_maximum_variance_coarse: 1.5
44+
loop_match_minimum_response_coarse: 0.25
45+
loop_match_minimum_response_fine: 0.4
5346

5447
# Correlation Parameters - Correlation Parameters
55-
correlation_search_space_dimension: 0.5
48+
correlation_search_space_dimension: 0.3
5649
correlation_search_space_resolution: 0.01
5750
correlation_search_space_smear_deviation: 0.1
5851

5952
# Correlation Parameters - Loop Closure Parameters
60-
loop_search_space_dimension: 8.0
53+
loop_search_space_dimension: 1.0
6154
loop_search_space_resolution: 0.05
6255
loop_search_space_smear_deviation: 0.03
6356

6457
# Scan Matcher Parameters
65-
distance_variance_penalty: 0.5
58+
distance_variance_penalty: 0.3
6659
angle_variance_penalty: 1.0
6760

6861
fine_search_angle_offset: 0.00349

configs/mpo_700/mapping.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ slam_toolbox:
2626
debug_logging: false
2727
throttle_scans: 1
2828
transform_publish_period: 0.02 #if 0 never publishes odometry
29-
map_update_interval: 5.0
30-
resolution: 0.05
31-
max_laser_range: 20.0 #for rastering images
32-
minimum_time_interval: 0.5
29+
map_update_interval: 2.0
30+
resolution: 0.03
31+
max_laser_range: 29.0 #for rastering images
32+
minimum_time_interval: 0.25
3333
transform_timeout: 0.2
3434
tf_buffer_duration: 30.
3535
stack_size_to_use: 40000000 #// program needs a larger stack size to serialize large maps
@@ -38,18 +38,18 @@ slam_toolbox:
3838
# General Parameters
3939
use_scan_matching: true
4040
use_scan_barycenter: true
41-
minimum_travel_distance: 0.5
42-
minimum_travel_heading: 0.5
41+
minimum_travel_distance: 0.3
42+
minimum_travel_heading: 0.3
4343
scan_buffer_size: 10
44-
scan_buffer_maximum_scan_distance: 10.0
44+
scan_buffer_maximum_scan_distance: 5.0
4545
link_match_minimum_response_fine: 0.1
4646
link_scan_maximum_distance: 1.5
4747
loop_search_maximum_distance: 3.0
4848
do_loop_closing: true
4949
loop_match_minimum_chain_size: 10
50-
loop_match_maximum_variance_coarse: 3.0
51-
loop_match_minimum_response_coarse: 0.35
52-
loop_match_minimum_response_fine: 0.45
50+
loop_match_maximum_variance_coarse: 1.5
51+
loop_match_minimum_response_coarse: 0.25
52+
loop_match_minimum_response_fine: 0.4
5353

5454
# Correlation Parameters - Correlation Parameters
5555
correlation_search_space_dimension: 0.5

launch/mapping.launch.py

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Neobotix GmbH
2+
# Author: Pradheep Padmanabhan
3+
4+
import os
5+
from ament_index_python.packages import get_package_share_directory
6+
import launch
7+
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
8+
from launch import LaunchDescription
9+
from launch.substitutions import LaunchConfiguration
10+
from launch.launch_description_sources import PythonLaunchDescriptionSource
11+
12+
def generate_launch_description():
13+
ld = LaunchDescription()
14+
15+
param_file_arg = LaunchConfiguration('param_file')
16+
17+
# Check for the robot with which mapping needs to be done
18+
with open('robot_name.txt', 'r') as file:
19+
my_neo_robot = file.read()
20+
21+
# Declare launch argument for parameter file
22+
declare_param_file_arg = DeclareLaunchArgument(
23+
'param_file',
24+
default_value = os.path.join(
25+
get_package_share_directory('neo_simulation2'),
26+
'configs/' + my_neo_robot,
27+
'mapping.yaml'),
28+
description='Param file that needs to be used for navigation, sets according to robot by default'
29+
)
30+
31+
ld.add_action(declare_param_file_arg)
32+
nav2_launch_file_dir = os.path.join(get_package_share_directory('neo_nav2_bringup'), 'launch')
33+
34+
mapping = IncludeLaunchDescription(
35+
PythonLaunchDescriptionSource([nav2_launch_file_dir, '/mapping.launch.py']),
36+
launch_arguments={
37+
'use_sim_time': 'true',
38+
'params_file': param_file_arg,
39+
}.items(),
40+
)
41+
42+
ld.add_action(mapping)
43+
44+
return ld

0 commit comments

Comments
 (0)