not able to display robot model

asked 2017-03-01 17:58:16 -0500

krishna43 gravatar image

updated 2017-03-01 18:10:17 -0500

Hello all,

I am trying to display robot model in RViz and I am always getting the following error

No transform from [base_footprint] to [map]

This is my launch file

  Turtlebot navigation simulation:
  - stage
  - map_server
  - move_base
  - static map
  - amcl
  - rviz view
  <arg name="base"       default="$(optenv TURTLEBOT_BASE kobuki)"/>  <!-- create, rhoomba -->
  <arg name="stacks"     default="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons -->
  <arg name="3d_sensor"  default="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro -->

  <!-- Name of the map to use (without path nor extension) and initial position -->
  <arg name="map_file"       default="$(find hp_simulators)/maps/map.yaml"/> <!-- robopark_plan -->
  <arg name="initial_pose_x" default="2.0"/>
  <arg name="initial_pose_y" default="2.0"/>
  <arg name="initial_pose_a" default="0.0"/>

  <param name="/use_sim_time" value="true"/>
   <param name="robot_description" command="cat $(find hp_autonomous_navigation)/robots/turtlebot.urdf"/>

   <!--  ***************** Robot Model *****************  -->
  <include file="$(find turtlebot_bringup)/launch/includes/robot.launch.xml">
    <arg name="base" value="$(arg base)" />
    <arg name="stacks" value="$(arg stacks)" />
    <arg name="3d_sensor" value="$(arg 3d_sensor)" />
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <param name="use_gui" value="true"/>

  <!-- Command Velocity multiplexer -->
  <node pkg="nodelet" type="nodelet" name="mobile_base_nodelet_manager" args="manager"/>
  <node pkg="nodelet" type="nodelet" name="cmd_vel_mux" args="load yocs_cmd_vel_mux/CmdVelMuxNodelet mobile_base_nodelet_manager">
    <param name="yaml_cfg_file" value="$(find turtlebot_bringup)/param/mux.yaml"/>
    <remap from="cmd_vel_mux/output" to="mobile_base/commands/velocity"/>

  <!--  ************** Navigation  ***************  -->
  <include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml"/>

  <!--  ****** Maps ***** -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)">
    <param name="frame_id" value="/map"/>

Can anyone tell me what's wrong with my launch file?


edit retag flag offensive close merge delete


Hey,can you upload a screenshot of the tf_tree? maybe you need to transform from map to world to fix it. try adding - <node pkg="tf" type="static_transform_publisher" name="world_to_map" args="0 0 0 0 0 0 /map /world 100"/>

AA gravatar image AA  ( 2017-03-01 19:14:39 -0500 )edit

I'm not sure there's anything wrong with your launch file; maybe you just need to change the fixed_frame in rviz to base_link

ahendrix gravatar image ahendrix  ( 2017-03-02 00:13:34 -0500 )edit

@AA when i added static tf i am able to see the robot model, but when i give it a goal pose using Rviz it doesn't move. ( I am running amcl). This is what I am trying to solve: I have a map of my building and I want to bring it up in Rviz ( just like turtlebot_stage but without stage) and (1/2)

krishna43 gravatar image krishna43  ( 2017-03-02 11:44:19 -0500 )edit

@AA test my the navigation code I have written. But it looks like everything is correct, but the robot is not movie when i give it a goal. I know it has something to do with TF, but i don't know how to solve this. Can you throw some light on this?

krishna43 gravatar image krishna43  ( 2017-03-02 11:45:33 -0500 )edit