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

Map_server fails to publish transform

asked 2016-01-27 13:56:27 -0600

Kishore Kumar gravatar image

updated 2016-01-28 08:26:00 -0600

Map server node fails to publish transform when i execute the below launch file. All other nodes are functioning properly.

    <launch>
      <!-- Load the TortoiseBot URDF model into the parameter server -->
      <param name="robot_description" textfile="$(find jmbot1_description)/urdf/jmbot1.1.urdf" />
      <!-- Start Gazebo with a world containing a large building-->
      <include file="$(find gazebo_ros)/launch/willowgarage_world.launch"/>
      <!-- include file="$(find gazebo_ros)/launch/empty_world.launch"/ -->
      <!-- Spawn a TortoiseBot in Gazebo, taking the description from the
           parameter server -->
      <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" 
        args="-param robot_description -urdf -model jmbot1.1 -x 8 -y -8" />

    <!-- Convert /joint_states messages published by Gazebo to /tf messages,
           e.g., for rviz-->
      <node name="robot_state_publisher" pkg="robot_state_publisher"
            type="robot_state_publisher"/>
      <node name="map_server" pkg="map_server" type="map_server"
            args="$(find mapping)/src/maps/willow.yaml"  />
     <include file="$(find amcl)/examples/amcl_diff.launch"/>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find jmbot1_description)/src/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find jmbot1_description)/src/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find jmbot1_description)/src/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find jmbot1_description)/src/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find jmbot1_description)/src/base_local_planner_params.yaml" command="load" />
  </node>

    </launch>

Below is my rviz results where the map's corner is oriented with the origin of rviz grid. I have verified the rqt_graph after launching the file, there is no transform published.

image description

I have added the amcl node to the launch file as instructed in a book and i got into a new error as below. Please find the edited launch file above.

[ERROR] [1453990912.591443071, 49.843000000]: Couldn't transform from hokuyo_link to base_link, even though the message notifier is in use

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2016-01-28 01:32:03 -0600

mgruhler gravatar image

The map server does not publish the transform from map to the robot's links. The map server only provides the map in the respective frame to be used by e.g. the localization.

You need a localization node (e.g. amcl) for this.

edit flag offensive delete link more

Comments

Thank you for your clarification, please find my edit above

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-28 08:27:12 -0600 )edit

If this is a new question, please post a new question. I'm not sure I understand what your question is actually about...

mgruhler gravatar image mgruhler  ( 2016-01-28 08:39:58 -0600 )edit

I have posted a new question explaining in detail here

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-28 12:16:37 -0600 )edit
0

answered 2016-01-28 04:34:14 -0600

If you just want to visualize the robot inside the map you can change the "fixed frame", instead of map it should be one of your robot frames... (assuming you've defined transformations between the differents links of your robot).

If you want to move between the map and represent correctly the position of the robot (updating it while you move) you need to run a localization node, as the user Mig said, which will provide the transform between your robot's base link and the map.

edit flag offensive delete link more

Comments

This will visualize the robot and the map simultaneously, but note that this will not visualize the robot in the map, but only simultaneously visualize robot and map

mgruhler gravatar image mgruhler  ( 2016-01-28 07:44:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-27 13:56:27 -0600

Seen: 2,426 times

Last updated: Jan 28 '16