-
Notifications
You must be signed in to change notification settings - Fork 3
Feature: add incremental encoder #225
Feature: add incremental encoder #225
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #225 +/- ##
===========================================
+ Coverage 52.45% 53.31% +0.86%
===========================================
Files 77 86 +9
Lines 2425 2517 +92
===========================================
+ Hits 1272 1342 +70
- Misses 1153 1175 +22
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @bjornminderman and @Olavhaasie! Main comment is that I think we should for know just read the integer value. The current conversion to radians does not seem appropriate, because we use the total positions, but for an incremental encoder this is bigger than one round.
I will study the behavior of the incremental encoders first |
I have added a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
Closes PM-24
Description
Adds the feature to read out the incremental encoder on the joints. It maps the Motor Position object from the IMotionCube.
@bjornminderman started on this feature and I solved the conflicts it had, since it was a bit outdated.
The original
Encoder
class is now a super class ofAbsoluteEncoder
andIncrementalEncoder
. Also in order to keep it clean I have added a newencoder
directory, where these classes reside. TheIMotionCube
andJoint
class now have two separate functions for reading out the absolute and incremental encoder position. The incremental encoder position is only published on the imc state topic. It shouldn't be too hard to use it for any calculations in the hardware interface.Changes
AbsoluteEncoder
andIncrementalEncoder
Encoder
toAbsoluteEncoder