Robotics StackExchange | Archived questions

How to include laser_filters node in turtlebot3_slam.launch?

Actually, I want to visualize the data from the 3D-Laser sensor of turtlebot3-burger using SLAM. For our research, we need to have an angular boundary for laser sensor to be between -pi/4 and +pi/4 rather than original 360 degree. I have created a node in turtlebot3slam.launch[1] file for laserfilters. And, I have created a test.yaml[2] file in the same location where the launch file is. While launching the turtlebot3_slam.launch there were no errors, but I could not find the desired output.

[1] turtlebot3_slam.launch

    <launch>
      <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
      <arg name="slam_methods" default="gmapping" doc="slam type [gmapping, cartographer, hector, karto, frontier_exploration]"/>
      <arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>
      <arg name="open_rviz" default="true"/>

    <!-- added by Sujeet begins -->
      <node pkg="laser_filters" type="scan_to_scan_filter_chain"
          name="laser_filter">
        <rosparam command="load" file="/home/sujeet/catkin_ws/src/turtlebot3/turtlebot3_slam/launch/test.yaml" />
        <remap from="scan" to="base_scan" />
      </node>
      <!-- added by Sujeet ends -->

      <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
        <arg name="model" value="$(arg model)" />
      </include>

      <include file="$(find turtlebot3_slam)/launch/turtlebot3_$(arg slam_methods).launch">
        <arg name="model" value="$(arg model)"/>
        <arg name="configuration_basename" value="$(arg configuration_basename)"/>
      </include>

      <group if="$(arg open_rviz)"> 
        <node pkg="rviz" type="rviz" name="rviz" required="true"
              args="-d $(find turtlebot3_slam)/rviz/turtlebot3_$(arg slam_methods).rviz"/>
      </group>
    </launch>

[2] test.yaml

    scan_filter_chain:
    - name: angle
      type: LaserScanAngularBoundsFilter
      params:
        lower_angle: -0.78
        upper_angle: +0.78

rqt_graph: image description

Asked by sujeet on 2018-07-29 16:58:57 UTC

Comments

Can you please update your question with a copy and paste of the files? That way the question will be self-contained and won't lose value if/when the files disappear (which happens quite often).

Asked by jayess on 2018-07-29 17:22:32 UTC

Please note that you should always copy and paste text and not use images (which makes it a good thing that you weren't able to upload them). Images are not searchable and people can't copy and paste the text from images either.

Asked by jayess on 2018-07-29 17:24:20 UTC

Thanks @jayess, I have put the texts now.

Asked by sujeet on 2018-07-29 17:47:30 UTC

What is the output topics with a scan? Is it really "base_scan"?

Asked by destogl on 2018-07-30 03:18:05 UTC

I don't know about "base_scan" @destogi, I have not changed anything after the installation from the ROS official tutorial except only that node there in the launch file and the new yaml file.

Asked by sujeet on 2018-07-30 09:42:32 UTC

@destogl, here's the image link of rqt_graph. Thanks https://drive.google.com/file/d/1Mt7HGy93h2jL6Jj5dCMAqv52UtOUQs9Q/view?usp=sharing

Asked by sujeet on 2018-07-31 16:10:03 UTC

@sujeet I've given you some karma, can you please update your question with graph uploaded to the question instead? That way the question will be self-contained

Asked by jayess on 2018-07-31 16:12:29 UTC

Answers