2 broadcasters error

asked 2019-09-02 12:27:54 -0500

Pakras gravatar image

updated 2019-09-02 12:52:40 -0500

jayess gravatar image

Hi, i have simulation in rviz,so when i start it taking info from 2 broadcasters and it starts shaking , when i see rosrun rqt_tf_tree rqt_tf_tree i have 2 broadcasters with and without prefix and it changing very quiqly . robot_namespace/robot_state_publisher robot_state_publisher i have robot_state_publisher in rviz launch file

  <arg name="model" default="$(find moon)/src/urdf/rmoon.urdf"/>
  <arg name="gui" default="true" />
  <arg name="rvizconfig" default="$(find rviz_moon)/src/rviz.rviz" />
  <param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
  <param name="use_gui" value="$(arg gui)"/>
  <node name="odom_to_tf" pkg="message_to_tf" type="message_to_tf" args="moon/odom">> </node>
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />

and in gazebo launch file

<arg name="robot_name"/>
<arg name="init_pose"/>

<node name="spawn_moon" pkg="gazebo_ros" type="spawn_model"
 args="$(arg init_pose) -urdf -param /robot_description -model $(arg robot_name)"
 respawn="false" output="screen" />

<node pkg="robot_state_publisher" type="state_publisher" 
      name="robot_state_publisher" output="screen"/>

so, how to fix it ?

edit retag flag offensive close merge delete