nan value in the transform

asked 2020-07-01 05:49:30 -0500

anonymous user

Anonymous

updated 2020-07-01 05:58:21 -0500

Hey all,

I'm trying to use gazebo and rvis to simulate a turtlebot's movement. To do so, first I need to set the robot's initial pose but when I do so, I get the following error:

Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (-nan -nan -nan -nan)

I've tried browsing the web for a solution and I concluded that this could be related to a division with 0. However, as of right now, I'm using launch files, which makes the debugging process harder.

I launch the following launch file first:

<launch>
    <include file="$(find turtlebot3_gazebo)/launch/turtlebot3_world.launch"/>
    <include file="$(find simple_navigation_goals)/launch/turtlebot3_navigation.launch"/>
    <include file="$(find simple_navigation_goals)/launch/turtlebot3_gazebo_rviz.launch"/>
</launch>

Which in turn launches the following launch files:

<launch>
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>

  <!-- Turtlebot3 -->
  <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch" />

  <!-- Map server -->
  <arg name="map_file" default="$(find simple_navigation_goals)/config/map.yaml"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)">
  </node>

  <!-- AMCL -->
  <include file="$(find turtlebot3_navigation)/launch/amcl.launch"/>

  <!-- move_base -->
  <arg name="cmd_vel_topic" default="/cmd_vel" />
  <arg name="odom_topic" default="odom" />
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
  <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />

  <rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" />
  <rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" />
  <rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" />
  <rosparam file="$(find turtlebot3_navigation)/param/global_costmap_params.yaml" command="load" />
  <rosparam file="$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" />
  <rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" />

  <remap from="cmd_vel" to="$(arg cmd_vel_topic)"/>
  <remap from="odom" to="$(arg odom_topic)"/>
  </node>
</launch>

and

<launch>
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>

<include file="$(find turtlebot3_bringup)/launch/includes/description.launch.xml">
<arg name="model" value="$(arg model)" />
</include>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find simple_navigation_goals)/config/myconfig.rviz"/>

</launch>

I also have a document with the configuration for rviz (myconfig.rviz) but I didn't include it because it's a very long document and I don't know whether the issue is there or not. If you want to take a look at it, please comment on my question and I will include it.

I just wanted help in sorting out the possible root of the problem.

I'm using ROS Noetic on Ubuntu 20.

Thank you in advance

edit retag flag offensive close merge delete