pantor / frankx

High-Level Motion Library for Collaborative Robots
https://pantor.github.io/frankx/
GNU Lesser General Public License v3.0
268 stars 65 forks source link

Reading force value #37

Closed angelotavares closed 2 years ago

angelotavares commented 2 years ago

Hi @pantor , when i run the example file force_control.py it works perfectly, and it's visible where the force in Z in been measured:

linear_motion_data = MotionData().with_reaction(Reaction(Measure.ForceZ < -8.0, StopMotion())) # [N]

However when I try to see the value in the Measure.ForceZ it only returns <_frankx.Measure object at 0x7f47cbcb6ab0>, im I missing some definition in order to be able to get the force value? This is extremely important for my application.

Thanks.

MiguelASTavares commented 2 years ago

I found a way to access these values by editing the python.cpp file. I have also made a PR using my organization account.