0
$\begingroup$

Rosanswers logo

Hello ROS users,

If I have a wheel encoder(Vehicle's hall sensor), and I want to input the signal to my ROS computer. But there is no information about it. Does anyone know that? Do I need to use the other board to receive that? I will be thankful if someone can give me some direction. Thanks in advanced.


Originally posted by Terry Su on ROS Answers with karma: 23 on 2016-01-04

Post score: 0


Original comments

Comment by Humpelstilzchen on 2016-01-04:
More information please: What "other board" are you talking about?

Usually one has to convert the hardware specific hall sensor into a ros /odom message.

Comment by Terry Su on 2016-01-04:
@Humpelstilzchen, such as this arduino board. Because I don't have the specific hall sensor for ROS but my case just need to input the signal of hall sensor and Gyro...etc., so I need a interface to input these sensor signals. Thanks.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In this case you have to convert encoder ticks into nav_msgs/Odometry Messages. Take a look at navigation/Tutorials/RobotSetup/Odom in the wiki to basically understand what is required.

Which might be (there a multiple options available):

  1. Find out what needs to be done to convert the information from your hall sensors into a position. This is very robot specific.
  2. Port the code from the wiki to your arduino on your robot using rosserial to publish the Odometry. Rosserial is of course only one way to connect an arduino to your PC, but you should try it.

Depending on your vehicle you might also be able to use the differential_drive package.

If you publish both, the position of your lidar relative to the robot and the position of the robot as tf tf (as described in the Odometry tutorial), then yes, you also have the position of the lidar in the odom frame and rviz will display it properly.


Originally posted by Humpelstilzchen with karma: 1504 on 2016-01-05

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Terry Su on 2016-01-05:
@Humpelstilzchen If I use arduino board to get the hall sensor and I also launch the lidar, and then connect to the rviz, when I move the wheels and because the effect of the hall sensor, the location of my in the rviz will move,too?

Comment by mateusguilherme on 2019-01-30:
I have the same doubt. Will the location move too?

Comment by Humpelstilzchen on 2019-01-30:
What location? Please note that this is a three year old question. Better open a new one.

$\endgroup$

Your Answer

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