Skip to content

Commit d37f1d6

Browse files
Add config for localization
1 parent 38c154e commit d37f1d6

File tree

5 files changed

+115
-0
lines changed

5 files changed

+115
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
navsat_transform:
2+
ros__parameters:
3+
frequency: 10.0
4+
delay: 0.0
5+
6+
magnetic_declination_radians: 0.0
7+
yaw_offset: 0.0
8+
zero_altitude: true
9+
10+
broadcast_utm_transform: false
11+
publish_filtered_gps: true
12+
13+
use_odometry_yaw: false # use IMU yaw
14+
wait_for_datum: false
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ukf_global:
2+
ros__parameters:
3+
frequency: 30.0
4+
sensor_timeout: 0.2
5+
two_d_mode: true
6+
7+
map_frame: map
8+
odom_frame: odom
9+
base_link_frame: base_link
10+
world_frame: map
11+
12+
publish_tf: true
13+
14+
odom0: /odometry/gps
15+
odom0_config: [
16+
true, true, false,
17+
false, false, false,
18+
false, false, false,
19+
false, false, false,
20+
false, false, false
21+
]
22+
23+
imu0: /imu/data
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ukf_local:
2+
ros__parameters:
3+
frequency: 50.0
4+
sensor_timeout: 0.1
5+
two_d_mode: true
6+
7+
map_frame: map
8+
odom_frame: odom
9+
base_link_frame: base_link
10+
world_frame: odom
11+
12+
publish_tf: true
13+
publish_acceleration: false
14+
15+
imu0: /imu/data
16+
imu0_config: [
17+
false, false, false, # position
18+
true, true, true, # orientation (Mahony)
19+
false, false, false, # velocity
20+
true, true, true, # angular velocity
21+
true, true, true # linear acceleration
22+
]
23+
24+
imu0_remove_gravitational_acceleration: false
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
from launch import LaunchDescription
2+
from launch_ros.actions import Node
3+
from launch_ros.substitutions import FindPackageShare
4+
from launch.substitutions import PathJoinSubstitution
5+
6+
def generate_launch_description():
7+
ukf_local_yaml = PathJoinSubstitution([
8+
FindPackageShare('localization_dev'),
9+
'config',
10+
'ukf_local.yaml'
11+
])
12+
ukf_global_yaml = PathJoinSubstitution([
13+
FindPackageShare('localization_dev'),
14+
'config',
15+
'ukf_global.yaml'
16+
])
17+
navsat_yaml = PathJoinSubstitution([
18+
FindPackageShare('localization_dev'),
19+
'config',
20+
'navsat.yaml'
21+
])
22+
return LaunchDescription([
23+
24+
Node(
25+
package='robot_localization',
26+
executable='ukf_node',
27+
name='ukf_local',
28+
output='screen',
29+
parameters=[ukf_local_yaml],
30+
remappings=[('odometry/filtered', 'odometry/filtered')]
31+
),
32+
33+
Node(
34+
package='robot_localization',
35+
executable='navsat_transform_node',
36+
name='navsat_transform',
37+
output='screen',
38+
parameters=[navsat_yaml]
39+
),
40+
41+
Node(
42+
package='robot_localization',
43+
executable='ukf_node',
44+
name='ukf_global',
45+
output='screen',
46+
parameters=[ukf_global_yaml]
47+
),
48+
])

src/localization_dev/setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from setuptools import find_packages, setup
2+
import os
3+
from glob import glob
24

35
package_name = 'localization_dev'
46

@@ -10,6 +12,10 @@
1012
('share/ament_index/resource_index/packages',
1113
['resource/' + package_name]),
1214
('share/' + package_name, ['package.xml']),
15+
(os.path.join('share', package_name, 'launch'),
16+
glob('launch/*.py')),
17+
(os.path.join('share', package_name, 'config'),
18+
glob('config/*.yaml')),
1319
],
1420
install_requires=['setuptools', 'numpy'],
1521
zip_safe=True,

0 commit comments

Comments
 (0)