Skip to content

Commit

Permalink
adjust covariance - note, it still doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
Ampers8nd committed Nov 6, 2024
1 parent e80c97f commit 4772e1b
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 68 deletions.
11 changes: 5 additions & 6 deletions urc_localization/config/ekf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ekf_filter_node_odom:
imu_remove_gravitational_acceleration: true

use_control: false
process_noise_covariance: [1.0,1.0,1e-3,0.3,0.3,0.01,0.5,0.5,0.1,0.3,0.3,0.3,0.3,0.3,0.3]
initial_estimate_covariance: [1.0,1.0,1e-9,1.0,1.0,1e-9,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
process_noise_covariance: [1e-6,1e-6,1e-3,1e-6,1e-6,0.01,0.5,0.5,0.1,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6]
initial_estimate_covariance: [1e-6,1e-6,1e-9,1e-6,1e-6,1e-9,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6]

ekf_filter_node_map:
ros__parameters:
Expand Down Expand Up @@ -78,8 +78,8 @@ ekf_filter_node_map:
imu_remove_gravitational_acceleration: true

use_control: false
process_noise_covariance: [1.0,1.0,1e-3,0.3,0.3,0.01,0.5,0.5,0.1,0.3,0.3,0.3,0.3,0.3,0.3]
initial_estimate_covariance: [1.0,1.0,1e-9,1.0,1.0,1e-9,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
process_noise_covariance: [1e-6,1e-6,1e-3,1e-6,1e-6,0.01,0.5,0.5,0.1,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6]
initial_estimate_covariance: [1e-6,1e-6,1e-9,1e-6,1e-6,1e-9,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6,1e-6]



Expand All @@ -88,6 +88,7 @@ navsat_transform:
# Frequency of the main run loop
frequency: 30.0

imu0: "/imu/data"
# Delay time, in seconds, before we calculate the transform from the UTM frame to your world frame.
delay: 3.0
magnetic_declination_radians: 0.0
Expand All @@ -97,6 +98,4 @@ navsat_transform:
publish_filtered_gps: true
use_odometry_yaw: false
wait_for_datum: false



124 changes: 62 additions & 62 deletions urc_localization/launch/dual_ekf_navsat.launch.py
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
# Copyright 2018 Open Source Robotics Foundation, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# # Copyright 2018 Open Source Robotics Foundation, Inc.
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable law or agreed to in writing, software
# # distributed under the License is distributed on an "AS IS" BASIS,
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# # See the License for the specific language governing permissions and
# # limitations under the License.

from launch import LaunchDescription
from ament_index_python.packages import get_package_share_directory
import launch_ros.actions
import os
import launch.actions
# from launch import LaunchDescription
# from ament_index_python.packages import get_package_share_directory
# import launch_ros.actions
# import os
# import launch.actions


def generate_launch_description():
gps_wpf_dir = get_package_share_directory("urc_localization")
rl_params_file = os.path.join(gps_wpf_dir, "config", "dual_ekf_navsat_params.yaml")
# def generate_launch_description():
# gps_wpf_dir = get_package_share_directory("urc_localization")
# rl_params_file = os.path.join(gps_wpf_dir, "config", "dual_ekf_navsat_params.yaml")

return LaunchDescription(
[
launch.actions.DeclareLaunchArgument(
"output_final_position", default_value="false"
),
launch.actions.DeclareLaunchArgument(
"output_location", default_value="~/dual_ekf_navsat_example_debug.txt"
),
# launch_ros.actions.Node(
# package="robot_localization",
# executable="ekf_node",
# name="ekf_filter_node_odom",
# output="screen",
# parameters=[rl_params_file, {"use_sim_time": True}],
# remappings=[("odometry/filtered", "odometry/local")],
# ),
# launch_ros.actions.Node(
# package="robot_localization",
# executable="ekf_node",
# name="ekf_filter_node_map",
# output="screen",
# parameters=[rl_params_file, {"use_sim_time": True}],
# remappings=[("odometry/filtered", "odometry/global")],
# ),
launch_ros.actions.Node(
package="robot_localization",
executable="navsat_transform_node",
name="navsat_transform",
output="screen",
parameters=[rl_params_file, {"use_sim_time": True}],
remappings=[
# Subscribes to
("imu", "imu/data"),
("gps/fix", "gps/data"),
("odometry/filtered", "rover_drivetrain_controller/odom"),
# Publishes to
("gps/filtered", "gps/filtered"),
("odometry/gps", "odometry/gps"),
],
),
]
)
# return LaunchDescription(
# [
# launch.actions.DeclareLaunchArgument(
# "output_final_position", default_value="false"
# ),
# launch.actions.DeclareLaunchArgument(
# "output_location", default_value="~/dual_ekf_navsat_example_debug.txt"
# ),
# # launch_ros.actions.Node(
# # package="robot_localization",
# # executable="ekf_node",
# # name="ekf_filter_node_odom",
# # output="screen",
# # parameters=[rl_params_file, {"use_sim_time": True}],
# # remappings=[("odometry/filtered", "odometry/local")],
# # ),
# # launch_ros.actions.Node(
# # package="robot_localization",
# # executable="ekf_node",
# # name="ekf_filter_node_map",
# # output="screen",
# # parameters=[rl_params_file, {"use_sim_time": True}],
# # remappings=[("odometry/filtered", "odometry/global")],
# # ),
# launch_ros.actions.Node(
# package="robot_localization",
# executable="navsat_transform_node",
# name="navsat_transform",
# output="screen",
# parameters=[rl_params_file, {"use_sim_time": True}],
# remappings=[
# # Subscribes to
# ("imu", "imu/data"),
# ("gps/fix", "gps/data"),
# ("odometry/filtered", "rover_drivetrain_controller/odom"),
# # Publishes to
# ("gps/filtered", "gps/filtered"),
# ("odometry/gps", "odometry/gps"),
# ],
# ),
# ]
# )

0 comments on commit 4772e1b

Please sign in to comment.