What is the cause of " [arm]: Arm homing failed. Failed to detect contact"

Hello everyone.

Currently, I faced the problem when I run "stretch_robot_home.py "
The next warning message is shown on console.

--------- Homing Arm ----
Homing Arm…
[WARNING] [arm]: Arm homing failed. Failed to detect contact

When this massage appeared, I failed to calibrate arm and can’t control arm.
Other joints (lift, wrist, base) works well.

What should I fix to resolve this warning?

My development environment

  • Stretch RE1
  • ubuntu 18.04
  • ROS melodic

Thank you for the assistance.

Hello @ak-ty, welcome to the forum! This warning is being emitted because the arm joint is unable to be homed due to contact between the arm and it’s end-stop not being detected. Could you answer the following questions:

  1. What do you see when running just arm homing? You can use the stretch_arm_home.py tool.
  2. When the robot is powered off, backdrive the arm to fully open and then fully closed. Is there any part of the arm’s range where it gets stuck or is not possible to backdrive the arm?
  3. What is the output of the following command: python -m pip list | grep hello
  4. What is the output of the following command: stretch_params.py | grep homing_force_N

Hello @bshah. Thank you for your detailed reply.
I answer your questions.

A1.
When I see this warning, I also failed to run “stretch_arm_home.py”.
The arm doesn’t move.

A2.
When I manually move the arm, robot’s arm can move smoothly.

A3.
The output of " python -m pip list | grep hello" is the following.

hello-robot-stretch-body (0.4.9)
hello-robot-stretch-body-tools (0.4.5)
hello-robot-stretch-factory (0.3.9)
hello-robot-stretch-tool-share (0.2.5)

A4.
When I run “stretch_params.py | grep homing_force_N”,
nothing was shown on the terminal.


Although this warning does not always occur,
I don’t know how to return to a normal state when it occurs.

Great, thank you. We can eliminate the warning by solving the arm homing failure. We’ll do this by increasing the effort with which the arm moves towards the end-stop. If the homing effort is too low, then the arm doesn’t move at all and this is what I suspect is happening here.

Start by running the following command to identify the current settings for this parameter:

stretch_params.py | grep arm.contact_models.effort_pct.contact_thresh_homing

For example, if this returns [-33.5, 44.7], then -33.5 is the homing effort moving in, and 44.7 is the homing effort moving out. Next, modify the “stretch_user_params.yaml” file in the “~/stretch_user/stretch-rex-xxxx” folder to include the following at the end of the file:

arm:
  contact_models:
    effort_pct:
      contact_thresh_homing:
      - <effort threshold moving in while homing>
      - <effort threshold moving out while homing>

Replace the <> parts with the corresponding values grepped from stretch_params.py and increase the magnitude of the values by 5 until the joint is able to reliably home against the end-stop. You can use the stretch_arm_home.py tool to quickly check whether arm homing succeeded. Let me know if you have any questions.

Thank you for sharing solutions of this error.
Your procedure allowed me to check the current settings and change the values.
I will adjust the values while checking the robot’s behaviour.

Hello @bshah.
I try to adjust the homing effort. I changed them from [-33.5, 44.7] to [-48.5, 59.7].

Using the stretch_arm_home.py tool, I make sure I can move the arm correctly.
Immediately afterwards, however, I can not move arm using stretch_robot_home.py
due to the same error.

Is there difference between stretch_arm_home.py and stretch_robot_home.py ?

Thank you.

Hi @ak-ty, they are the same. Internally, stretch_arm_home.py calls arm.home() from the Python SDK, while stretch_robot_home.py calls robot.arm.home(). I recommend continuing to increase the homing effort until both tools can reliably home the arm.

Hello @bshah.

Thank you for your ongoing advice.
Unfortunately, I have increased the setpoint up to [ -93.5, 99.7 ] but this does not solve my problem.

I have noticed that when the arm did not move, once I manually move the arm and then send the command, the arm moves normally.
This happens regardless of values of ‘arm.contact_models.effort_pct.contact_thresh_homing’.

I wonder that there is something wrong mechanically that makes it difficult for the arm to move at times.
I think it relates to the second question from you.

Is there any way to check if the arm is mechanically wrong?