Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoder reading #392

Open
ghost opened this issue Jun 22, 2018 · 8 comments
Open

encoder reading #392

ghost opened this issue Jun 22, 2018 · 8 comments

Comments

@ghost
Copy link

ghost commented Jun 22, 2018

Hello,

I am trying to get encoder reading from the kobuki base, but i didn't find any solution yet. Is it possible to get encoder readings rather than odom data?

@schmidtp1
Copy link

Hi, look for a topic */joint_states, it has the encoder readings.

@ghost
Copy link
Author

ghost commented Jun 25, 2018

joint_states doesn't give the encoder reading. I checked it. Is there any other way to get encoder values?

@schmidtp1
Copy link

The topic has the position. Do you need the increments (/high-low signal)?

@ghost
Copy link
Author

ghost commented Jun 25, 2018

yes, it has the position which is same as what i get in odom topic. I want to get the raw encoder reading. i.e. how many ticks is the motor reporting? Is their any way to get it?

@schmidtp1
Copy link

I see, I'm wondering if the accuracy is sufficient to just divide tick_to_rad(0.002436916871363930187454f) [https://github.com/yujinrobot/kobuki_core/blob/devel/kobuki_driver/src/driver/diff_drive.cpp].
It seems that currently there is no interface for the encoder ticks (neither in ROS nor C++):
https://github.com/yujinrobot/kobuki_core/blob/devel/kobuki_driver/include/kobuki_driver/modules/diff_drive.hpp

@ghost
Copy link
Author

ghost commented Jun 25, 2018

so, should i divide the pose i get from /odom by 0.002436916871363930187454?

@schmidtp1
Copy link

schmidtp1 commented Jun 25, 2018

Yes, except that I am not aware that there are joint position in the odometry topic (http://docs.ros.org/kinetic/api/nav_msgs/html/msg/Odometry.html):

std_msgs/Header header
string child_frame_id
geometry_msgs/PoseWithCovariance pose
geometry_msgs/TwistWithCovariance twist

In the joint states there is

std_msgs/Header header
string[] name
float64[] position  // <=
float64[] velocity
float64[] effort

(http://docs.ros.org/kinetic/api/sensor_msgs/html/msg/JointState.html)

@ghost
Copy link
Author

ghost commented Jun 25, 2018

thanks. I will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant