Skip to content

Commit

Permalink
localization launch file
Browse files Browse the repository at this point in the history
  • Loading branch information
hassaan141 authored and VishGit1234 committed Nov 13, 2024
1 parent 84911d7 commit 19901f1
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
31 changes: 31 additions & 0 deletions src/world_modeling/localization/config/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Frame definitions
map_frame: map # Fixed global frame, global navigation
odom_frame: odom # Local reference that tracks robot position over time based on wheel encoders
base_link_frame: base_link # Robot's body frame, centered on the robot and moves with it

#GPS
GPS:
port: /dev/ttyUSB0
baud: 19200

ODOM:
odom0: /odometry_topic # Provides information about robot's position and velocity
odom0_config: [true, true, false,
false, false, true,
true, false, false,
false, false, true,
false, false, false] # 2D configuration for X, Y position, velocity, and YAW

IMU:
imu0: /imu_topic # Inertial measurement unit, provides info on orientation, accelerations, angular velocity
imu0_config: [false, false, false,
false, false, true,
false, false, false,
false, false, true,
true, false, false] # Yaw is important for steering and orientation

# Parameters
frequency: 50
sensor_timeout: 0.1
two_d_mode: true

17 changes: 16 additions & 1 deletion src/world_modeling/localization/launch/localization.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@

def generate_launch_description():
"""Launch localization node."""
config_file = LaunchConfiguration('config', default_value='./config/config.yaml') #getting config we defined in config.yaml


return LaunchDescription([

# Declare the launch argument
DeclareLaunchArgument(
'config',
default_value = config_file,
),

Node(
package='robot_localization',
executable='ekf_localization_node',
name='ekf_localization_node',

Check failure on line 25 in src/world_modeling/localization/launch/localization.launch.py

View workflow job for this annotation

GitHub Actions / Autopep8

src/world_modeling/localization/launch/localization.launch.py#L9-L25

def generate_launch_description(): """Launch localization node.""" - config_file = LaunchConfiguration('config', default_value='./config/config.yaml') #getting config we defined in config.yaml - + config_file = LaunchConfiguration( + 'config', default_value='./config/config.yaml') # getting config we defined in config.yaml return LaunchDescription([ # Declare the launch argument DeclareLaunchArgument( 'config', - default_value = config_file, + default_value=config_file, ), - + Node( package='robot_localization', executable='ekf_localization_node',
parameters=[config_file],
output='screen'
)
])

0 comments on commit 19901f1

Please sign in to comment.