Robotics StackExchange | Archived questions

Need Help with laser_filter package

I have been trying to get the laser filter package to work and have been asking questions as seen here. I understand that the turtlebot3 uses the /scan topic and not the \base_scan topic. so I removed this line , from my launch file. I get an error when I do this. I am unable to get it to work and am in need of a guide to do so. I have looked at the wiki for the package several times and sill cant figure it out.

Asked by distro on 2022-01-26 15:47:34 UTC

Comments

Hi @distro

Take a look at this repo: https://github.com/ROBOTIS-GIT/turtlebot3_applications/blob/a32dfa1584eb79c2ced1689e7b00e705c4277ef7/turtlebot3_follow_filter/launch/turtlebot3_follow_filter.launch

The launch file shows how laser filter is implemented

Asked by osilva on 2022-01-27 05:02:49 UTC

@osilva I installed the package in the link you proposed. I am getting this error now though when I launch the file.

[ WARN] [1643321298.168853230]: Shutdown request received.
[ WARN] [1643321298.169861311]: Reason given for shutdown: [[/robot_state_publisher] Reason: new node registered with same name]

I dont know how to fix this. I have no idea what two launch files or source code files are have nodes with same name

Asked by distro on 2022-01-27 20:20:13 UTC

I think if you try to run this example along your node for localization or mapping it would be a problem. I sent you this more so you can see how it was implemented the laser filter node is implemented so you can modify your launch file or yaml if need to

Asked by osilva on 2022-01-27 20:39:57 UTC

@osilva it seemed to be working then it started giving me these errors. let me show you my launch file now.

<launch>
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>

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

  <node pkg="laser_filters" type="scan_to_scan_filter_chain" output="screen" name="laser_filter">
    <rosparam command="load" file="$(find test)/my_laser_config.yaml" />
    <param name="~tf_message_filter_target_frame" type="str" value="base_scan" />
    <remap from="scan" to="base_scan" />
    <remap from="scan_filtered" to="/scan_filtered" />
  </node>
</launch>

Asked by distro on 2022-01-27 20:52:51 UTC

I think the sequence may matter. So perhaps try:

< remap from="scan" to="base_scan" />

Ahead of :

<rosparam command="load" file="$(find test)/my_laser_config.yaml" />

Asked by osilva on 2022-01-27 21:07:40 UTC

@osilva, I have it as this now:

<launch>
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>

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

  <node pkg="laser_filters" type="scan_to_scan_filter_chain" output="screen" name="laser_filter">
    <remap from="scan" to="base_scan" />
    <remap from="scan_filtered" to="/scan_filtered" />
    <rosparam command="load" file="$(find test)/my_laser_config.yaml" />
    <param name="~tf_message_filter_target_frame" type="str" value="base_scan" />
  </node>
</launch>

gave me the same error

Asked by distro on 2022-01-27 21:22:27 UTC

Answers