wacky force curve and PM5 usb support

Post questions and issues with Concept2 PM3 SDK
Post Reply
erkn000
Paddler
Posts: 4
Joined: August 5th, 2020, 5:13 pm

wacky force curve and PM5 usb support

Post by erkn000 » August 5th, 2020, 5:38 pm

Hi,

I have been tweaking some Python code to be able to monitor force curve detail. For the most part, the curves seem reasonable but once in a while it just falls off between subsequent usb commands/reads.

For example:
Time. Force Distance ForcePts
409.88 184 1621.2 120 132 129 125 125 125 121 122 125 129 132 132 139 141 142 148 (stroke start)
410.18 184 1622.5 146 140 136 128 120 113 108 108 102 102 96 93 89 88 86 83
410.44 178 1623.7 77 68 62 49 38 24 7 7
....
429.44 169 1698.4 20 20 48 76 99 99 105 120 123 123 129 133 134 130 130 133 (stroke start ... missing points?)
429.76 169 1699.7 109 104 99 92 92
430.04 164 1700.9
432.09 164 1708.8 19 44 44 69 91
432.39 164 1710 99 99 112 113 119 119 123 125 127 134 136 136 136 138 136 131 (stroke start)
432.69 170 1711.3 53 38 28 19
433.01 170 1712.7 8

Is this typical behavior off the usb bus or am I missing something? ... swamping USB?

I was also curious if there are any tips on being able to access similar information available versus bluetooth (e.g., peak force)?

Thank you in advance.

User avatar
Citroen
SpamTeam
Posts: 8011
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: wacky force curve and PM5 usb support

Post by Citroen » August 5th, 2020, 5:48 pm

What do you get on the PM5 force curve display?
https://www.concept2.com/service/monito ... orce-curve

If you set the PM5 in drag factor mode is the drag factor stable for a minute or more of rowing?
https://www.concept2.com/service/monito ... rag-factor

angrytongan
Paddler
Posts: 33
Joined: October 30th, 2015, 11:10 pm

Re: wacky force curve and PM5 usb support

Post by angrytongan » August 5th, 2020, 6:04 pm

I ran into similar when I was working on a PM proxy over USB a while back. Have a look at this code around line 454. If I remember correctly there are a few ambiguous edge cases.

If you are interested in the BLE interface I’ve done some work; check out www.ergarcade.com. All code is available on github.
Image
Male, 46, 5'11", 100kg, log.

erkn000
Paddler
Posts: 4
Joined: August 5th, 2020, 5:13 pm

Re: wacky force curve and PM5 usb support

Post by erkn000 » August 6th, 2020, 12:55 pm

Citroen wrote:
August 5th, 2020, 5:48 pm
What do you get on the PM5 force curve display?
https://www.concept2.com/service/monito ... orce-curve

If you set the PM5 in drag factor mode is the drag factor stable for a minute or more of rowing?
https://www.concept2.com/service/monito ... rag-factor

Thanks, the issue that I am seeing isn't with the display on the console itself but the data that is being captured and then viewed in parallel. sorry about the confusion

erkn000
Paddler
Posts: 4
Joined: August 5th, 2020, 5:13 pm

Re: wacky force curve and PM5 usb support

Post by erkn000 » August 6th, 2020, 1:07 pm

angrytongan wrote:
August 5th, 2020, 6:04 pm
I ran into similar when I was working on a PM proxy over USB a while back. Have a look at this code around line 454. If I remember correctly there are a few ambiguous edge cases.

If you are interested in the BLE interface I’ve done some work; check out www.ergarcade.com. All code is available on github.
Thanks for the link, its a wealth of good detail. I am wondering if the raspberry pi zero and the approach that I am using isn't fast enough to get the data. It currently issues a usb command (in python), waits for the response and repeats. From the comments in your code, it looks like you "poll" based on some stroke/time criteria? Is that right?

User avatar
Citroen
SpamTeam
Posts: 8011
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: wacky force curve and PM5 usb support

Post by Citroen » August 6th, 2020, 2:37 pm

erkn000 wrote:
August 6th, 2020, 12:55 pm
Citroen wrote:
August 5th, 2020, 5:48 pm
What do you get on the PM5 force curve display?
https://www.concept2.com/service/monito ... orce-curve

If you set the PM5 in drag factor mode is the drag factor stable for a minute or more of rowing?
https://www.concept2.com/service/monito ... rag-factor

Thanks, the issue that I am seeing isn't with the display on the console itself but the data that is being captured and then viewed in parallel. sorry about the confusion
I meant check the force curve to eliminate any problems with the flywheel sensor and the PM.
Then you can start looking for bugs in pyrow (or whatever CSAFE library you're using).

angrytongan
Paddler
Posts: 33
Joined: October 30th, 2015, 11:10 pm

Re: wacky force curve and PM5 usb support

Post by angrytongan » August 6th, 2020, 5:49 pm

erkn000 wrote:
August 6th, 2020, 1:07 pm
Thanks for the link, its a wealth of good detail. I am wondering if the raspberry pi zero and the approach that I am using isn't fast enough to get the data. It currently issues a usb command (in python), waits for the response and repeats. From the comments in your code, it looks like you "poll" based on some stroke/time criteria? Is that right?
Yes; polling happens at the application level (example code). Forceplot data isn't latched in the PM so if I remember correctly I think it's entirely possible to miss parts of a stroke, or get parts of another stroke, if you don't request fast enough. It looks like I settled on 100ms polls, but can't remember how I got there.

I can't speak for the suitability of using a Pi with a PM, but it should be more than fast enough to talk high speed USB. You may want to check the advisory on USB for Pis and your setup.
Image
Male, 46, 5'11", 100kg, log.

User avatar
Citroen
SpamTeam
Posts: 8011
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: wacky force curve and PM5 usb support

Post by Citroen » August 7th, 2020, 3:38 am

angrytongan wrote:
August 6th, 2020, 5:49 pm

I can't speak for the suitability of using a Pi with a PM, but it should be more than fast enough to talk high speed USB. You may want to check the advisory on USB for Pis and your setup.
The RPi4B 8GB is a couple of orders of magnitude faster than the microcontroller in the PM. It's an ideal platform to run pyrow (or any other CSAFE code) and do pretty graphic things on a HDMI 4K screen. Even the RPi1B from 2012 is way faster than the PM. The PMs are only USB2.0 so connecting them to the RPi won't be any problem.

Post Reply