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

Hector Localization and Hector Mapping issue! Any

asked 2017-03-31 15:14:37 -0500

rosfun gravatar image

updated 2017-03-31 15:18:52 -0500

Hello! I have been trying to integrate pose estimate of robot obtained from apm flight controller using hector_pose_estimation with hector mapping. Whenever I run hector_slam launch file I get the error on terminal for hector_pose estimate (picture attached here ) . The pose can be visualized in Rviz without hector mapping but poses problem with it My TF tree is as shown here ) .

This is my hector_slam.launch file

<launch>

  <arg name="geotiff_map_file_path" default="$(find hector_geotiff)/maps"/>

  <param name="/use_sim_time" value="false"/>

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

  <!--<node pkg="tf" type="static_transform_publisher" name="map_basestabilized_broadcaster" args="0 0 0 0 0 0 map base_stabilized 100"/>-->    
  <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"/>
    <arg name="map_file_path" value="$(arg geotiff_map_file_path)"/>
  </include>

    <node pkg="tf" type="static_transform_publisher" name="map_baselink_broadcaster" args="0 0 0 0 0 0 laser map 100"/>
    <node pkg="tf" type="static_transform_publisher" name="baselink_laser_broadcaster" args="0 0 0 0 0 0 base_link laser 100"/>
</launch>

And here is the hector_pose_estimate.launch file

    <?xml version="1.0"?>
<launch>
    <param name="/use_sim_time" value="false"/>

    <node pkg="hector_pose_estimation" type="pose_estimation" name="hector_pose_estimation" /> 

  <!--node pkg="rviz" type="rviz" name="hector_pose_estimation_rviz" args="-d $(find hector_pose_estimation)/rviz_cfg/hector_pose_estimation.rviz" /-->
</launch>

Looking forward to a prompt solution.

Thanks

Regards,

edit retag flag offensive close merge delete

Comments

I feel strange about the laser->map tf?

jinn gravatar image jinn  ( 2017-04-04 05:14:02 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-04-04 09:18:55 -0500

mohsen1989m gravatar image

your TF tree is completely wrong. The slam algorithm (Hector in this case) defines the transformation from inertial frame (map) to body frame (scanmatcher_frame). Then you need to define the transformation inside your body frame (i.e. laser, base_link, base_footprint). Plus u need to use hector_imu_attitude_to_tf to define a transformation from base_stablized to base_link if i am not mistaken. Moreover you have a node "map_baselink_broadcaster" which makes no sense, if you already know the transformation from map to base_link (in this case you have used a static tf publisher to publish it) why do u need the slam algorithm?? so you need to disable that node.

At the end your TF tree should look like This: map => scan_matcher => base_link => laser => ...

about the pose_estimation, I am not sure if you can easily use it with hector_slam because that is meant to be used to fuse IMU and GPS. one thing that you can do is supplying the information that you get from hector_slam with an appropriate variance Matrix to pose_estimation so u use 2D slam data as a reliable source for your pose estimation. in this case u need to write a node to interface it...

To summarize you need to rethink what you are doing and make sure you understand pros and cons of indoor slam algorithms and outdoor localization algorithms. Then you can choose what you works the best for u

Good Luck :)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-31 15:14:37 -0500

Seen: 1,076 times

Last updated: Apr 04 '17