From c7ada24759a2942bd5aa10f6a42b0acbe0888830 Mon Sep 17 00:00:00 2001 From: timon-mathis Date: Fri, 24 Feb 2023 10:39:14 +0100 Subject: [PATCH 1/4] mag true added to launch file complementary_filter --- imu_complementary_filter/launch/complementary_filter.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imu_complementary_filter/launch/complementary_filter.launch.py b/imu_complementary_filter/launch/complementary_filter.launch.py index 71fc01a7..0a931ee1 100644 --- a/imu_complementary_filter/launch/complementary_filter.launch.py +++ b/imu_complementary_filter/launch/complementary_filter.launch.py @@ -13,7 +13,7 @@ def generate_launch_description(): parameters=[ {'do_bias_estimation': True}, {'do_adaptive_gain': True}, - {'use_mag': False}, + {'use_mag': True}, {'gain_acc': 0.01}, {'gain_mag': 0.01}, ], From 3dff8a9cb56f4c1f9cbcb03f7d3c630ff8defd2e Mon Sep 17 00:00:00 2001 From: timon-mathis Date: Fri, 24 Feb 2023 13:49:28 +0100 Subject: [PATCH 2/4] changes so launch file works --- imu_complementary_filter/launch/complementary_filter.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imu_complementary_filter/launch/complementary_filter.launch.py b/imu_complementary_filter/launch/complementary_filter.launch.py index 0a931ee1..65aa9834 100644 --- a/imu_complementary_filter/launch/complementary_filter.launch.py +++ b/imu_complementary_filter/launch/complementary_filter.launch.py @@ -7,7 +7,7 @@ def generate_launch_description(): [ Node( package='imu_complementary_filter', - node_executable='complementary_filter_node', + executable='complementary_filter_node', name='complementary_filter_gain_node', output='screen', parameters=[ From 747a094174954f34b493e5c2d5c3b799827a80fe Mon Sep 17 00:00:00 2001 From: timon-mathis Date: Fri, 24 Feb 2023 14:03:52 +0100 Subject: [PATCH 3/4] second launch file works as well --- .../launch/complementary_filter.launch.py | 2 +- imu_filter_madgwick/launch/imu_filter.launch.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imu_complementary_filter/launch/complementary_filter.launch.py b/imu_complementary_filter/launch/complementary_filter.launch.py index 65aa9834..b6cce836 100644 --- a/imu_complementary_filter/launch/complementary_filter.launch.py +++ b/imu_complementary_filter/launch/complementary_filter.launch.py @@ -13,7 +13,7 @@ def generate_launch_description(): parameters=[ {'do_bias_estimation': True}, {'do_adaptive_gain': True}, - {'use_mag': True}, + {'use_mag': False}, {'gain_acc': 0.01}, {'gain_mag': 0.01}, ], diff --git a/imu_filter_madgwick/launch/imu_filter.launch.py b/imu_filter_madgwick/launch/imu_filter.launch.py index 930f928f..90d123bb 100644 --- a/imu_filter_madgwick/launch/imu_filter.launch.py +++ b/imu_filter_madgwick/launch/imu_filter.launch.py @@ -14,8 +14,8 @@ def generate_launch_description(): [ launch_ros.actions.Node( package='imu_filter_madgwick', - node_executable='imu_filter_madgwick_node', - node_name='imu_filter', + executable='imu_filter_madgwick_node', + name='imu_filter', output='screen', parameters=[os.path.join(config_dir, 'imu_filter.yaml')], ) From 62ac11ec021eef4663665f5404c5cab1cd3c33a7 Mon Sep 17 00:00:00 2001 From: timon-mathis Date: Fri, 24 Feb 2023 14:42:31 +0100 Subject: [PATCH 4/4] launch file with magnetometer --- imu_complementary_filter/launch/complementary_filter.launch.py | 2 +- imu_complementary_filter/src/complementary_filter_ros.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imu_complementary_filter/launch/complementary_filter.launch.py b/imu_complementary_filter/launch/complementary_filter.launch.py index b6cce836..65aa9834 100644 --- a/imu_complementary_filter/launch/complementary_filter.launch.py +++ b/imu_complementary_filter/launch/complementary_filter.launch.py @@ -13,7 +13,7 @@ def generate_launch_description(): parameters=[ {'do_bias_estimation': True}, {'do_adaptive_gain': True}, - {'use_mag': False}, + {'use_mag': True}, {'gain_acc': 0.01}, {'gain_mag': 0.01}, ], diff --git a/imu_complementary_filter/src/complementary_filter_ros.cpp b/imu_complementary_filter/src/complementary_filter_ros.cpp index e8a9dd74..56c9237d 100644 --- a/imu_complementary_filter/src/complementary_filter_ros.cpp +++ b/imu_complementary_filter/src/complementary_filter_ros.cpp @@ -106,7 +106,7 @@ void ComplementaryFilterROS::initializeParams() reverse_tf_ = this->declare_parameter("reverse_tf", false); constant_dt_ = this->declare_parameter("constant_dt", 0.0); publish_debug_topics_ = - this->declare_parameter("publish_debug_topics", false); + this->declare_parameter("publish_debug_topics", true); gain_acc = this->declare_parameter("gain_acc", 0.01); gain_mag = this->declare_parameter("gain_mag", 0.01); do_bias_estimation =