Close

Let's talk about robot compliance

A project log for 5+ Axis Robot Arm

Building an open source robot arm for makers and small businesses

dan-royerDan Royer 08/28/2015 at 15:514 Comments

I know what I want to do and I have no experience to draw on. I hope by talking it out here I figure it out a bit. Please comment below with your ideas.

So what is compliance? A non-compliant robot does what it was told to do blindly. If it hits something it will try to keep going. That is a great way to injure a person or the robot. A compliant robot has two parts.

The first part is when the arm is holding still, I can push on it gently and the arm sensor values change. What I'd like to do is have the arm recognize it is being pushed and move in the direction of push.

The second part is that I'd like a moving arm to recognize when it is colliding with something and stop automatically. I'm used to

do forever {
  for each joint {
    read sensor
    if( sensor too far from target ) move motor
  }
  listen for new target instructions
}


The new method I'm going to try looks something like

do forever {
  for each joint {
    read sensor
    if( expected sensor too far from actual sensor ) {
      if( target exists ) {
        // collision while moving
        if( sensor opposite of target ) stop all movement
      else if( no target exists ) {
        // being pushed
        set target = sensor
      }
    }
  }

  // Bresenham's algorithm? All joints should arrive at the same time
  for each joint {
    if( sensor too far from target ) {
      move motor
      update expected sensor
    }
  }
  listen for new target instructions
}


Does this jive with your experience? I haven't been able to find examples online of compliant systems from which I can learn. Googling only reveals academic PDFs, often behind paywalls.

I can't envision how an arm that is moving by being pushed would know when someone is no longer pushing. I also wonder why it wouldn't be fooled by gravity into sagging down to the floor (gravity is always "pushing" down).

I imagine a simple test could be made with a single motor, an encoder, and a rod attached to the motor shaft. touch the end of the shaft to affect the sensor and trigger the collision behavior.

What say you?

Discussions

Dan Royer wrote 08/28/2015 at 21:35 point

Hi, @Gene Hacker!

I wrote an answer and HAD.IO seems to have eaten it. :T

option 1 doesn't give enough protection against unlucky people.

option 2 is outside my skills.

option 3 sounds a lot like what I'm doing.  Why won't this give me compliance?

option 4 (series-elastic) is really interesting.  I've heard of them before but I have yet to learn how to implement them.

The current model has gravity compensation.  When it isn't moving I can apply force and see it in the sensor graphs... so the arm can detect when it is being pushed.  I have not yet figured out how to respond to a push, and when to stop responding.  What do you advise?

  Are you sure? yes | no

Gene Hacker wrote 08/31/2015 at 19:59 point

Option 3 doesn't give good enough compliance in the real world, at least for industrial robots. Since you're implement compliance 'in software,' the compliance you get is limited by how fast your actuators can react and how good your sensors are. For industrial robots with really good sensors and actuators this tends not to be good enough to prevent injury and there's some interesting reading on that here: http://www.phriends.eu/URAI_08.pdf

Option 2 is closer to what you are doing, because it seems you do not have any force or torque sensors in your robot. You know that you sent a step command to the motor, but the encoders count didn't change, so therefore you can guess that the torque on the motor is this much and act accordingly. There are stepper drivers that can control stepper motor torque just using feedback from an encoder:

I think the question you need to ask is do you really need compliance? Are you trying to get the robot to not injure people, not damage itself, or do something like move a tool along a surface without knowing exactly where that surface is? For the first one, all you need to do is limit the speed at which it operates so that even if it hits someone in the face it's not going to going to injure them. For the second one you could probably get away with just stopping the robot if the encoder ticks differ from stepper ticks. However, you might run into the problem with small amounts of backlash, slip, or random sensor noise causing your robot to stop. For the third you need force control or passive compliance. For an example of passive compliance check out Stanford's low cost compliant manipulator: http://ai.stanford.edu/~ang/papers/icra11-LowCostCompliantManipulator.pdf

It also sounds like your robot is already backdriveable since you're able to push it around, so it might already be human safe.

  Are you sure? yes | no

Dan Royer wrote 08/31/2015 at 21:30 point

Wow!  Their COGs is nearly double my MSRP.

Compliance is a nice to have.  comparing steps to sensors would be great.... if I were only using steppers.  Unfortunately the electric pistons are DC motors,  In my head that's an analog device, there's no accurate way to count it out.

Thanks for the great link!  Here it is again, unbroken by formatting.

http://ai.stanford.edu/~ang/papers/icra11-LowCostCompliantManipulator.pdf

Also: so knowledgeable!  Top quality posts, sir (or ma'am)

  Are you sure? yes | no

Gene Hacker wrote 08/28/2015 at 18:47 point

So if you want an arm that know when someone is no longer pushing you need to do torque/force control. There are a couple ways to do this, one is to put a multi-axis force/torque sensor on your robot's end effect and assume that's the only thing that's going to hit something. Another is to control the torque/force your actuators apply by controlling motor current, of course if you want compliance you need to design everything to be back-driveable.The next is to put a force or torque sensor on every actuator in your robot, problem with this is you still don't get compliance. 

Possibly the best way we've found to solve this problem so far is to put a spring between your actuator and what your moving and measure the displacement of said spring. If you know the displacement of your spring then you can figure out the force or torque applied to your actuator. This type of system tends to get a much high force bandwidth than just sticking a load cell on a motor, because force doesn't go to infinity when it hits something. This is called a series elastic actuator, they are what allow robots like Baxter to work with humans. Be wary though, series elastic actuators can be difficult to control. Now the last part about preventing robots to sagging to the floor is a very real problem, but with torque/force control it's easily solved. You just get your actuators to apply a torque or force that counters the gravitational force applied to them. This is called gravity compensation and if you get it to work you can move your robot around like it weighs nothing:

  Are you sure? yes | no