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/Tutori...
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.
do you already have an /odom topic being published or that is what you want to achieve?
that is what i want to achieve
ok, I will edit your question to better reflect what you want.