Axis 3 absolute position offset by 360deg after power loss

Our robot was mistakenly powered off when someone pulled the power cord unknowingly.

I restarted the robot, it said the robot had moved so I had to visually confirm that the 3d robot model matched the real model and confirm that. Once done the axis 3 is now offset by 360deg of the original position and I can only jog it from -180deg to -360deg, instead of the normal ±180 (i know the joint can do ±360 but axis 3 can only reach ±180 before colliding with the base).

Seems to me that somehow the encoder position has been offset during re-sync. How can I manually go and perform an axis calibration again in this case?


Move arm to a different pose, power arm off, delete .urcontrol/.last_seen_joint_positions.conf, and power arm back on.
Possibly it was near the point where position wraps around.

Great thanks, that’s also what I suspected.

So, I finally got time to try the procedure, the robot was not accessible beforehand.

I booted up, powered the arm, jogged a bit, powered off arm, logged via SSH and rm’d the .last_see_joint_positions.conf, powered up arm and the recovery mode came up, but the axis 3 is still offset by 360deg, indicating -355deg when it should be 5deg.

I then tried the same procedure but deleting the .last_see_joint_positions.conf file before rebooting the controller, also after rebooting the controller, to see if the file was maybe already loaded in RAM, no change.

I then looked at the content of the .conf file and the revolutions line indicate the axis 3 as -1 revolutions. So i tried changing it to 0, but it seems to be ignored, powering up the arm shows again -355° on axis 3 when it’s straight up. also changing the angles value of axis 3 does not trigger a recovery mode error, so I’m not sure how to proceed next, I would have thought that a simple update of the revolutions value would have fixed it since that’s the actual issue, but it seems like the controller overwrites it when powering down, and loads it in RAM on boot as if I change the value over SSH, powering off-on the arm does not seem to take into account whatever I write in this file for axis 3 position. So on this assumption I manually overwrote the revolutions
line for axis 3 but triggered a hard shutdown to prevent the file from being overwritten with whatever was in RAM, but on boot and power up the file was overwritten and back to -1 revolutions…

I then proceeded to power off the robot, take out axis 3 cover and manually move the arm past the -360deg point by unclutching the brake, powered up, it said there was a large movement while off, went into recovery but indicates -400deg. I powered off, removed the .last_seen_joint_positions.conf and powered up but it is still thinking it’s at -400deg.

Basically something remembers the revolution count, as I’d assume it would be starting at 0 otherwise when reset? Is there some other file that keep track of that?

Alright so after some thoughts I figured a way to trick the robot :slight_smile:

I figured that the robot will “guess” its revolutions offset when it has moved while off to the closest previous seen position. Positioning it to -350deg (almost straight up with 360deg offset), I initially moved it while off and releasing the brake manually to the normal -10deg, but it still booted up as -370deg.

I assumed it would snap back to the closest ±180deg position, so I placed it to -200deg (the normal 100deg on axis 3), powered off, then manually moved the axis 3 all the way to -100deg so that the total movement would be larger than 180deg. I booted up, it complained of a large movement, but then thought I moved through the shoulder since the distance was shortest, so it snapped back to -100deg, and not -460deg.

Problem solved on my side, but then I’d still need to know why did the procedure you mentioned didnt work?