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

Not being able to use hector_mapping

asked 2012-03-08 07:12:19 -0600

alfa_80 gravatar image

updated 2012-03-08 07:20:47 -0600

I've been trying to use hector_mapping to better estimate height of a flying robot. Nevertheless, I still get the wrong information like below all the times as I rostopic echo.

pose: 
  position: 
    x: 0.0
    y: 0.0
    z: 0.0
  orientation: 
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0

I doubt my subscription code is wrong. I subscribed it like below:

pose2D_hector_sub_ = nh_.subscribe("/slam_out_pose", 1, &PoseEstimator::pose2DHectorCallback, this);

And in the tutorial, it says something in the subscribed topics. I haven't yet subscribed to syscommand. Is it a must or an option subscribing to syscommand topic? If it's a must, how to subscribe it? and what's the use of its subscription?

What could go wrong?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2012-03-08 07:47:17 -0600

updated 2012-03-08 07:51:25 -0600

I assume by "better estimate height" you mean "provide a 2D pose estimate"? :) Your height estimate has to come from a different source, like ultrasonic, barometric, mirrors mounted to your laser scanner, or a fused combination thereof.

/edit: I just read your other question. So you try to do scanmatching on a vertical 2D slice of the enviroment? That´s not a good idea, as hector_mapping matches scans against the existing map and the "vertical map" will change significantly when the platform travels around.

The "syscommand" topic is used by Team Hector´s robots to reset all nodes in a system to a initial state (and some other tasks), but is not required for hector_mapping to work.

The output looks like the scan topic isn´t properly set up. You might also want to have a look at this brand new tutorial on quadrotor based indoor SLAM in simulation using hector_mapping. It should give you an idea on how you can set it up.

edit flag offensive delete link more

Comments

Yes, I want to use your 2D pose estimation(x-component, i think, because i'm using it for a quadcopter) and integrate it with an initialized barometer reading. Could u have a look on the subscription code that I used above. I think should be OK..I think, the link doesn't relate much in this regard..

alfa_80 gravatar image alfa_80  ( 2012-03-08 07:53:57 -0600 )edit

Yes, it would be the x component, but this is not intended use and likely will fail as soon as the UAV starts moving. Wouldn't it suffice to just use the scan ray pointing straight downwards and use this for height estimation?

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-03-08 08:11:36 -0600 )edit

Yes, it would suffice "to just use the scan ray pointing straight downwards" but then, laser scans sometimes give invalid reading, meaning it's not reliable enough..Any method to filter it, if you know of..

alfa_80 gravatar image alfa_80  ( 2012-03-08 23:52:15 -0600 )edit

Question Tools

Stats

Asked: 2012-03-08 07:12:19 -0600

Seen: 867 times

Last updated: Mar 08 '12