0
$\begingroup$

Rosanswers logo

hi we have a hokuyo laser and in the first seconds of running hector slam specially when the robot's laser data is few(for example in small places)
the robot position has very bad data jumps , but after a while it goes well .
therefore i want to force hector slam to consider and set the robot's position as 0,0 in the first seconds(for example 5 seconds). how can i do this?
i have tried to publish the robot's position to "tf" topic but it didn't work .
also i have launched the hector pose estimiation but it didn't solve the problem.


Originally posted by babaksn on ROS Answers with karma: 15 on 2015-02-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You can set the robot pose via the (I think undocumented) "/initialpose" topic. This is analogous to how things are done in AMCL. The easiest way to publish to this topic is using rviz and using the "2D Pose Estimate" tool.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2015-02-28

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by babaksn on 2015-03-01:
i am publishing the initialpose but the problem of data jumping still remains. is it possible to change the source code to consider robot pose as 0,0 for a while?

Comment by Stefan Kohlbrecher on 2015-03-01:
Yes, that's of course possible. The update loop is here https://github.com/tu-darmstadt-ros-pkg/hector_slam/blob/catkin/hector_mapping/src/HectorMappingRos.cpp#L263 and could be modified. I apologize for not having the time to give detailed assistance.

Comment by babaksn on 2015-03-01:
thank you . i will figure it out.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.