diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c935c68e..3833fde5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,10 +29,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Act + Docker fix - run: | - sudo chown runner:docker /var/run/docker.sock - - name: Setup ROS2 Workspace and Clone Repositories run: | mkdir -p src diff --git a/rosbot_bringup/config/laser_filter.yaml b/rosbot_bringup/config/laser_filter.yaml new file mode 100644 index 00000000..d00d4ea0 --- /dev/null +++ b/rosbot_bringup/config/laser_filter.yaml @@ -0,0 +1,19 @@ +--- +/**/scan_to_scan_filter_chain: + ros__parameters: + filter1: + name: box_filter + type: laser_filters/LaserScanBoxFilter + params: + box_frame: base_link + + max_x: 0.1 + min_x: -0.12 + + max_y: 0.12 + min_y: -0.12 + + max_z: 0.2 + min_z: 0.0 + + invert: false # activate to remove all points outside of the box diff --git a/rosbot_bringup/launch/bringup.launch.py b/rosbot_bringup/launch/bringup.launch.py index c462a778..e3e1588f 100644 --- a/rosbot_bringup/launch/bringup.launch.py +++ b/rosbot_bringup/launch/bringup.launch.py @@ -83,6 +83,19 @@ def generate_launch_description(): namespace=namespace, ) + laser_filter_config = PathJoinSubstitution([rosbot_bringup, "config", "laser_filter.yaml"]) + + laser_filter_node = Node( + package="laser_filters", + executable="scan_to_scan_filter_chain", + parameters=[laser_filter_config], + remappings=[ + ("/tf", "tf"), + ("/tf_static", "tf_static"), + ], + namespace=namespace, + ) + actions = [ declare_namespace_arg, declare_mecanum_arg, @@ -90,6 +103,7 @@ def generate_launch_description(): SetParameter(name="use_sim_time", value=use_sim), controller_launch, robot_localization_node, + laser_filter_node, ] return LaunchDescription(actions) diff --git a/rosbot_bringup/package.xml b/rosbot_bringup/package.xml index d88edc1b..21c94e76 100644 --- a/rosbot_bringup/package.xml +++ b/rosbot_bringup/package.xml @@ -16,6 +16,7 @@ launch launch_ros + laser_filters rosbot_controller robot_localization micro_ros_agent