0
$\begingroup$

Rosanswers logo

I want to add odometry to Hector SLAM. I have arduino and pololu shield motor with 2 gear motors with encoders. I found ros_arduino_bridge package which contain my shield motos but i don't know how to use it and connect it with hector slam. could you help me?


Originally posted by Emilien on ROS Answers with karma: 167 on 2016-06-24

Post score: 0


Original comments

Comment by Procópio on 2016-06-28:
do you already have an /odom topic being published or that is what you want to achieve?

Comment by Emilien on 2016-06-28:
that is what i want to achieve

Comment by Procópio on 2016-06-29:
ok, I will edit your question to better reflect what you want.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

to use hector slam you need a laser scanner or other sensor that provides data that could be transformed to a laser scan message, as an RGBD camera, for example.

EDIT:

First of all, you need to have in mind that odometry information is not a part of Hector SLAM, but an information that can be used by several other ROS nodes, including Hector SLAM. As a matter of fact, Hector SLAM can work without odometry (check this question, for example)

So, putting aside the Hector SLAM, this is the tutorial you are looking for: http://wiki.ros.org/navigation/Tutorials/RobotSetup/Odom

In short, you need to create an odometry message and and odometry tf. The content is pretty much the same, but the odometry message also has information about your robot's velocity. Anyway, the tutorial is quite clear and easy to follow.

In your specific case, you will need to get the information from your encoders to calculate the velocity of each wheel, so you can populate your odometry message. Note that in the sample code, this values are fixed, and you must change them to use what you are measuring from your encoders.


Originally posted by Procópio with karma: 4402 on 2016-06-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Emilien on 2016-06-28:
i think you don't understand me, i use already hector slam with laser scan. now i want to add odometry ...

Comment by femitof on 2020-05-10:
@Emilien how did youn do this?

Comment by zlg9 on 2021-08-04:
Who and why did accept this answer ! I cannot relate it to the question which seeks obtaining Odometry from Hector_Slam. Any update ?

Comment by Pedro Leal on 2021-08-13:
@zlg9 The question wasn't regarding obtaining odometry from Hector SLAM, but to add an odometry source to Hector SLAM. As for your question, you can subscribe to /poseupdate and use it to publish the odom->base_link transformation.

$\endgroup$

Your Answer

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