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

hector_mapping + imu issue

asked 2013-09-24 22:45:42 -0500

miguel_sgp gravatar image

Hi, I am working with the hector_mapping and hector_imu_attitude_to_tf. After I added the imu node to the system, I haven't been able see any improvement in the estimated map when I force my robot to pitch/roll and the estimated position and map become useless. My robot doesn't provide odometry data. I am not sure if I am renaming the frames correctly, should base_stabilished be declared in my urdf robot file or is it only necessary for the slam nodes?

Here are the launch files I am using:

  • example.launch (hector_imu_attitude_to_tf)

    <launch>
    <param name="/use_sim_time" value="true" />
    <node pkg="MERLIN_hector_imu_attitude_to_tf" type="imu_attitude_to_tf_node" name="imu_attitude_to_tf_node" output="screen">
    <param name="base_stabilized_frame" type="string" value="base_stabilished" />
    <param name="base_frame" type="string" value="base_link" />
    </node>
    </launch>
    
  • mapping_default.launch (hector_mapping)

    <?xml version="1.0"?>
    <launch>
    <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
    <arg name="base_frame" default="base_stabilished" />
    <arg name="odom_frame" default="base_stabilished"/>
    <arg name="pub_map_odom_transform" default="true"/>
    <arg name="scan_subscriber_queue_size" default="20"/>
    <arg name="scan_topic" default="scan"/>
    <arg name="map_size" default="2048"/>
    
    <node pkg="MERLIN_hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
    
    <!-- Frame names -->
    <param name="map_frame" value="map" />
    <param name="base_frame" value="$(arg base_frame)" />
    <param name="odom_frame" value="$(arg odom_frame)" />
    
     <!-- Tf use -->
     <param name="use_tf_scan_transformation" value="true"/>
     <param name="use_tf_pose_start_estimate" value="false"/>
     <param name="pub_map_odom_transform" value="false"/>
    

    (rest of the code in this file remains the same)

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2013-09-25 21:00:42 -0500

miguel_sgp gravatar image

The problem was caused by the collision between the robot and the ground, after this was changed the estimated map and position were correct. I set the pub_map_odom_transform to false because there was an error about synchronization but I set to false the use_sim_time as commented and pub_map_odom_transform to true and it's now working. Thanks!

edit flag offensive delete link more
0

answered 2013-09-25 07:33:14 -0500

You set "pub_map_odom_transform" to "true" for the argument provided in the launch file, but then set it to "false" when you set the actual corresponding parameter. That doesn´t make sense, better revert the lower line to

<param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>

Also, you have set "/use_sim_time" to "true". If you are not playing back logfiles or work in simulation, this should be "false" (or not be set at all in the first place).

"base_stabilized" does not have to be part of your URDF model and from looking over things, after the two fixes above, things should work.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-09-24 22:45:42 -0500

Seen: 615 times

Last updated: Sep 25 '13