-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add yaml file with parameters and include it in CMakeLists * include the yaml in the launch file * add qos overriding options and change topic namespaces * fix typos in param names * add imu/mag topic params to yaml config file * format launch.py file * format files with clang-format --------- Signed-off-by: Aleksander Szymański <bitterisland6@gmail.com>
- Loading branch information
1 parent
f089c6d
commit 11bf900
Showing
4 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
complementary_filter_gain_node: | ||
ros__parameters: | ||
gain_acc: 0.01 | ||
gain_mag: 0.01 | ||
bias_alpha: 0.01 | ||
do_bias_estimation: true | ||
do_adaptive_gain: true | ||
use_mag: false | ||
fixed_frame: "odom" | ||
publish_tf: false | ||
reverse_tf: false | ||
constant_dt: 0.0 | ||
publish_debug_topics: false | ||
|
||
qos_overrides: | ||
/imu/data_raw: | ||
subscription: | ||
depth: 10 | ||
durability: volatile | ||
history: keep_last | ||
reliability: reliable | ||
|
||
/imu/mag: | ||
subscription: | ||
depth: 10 | ||
durability: volatile | ||
history: keep_last | ||
reliability: reliable |
30 changes: 14 additions & 16 deletions
30
imu_complementary_filter/launch/complementary_filter.launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import os | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
return LaunchDescription( | ||
[ | ||
Node( | ||
package='imu_complementary_filter', | ||
executable='complementary_filter_node', | ||
name='complementary_filter_gain_node', | ||
output='screen', | ||
parameters=[ | ||
{'do_bias_estimation': True}, | ||
{'do_adaptive_gain': True}, | ||
{'use_mag': False}, | ||
{'gain_acc': 0.01}, | ||
{'gain_mag': 0.01}, | ||
], | ||
) | ||
] | ||
ld = LaunchDescription() | ||
|
||
config = os.path.join(get_package_share_directory('imu_complementary_filter'), 'config', 'filter_config.yaml') | ||
|
||
node = Node( | ||
package='imu_complementary_filter', | ||
executable='complementary_filter_node', | ||
name='complementary_filter_gain_node', | ||
output='screen', | ||
parameters=[config], | ||
) | ||
ld.add_action(node) | ||
return ld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters