Hello Farm-ng team. This question is based on my other post regarding communication between Arduino and Amiga (see here). Regarding how data is sent from the Amiga to the Arduino for interpretation purposes, what are the data types of position and speed (int, float, single value or matrix)? Is there anywhere we could find an example of such readings?
Speed and angular rate is in floats.
We do not stream position, so you’ll have to integrate that based on the measured velocities!
Yes we have this information available in the API. What you’re looking for is in
farm-ng-amiga (link at bottom).
The relevant data structures would be in:
You’re mostly looking for the
You can check some of our examples / tutorials for streaming information from the canbus:
- farm-ng-amiga/py/examples/motor_states_stream at main · farm-ng/farm-ng-amiga · GitHub
You could also use the
streamVehicleTwistState rpc to stream
Twist2d proto messages from the canbus service. This linear and angular velocity would be the same as you would get in the
AmigaTpdo1 objects. We do not have a python example of this stream, but the setup is exactly the same as any other server streaming rpc, which our examples are full of.
- proto / rpc definitions: https://github.com/farm-ng/farm-ng-amiga/blob/main/protos/farm_ng/canbus/canbus.proto
Hope this helps!
P.S. if most of this is gibberish to you, try going through the tutorials. This’ll make a lot more sense after. We’re also going to live stream a walk-through of the tutorials tomorrow (March 29).