How to include laser_filters node in turtlebot3_slam.launch?

asked 2018-07-29 16:58:57 -0500

sujeet gravatar image

updated 2018-07-31 17:24:29 -0500

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 turtlebot3_slam.launch[1] file for laser_filters. 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

edit retag flag offensive close merge delete

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).

jayess gravatar image jayess  ( 2018-07-29 17:22:32 -0500 )edit

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.

jayess gravatar image jayess  ( 2018-07-29 17:24:20 -0500 )edit

Thanks @jayess, I have put the texts now.

sujeet gravatar image sujeet  ( 2018-07-29 17:47:30 -0500 )edit

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

destogl gravatar image destogl  ( 2018-07-30 03:18:05 -0500 )edit

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.

sujeet gravatar image sujeet  ( 2018-07-30 09:42:32 -0500 )edit

@destogl, here's the image link of rqt_graph. Thanks https://drive.google.com/file/d/1Mt7H...

sujeet gravatar image sujeet  ( 2018-07-31 16:10:03 -0500 )edit
1

@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

jayess gravatar image jayess  ( 2018-07-31 16:12:29 -0500 )edit