Need Help with laser_filter package

asked 2022-01-26 14:47:34 -0600

distro gravatar image

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 <remap from="scan" to="base_scan"/>, 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.

edit retag flag offensive close merge delete

Comments

Hi @distro

Take a look at this repo: https://github.com/ROBOTIS-GIT/turtle...

The launch file shows how laser filter is implemented

osilva gravatar image osilva  ( 2022-01-27 04:02:49 -0600 )edit
osilva gravatar image osilva  ( 2022-01-27 04:04:05 -0600 )edit

@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

distro gravatar image distro  ( 2022-01-27 19:20:13 -0600 )edit

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

osilva gravatar image osilva  ( 2022-01-27 19:39:57 -0600 )edit

@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>
distro gravatar image distro  ( 2022-01-27 19:52:51 -0600 )edit

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" />
osilva gravatar image osilva  ( 2022-01-27 20:07:40 -0600 )edit

@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

distro gravatar image distro  ( 2022-01-27 20:22:27 -0600 )edit