Robot Model blinking with robot_localization package
Hello!
It appears when I run my robot localization package with my ROS rover simulation, the RVIZ file shows my model flickering and not stable. Furthermore the /odometry/filtered doesn't seem to be visualized as my /odom topic seems to be.
I ran roswtf and got :
Found 2 error(s).
ERROR TF multiple authority contention:
* node [/ekf_se] publishing transform [base_link] with parent [odom] already published by node [/gazebo]
* node [/gazebo] publishing transform [base_link] with parent [odom] already published by node [/ekf_se]
I am confused as to how to resolve this discrepancy.
How do I stop gazebo from broadcasting the odom -> base_link transform? I believe gazebo is publishing the transform automatically so I'm unsure how to remap it if its not in my launch file.
Here is my launch file:
<launch>
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="model" default="$(find ros_robotics)/urdf/dd_robot.urdf.xacro"/>
<arg name="rvizconfig" default="$(find ros_robotics)/dd_rviz.rviz"/>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include> -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<!--arg name="world_name" value="$(find mybot_gazebo)/worlds/mybot.world"/-->
<arg name="world_name" value="$(find mybot_gazebo)/worlds/turtlebot_playground.world"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="headless" value="$(arg headless)"/>
<arg name="debug" value="$(arg debug)"/>
</include>
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="-z 1.0 -unpause -urdf -model robot -param robot_description"
respawn="false" output="screen">
<remap from="tf" to="gazebo_tf"/>
</node>
<!-- convert joint states to TF transforms for rviz, etc -->
<node name="joint_state_publisher" pkg="joint_state_publisher"
type="joint_state_publisher"></node>
<node name="robot_state_publisher" pkg="robot_state_publisher"
type="state_publisher" />
<!-- load the controllers -->
<node name="controller_spawner" pkg="controller_manager"
type="spawner" respawn="false"
output="screen" args="dd_robot_joint_state_controller"/>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
</launch>
THanks!
Asked by jawsqb on 2018-11-09 10:11:59 UTC
Answers
I was able to resolve the parent conflict by stopping gazebo from publishing to 'tf' and remapping it to 'gazebo_tf'
In my empty_world.launch file:
<!-- start gazebo server-->
<node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="false" output="screen"
args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics) $(arg extra_gazebo_args) $(arg world_name)">
<remap from="tf" to="gazebo_tf"/>
</node>
Asked by jawsqb on 2018-11-11 15:34:20 UTC
Comments