ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Multiple nodes publishing to same topic in robot_localization package

asked 2017-08-31 17:14:43 -0500

shree gravatar image

In robot_localization package, the nodes publish to /odometry/filtered (hardcoded). If there are 2 nodes - one for odom and one for map, which node is writing to this topic ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-31 18:21:52 -0500

ufr3c_tjc gravatar image

The topic can (and should) be remapped. Otherwise, if you have two instances of robot_localozation, they will BOTH publish to the same output topic (not good). See below for remap example:

  <node name="RobotLocalizationCts" pkg="robot_localization" type="ekf_localization_node" respawn="true" output="screen" clear_params="true">
    <param name="frequency" value="20.0"/>
    <param name="print_diagnostics" value="false"/>
    <param name="sensor_timeout" value="3.0"/>
    <param name="two_d_mode" value="true"/>
    <param name="publish_tf" value="true"/>
    <param name="publish_acceleration" value="false"/>
    <param name="map_frame" value="map"/>
    <param name="odom_frame" value="odom"/>
    <param name="base_link_frame" value="base_footprint"/>
    <param name="world_frame" value="odom"/>
    <remap from="set_pose" to="robot_localization_cts/set_pose"/>
    <remap from="odometry/filtered" to="robot_localization_cts/odom"/>
    ...
    ...
    ...
  </node>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-08-31 17:14:43 -0500

Seen: 834 times

Last updated: Aug 31 '17