Turtlebot3 LiDAR laser_filter package error "Reason: new node registered with same name"
i'm trying to use a laser_filter package to help my turtlebot3 LiDAR data. This is my launch file:
<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>
I get this error when I launch it:
[ 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 where in my files I would have nodes with the same name that I assume publish to /robot_state_plusher
or are named robot_state_publisher
. I need help fixing this issue
robot_state_publisher
is the name of the duplicate node--not topic. Your included launch file (turtlebaot3_remote.launch) contains one such node. If you're running any other launch files, they may also contain a node with the same name. This error also arises if you have a node leftover from a previous launch, e.g., you run a test with your launch file, decide to change a parameter, and try to launch the test again without first stopping the previous run.@tryan The only other launch file I have to run beforehand is the turtlebot3_robot.launch file here:
@tryan Which includes turtlebot3_core.launch:
And turtlebot3_lidar.launch:
None of which as you can see contain any node of name
robot_state_publisher
@tryan Any other ideas to what could be going on?
The launch files, indeed, look fine. This may have been implicit in your reply, but are you starting a fresh session each time? If you don't shut down the master and you happen to have left a
robot_state_publisher
running in a different launch/terminal, it would cause this error. As noted by @ljaniec,rosnode list
is a good way to see which nodes are running. You could look at the list before launching anything to make sure no errant nodes are there, then after each launch to see what has changed.