Data Type for Amiga Position Readings

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?

Hi Carl,

Short answer:

Speed and angular rate is in floats.
We do not stream position, so you’ll have to integrate that based on the measured velocities!

Long answer:

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 AmigaTpdo1 class.

You can check some of our examples / tutorials for streaming information from the canbus:

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.

Hope this helps!
– Kyle


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).