hmartiro / project-thesis

xJüs, the hexapodal robot with a passive-backbone to improve behavior over harsh terrain.
4 stars 2 forks source link

New EPOS library doesn't seem to add IPM points over CAN #63

Closed hmartiro closed 11 years ago

hmartiro commented 11 years ago

After updating to EPOS 4.9.1.0, we get a device ID on linux and can use profile position mode successfully. However, it doesn't seem to be able to successfully add IPM points to the node connected over CAN.

Whichever node the USB is plugged directly into operates normally. The other node does not receive points in its buffer after calling VCS_AddPvtValueToIpmBuffer, even though no errors are detected. The code in the repo tests this by checking the free buffer size before and after adding points, and it is clear that the indirect (CAN) node does not get points added to the buffer. Both nodes run position profile mode just fine.

hmartiro commented 11 years ago

just realized I wasn't using the newest Definitions.h, maybe that's the problem. going to try it after dinner

PayneTrain commented 11 years ago

I'm almost positive the .h had not changed, just the functions. Let me check though On Feb 10, 2013 5:04 PM, "Hayk Martirosyan" notifications@github.com wrote:

just realized I wasn't using the newest Definitions.h, maybe that's the problem. CPayne do you have it for 4.9.1.0?

— Reply to this email directly or view it on GitHubhttps://github.com/hmartiro/project-thesis/issues/63#issuecomment-13362300..

hmartiro commented 11 years ago

i think i found the new one and though it says 4.8.1.0 at the top of it, the old one I had said 1.0 instead and when I ran a diff it seemed like they were a little different

On Sun, Feb 10, 2013 at 5:13 PM, PayneTrain notifications@github.comwrote:

I'm almost positive the .h had not changed, just the functions. Let me check though On Feb 10, 2013 5:04 PM, "Hayk Martirosyan" notifications@github.com wrote:

just realized I wasn't using the newest Definitions.h, maybe that's the problem. CPayne do you have it for 4.9.1.0?

— Reply to this email directly or view it on GitHub< https://github.com/hmartiro/project-thesis/issues/63#issuecomment-13362300>..

— Reply to this email directly or view it on GitHubhttps://github.com/hmartiro/project-thesis/issues/63#issuecomment-13362475..

hmartiro commented 11 years ago

some things were different, mostly variables like the node IDs and errorCodes becoming ints or shorts instead of longs. The problem remains. Additionally, VCS_GetErrorInfo no longer seems to work for me, as all errors I try to print out are blank. time to open up a ticket to try and solve this and/or get the 4.8.7.0 library

hmartiro commented 11 years ago

Just tried the old library (4.8.1.0) again, and it prints out the error messages normally but does not connect a valid device ID.

PayneTrain commented 11 years ago

After getting up to speed on all your code and going through it myself, I encounter the same errors you have - particularly that when AddPvtValueToIpmBuffer() is called on a CAN node in returns '0' [fail] yet does not set our errorCode.

I have submitted the following ticket to Maxon and am looking around about possible CAN functions that we might be overlooking (that would only be needed by IPM so we don't get the error when using position profile). Also, I wanted to focus on the buffer error, so did not mention the getError() function not working now.

:8ball:

Zusammenfassung Error adding PVT values to buffer of CAN connected node in IPM mode

Hello,

My team is using the libEpodCmd.so.4.9.1.0 library that was recently released in addition to the Definitions.h file that is downloaded with it (the definitions file states in the header that it is version 4.8.1.0 ) We are using C++ in a Linux environment to control a master controller connected via USB. A second controller is connected to the master via a CAN network. The file we used to update the firmware for our EPOS 24/2 controller is Epos_2123h_6020h_0000h_0000h.bin which appears to have been written in 2011 but came with the EPOS Studio 1.50 R1 package we downloaded in November, 2012. Is a newer version of the firmware available for download?

Functions such VCS_SetPositionProfile() work fine for both controller nodes (iCAN and USB connected) however, when we enter IPM mode, we are not able to add PVT points to the buffer of the controller node connected via CAN. We know this because the VCS_GetFreeIpmBufferSize() remains at 64 for the CAN attached node even as we add PVT points using VCS_AddPvtValueToIpmBuffer(). The USB connected node works fine (executes appropriately, the buffer size changes as expected, etc.) When the USB is then plugged into the other controller node (that is, the previous CAN node now becomes the master USB node), the node connected to the USB works fine while the node now connected via CAN has the same problems described above. Thus we conclude this problem is directly tied to putting PVT values in the buffer of the CAN connected node.

We also note that the function VCS_AddPvtValueToIpmBuffer() always returns a nonzero value (indicating success) when adding to a USB connected node whereas it also always returns "0" when adding to a CAN connected node (indicating failure). However, the pErrorCode parameter of VCS_AddPvtValueToIpmBuffer() is not changed when the failure occurs, thus we have no indication of what it causing the error.

We think possibly the new library (4.9.1.0) may have a bug related to CAN communication and want to see if there is an intermediate version 4.8.7.0 that we could try?

Please let us know what additional information we can provide to resolve this issue.

PayneTrain commented 11 years ago

Is a newer version of the firmware available for download? Yes. We released this month the new version 2124, which is a part of new EPOS Studio 2.0, you can download it from our website www.maxonmotor.com - online catalog - search EPOS2 - Software/firmware. I added this firmware as the attachment to this solution too.

and want to see if there is an intermediate version 4.8.7.0 that we could try? I attached the previous stable release of linux library (4.8.2.1)

Thank you for the detailed error description. The problem with IPM mode for CAN nodes have to be analyzed. I will report it and try to fix as soon as possible, but at the moment I cannot promise any bugfix-release date.

Best regards, Dawid Sienkiewicz

Will upload code to Code.

hmartiro commented 11 years ago

New firmware is downloaded onto our devices. Tried out libEposCmd.so.4.8.3.0 and the included Definitions.h. Behavior is the same as for the new library - points are not added to the buffer successfully. Retried the 4.8.1.0 library, still returns a null device ID. We should update this for the ticket, and also mention that returned errors are blank.

PayneTrain commented 11 years ago

This just in confirming our problem:

Dear Mr. Payne

I would like just to inform you, that I could reproduce the problem you reported (fw 2124/4.9.1.0). I got exactly the same results in our lab.

Yours sincerely, Dawid Sienkiewicz

PayneTrain commented 11 years ago

My response:

Hey Mr. Sienkiewicz,

Thanks for testing out our problem on your equipment. Do you have any idea what time frame it might be fixed in?

Unfortunately the other library (4.8.3.0) also has the same error issues(points are not added to the CAN connected buffer successfully)

We are not able to test the original library's (4.8.1.0) buffer add abilities as its VCS_OpenDevice function returns an invalid device ID of zero. Do you have the same issue when using the 4.8.1.0 library in your lab?

Lastly, one peculiar additional error we have found for the 4.8.3.0 and 4.9.1.0 libraries is the VCS_GetErrorInfo() function returns a blank string to the pErrorInfo parameter even when fed a valid pErrorCode of say 0x1000 0001. Do you find the same issues when testing in your lab?

Thank you very much for your help on this problem as our engineering department at Princeton University is interested in purchasing more Maxon motors for student semester projects but we must ensure everything with the Linux EPOS library works first!

Chris

hmartiro commented 11 years ago

Working on linux! New library committed to repo. Get working code at EPOS/linux-library/code.

Waiting on the library fix for blank error messages, but this issue can be closed.