# Does the wheel have encoders?

**URL:** <https://discourse.farm-ng.com/t/does-the-wheel-have-encoders/231>\
**Category:** general\
**Created:** [July 27, 2023, 9:03pm UTC](https://discourse.farm-ng.com/t/does-the-wheel-have-encoders/231 "2023-07-27T21:03:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amlan\_Balabantaray](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.farm-ng.com/amlan_balabantaray/32/110_2.png) [@Amlan\_Balabantaray](https://discourse.farm-ng.com/u/Amlan_Balabantaray)\
**Post date:** [July 27, 2023, 9:03pm UTC](https://discourse.farm-ng.com/t/does-the-wheel-have-encoders/231/1 "2023-07-27T21:03:47Z")

</div>

Does the wheel have Encoders? I can see the RPM data on the dashboard. But I am not able to access the data in ROS. Please help

---

<div class="post-metadata">

**Author:** ![kylecoble](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.farm-ng.com/kylecoble/32/12_2.png) [@kylecoble](https://discourse.farm-ng.com/u/kylecoble)\
**Post date:** [July 28, 2023, 11:01pm UTC](https://discourse.farm-ng.com/t/does-the-wheel-have-encoders/231/2 "2023-07-28T23:01:27Z")

</div>

Hello @Amlan_Balabantaray ,

The wheels have a hall effect sensors to measure rpm. This value is available in the canbus grpc API, but is not already piped through the ROS bridge.

You could create your own ROS node that has a grpc client to the canbus service and use the `streamMotorStates` rpc call:

> <https://github.com/farm-ng/farm-ng-amiga/blob/v0.0.9/protos/farm_ng/canbus/canbus.proto#L27-L30>

If you’re doing this in python, it is wrapped for you as `stream_motors` in the `CanbusClient` class:

> <https://github.com/farm-ng/farm-ng-amiga/blob/v0.0.9/py/farm_ng/canbus/canbus_client.py#L44-L46>

Either will create a single stream of `MotorState` proto messages for each motor.

> <https://github.com/farm-ng/farm-ng-amiga/blob/v0.0.9/protos/farm_ng/canbus/canbus.proto#L114-L122>

You could then convert that to your ROS message of choice and publish them from your node.

If you’d like to try this in Rust and contribute to the farm-ng open source ecosystem, you can open a pull request in the [Amiga ROS bridge](https://github.com/farm-ng/amiga-ros-bridge) repository.

Good luck with your project!  
Kyle
