hector mapping Frame id /map does not exist! [closed]

asked 2013-06-14 01:47:14 -0500

Eisenhorn gravatar image

I apologize if this question has already been answered, as I haven't found an appropriate answer.

I am trying to get hector mapping running with a custom robot. I am running ROS Fuerte in Ubuntu 12.04. The laserscanner used is a SICK LMS111 conneceted to a custom pan tilt device.

In the first step I have created an URDF file that corresponds to the model:

    <?xml version="1.0"?>
<robot name="taurob">
  <link name="base_robot">
    <visual>
      <geometry>
       <box size="0.9 .6 .3"/>
      </geometry>
    </visual>
  </link>

 <link name="left_rod">
    <visual>
      <geometry>
        <box size="0.04 .04 .2"/>
      </geometry>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <material name="white">
        <color rgba="1 1 1 1"/>
      </material>
    </visual>
  </link>

 <link name="right_rod">
    <visual>
      <geometry>
        <box size="0.04 .04 .2"/>
      </geometry>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <material name="white" />
    </visual>
  </link>

 <link name="left_axis">
    <visual>
      <geometry>
        <cylinder length="0.06" radius="0.0075"/>
      </geometry>
    <origin rpy="1.57075  0 0" xyz="0 0 0"/>
    <material name="aqua">
        <color rgba="0 1 1 1"/>
      </material>
    </visual>
  </link>

<joint name="base_to_left_rod" type="fixed">
    <parent link="base_robot"/>
    <child link="left_rod"/>
    <origin xyz="0.35 0.08 .2"/>
 </joint>

<joint name="base_to_right_rod" type="fixed">
    <parent link="base_robot"/>
    <child link="right_rod"/>
    <origin xyz="0.35 -0.08 .2"/>
 </joint>


<joint name="left_rod_to_left_axis" type="continuous">
    <parent link="left_rod"/>
    <child link="left_axis"/>
    <origin xyz="0 -0.01 0.1"/>
    <axis xyz="0 -1 0" />
 </joint>

 <link name="sick_lms111">
    <visual>
      <geometry>
        <box size="0.105  0.094 .116"/>
      </geometry>
    <material name="green">
        <color rgba="0 1 0 1"/>
      </material>
    <origin rpy="0 0 0" xyz="-0.004 -0.047 0"/>
    </visual>
  </link>

<joint name="left_axis_to_sick" type="fixed">
    <parent link="left_axis"/>
    <child link="sick_lms111"/>
    <origin xyz="0 -0.03 0"/>
 </joint>

 <sensor name="sick_lasercenter" update_rate="25">
   <parent link="sick_lms111"/>
   <origin xyz="0 0 0.058" rpy="0 0 0"/>
   <ray>
     <horizontal samples="100" resolution="1" min_angle="-1.5708" max_angle="1.5708"/>
     <vertical samples="1" resolution="1" min_angle="0" max_angle="0"/>
   </ray>
 </sensor>

</robot>

I then created a launch file to map the axis.

 <?xml version="1.0"?>

<launch>
<arg name="model" />
  <arg name="gui" default="False" />
  <param name="/use_sim_time" value="false"/>
  <param name="robot_description" textfile="$(arg model)" />
  <param name="use_gui" value="$(arg gui)"/>
  <param name="pub_map_odom_transform" value="true" />
  <param name="map_frame" value="map" />
  <param name="base_robot" value="base_link" />
  <param name="odom_frame" value="base_link" />
  <param name="base_frame" value="/base_stabilized" />

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
  <node name="state_publisher" pkg="robot_state_publisher" type="state_publisher" />


  <node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.vcg"/>

  <include file="$(find hector_mapping)/launch/mapping_default.launch"/>

  <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch">
    <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/> 
  </include>

</launch>

When I launch it I recieve this error message and no Scan data is shown:

Node: /hector_trajectory_server
Time: 1371203270.099439104
Severity: Error
Location: /home/cd/fuerte_workspace/hector_mapping/hector_trajectory_server/src/hector_trajectory_server.cpp:trajectoryUpdateTimerCallback:122
Published Topics: /rosout, /trajectory

Trajectory Server: Transform from /map to scanmatcher_frame failed ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Eisenhorn
close date 2013-07-09 02:25:16

Comments

This can be considered close. I renamed robot_frame to base_link. The TF odom -> base_link then worked fine.

Eisenhorn gravatar imageEisenhorn ( 2013-07-09 02:24:43 -0500 )edit