Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Grabbing oblong objects (http://www.chiefdelphi.com/forums/showthread.php?t=98606)

biojae 04-12-2011 00:54

Grabbing oblong objects
 
I have a grabber mechanism that can pickup oblong objects.
How can I program it so that the grabber can sense when it has an object in its grasp, and change the setpoint of the closed loop controller to keep a gentle pressure on the object?

The only sensor that this mechanism has is a potentiometer that is used for position control.

The orientation of the object is not known by the robot beforehand, it has to be able to determine it only via the potentiometer.

I have tried using the first derivative of the potentiometer's values to determine if the grabber was moving or not, but that was very unstable.

Spirator 04-12-2011 04:55

Re: Grabbing oblong objects
 
You could wire up a limit switch as a simple boolean sensor.

CNettles11 04-12-2011 08:51

Re: Grabbing oblong objects
 
The limit switch is the easiest solution.

Ninja_Bait 04-12-2011 08:53

Re: Grabbing oblong objects
 
You may be able to detect resistance from the ball with the potentiometer. If it's rotating slower or rotating in the opposite direction at times, that should indicate that the football is held tightly enough for it to push back against the motor. It would probably work best against a weak motor setup.

CNettles11 04-12-2011 08:55

Re: Grabbing oblong objects
 
A football you say? Oh here we go :rolleyes:

jhersh 04-12-2011 14:03

Re: Grabbing oblong objects
 
Quote:

Originally Posted by biojae (Post 1088490)
I have a grabber mechanism that can pickup oblong objects.
How can I program it so that the grabber can sense when it has an object in its grasp, and change the setpoint of the closed loop controller to keep a gentle pressure on the object?

The only sensor that this mechanism has is a potentiometer that is used for position control.

The orientation of the object is not known by the robot beforehand, it has to be able to determine it only via the potentiometer.

I have tried using the first derivative of the potentiometer's values to determine if the grabber was moving or not, but that was very unstable.

I recommend you use no additional sensor other than the current sensor that is already in the Jaguar. In current control mode, you can specify torque to apply and it will hold a grip on the object wherever it is encountered.

-Joe

biojae 04-12-2011 18:00

Re: Grabbing oblong objects
 
Quote:

Originally Posted by jhersh (Post 1088577)
I recommend you use no additional sensor other than the current sensor that is already in the Jaguar. In current control mode, you can specify torque to apply and it will hold a grip on the object wherever it is encountered.

-Joe

I suppose that I should have been a little more specific.
This is for FTC, and the mechanism uses continuous turn servos for power.

I am not using jaguar motor controllers for this mechanism as they are not legal for FTC.
As far as I know, the HiTechnic Motor Controllers do not measure current, and the Servo controllers don't either.

As of last year's Q and A, putting a current sensor in line is not allowed.

theprgramerdude 05-12-2011 20:07

Re: Grabbing oblong objects
 
Do you know why your first derivative potentiometer readings may be unstable? I'd recommend trying to instead take the average derivative over a period instead, so either integrate a few derivative values and divide with respect to time, or just take the readings from the potentiometer at a much slower rate (I'd recommend the first one if your ADC+Pot combo is possibly the issue and you have the compute power, it essentially equates to crude oversampling).

Alan Anderson 05-12-2011 21:21

Re: Grabbing oblong objects
 
Quote:

Originally Posted by BJT (Post 1088978)
pneumatics...

...aren't really an option for FTC.

biojae 06-12-2011 02:04

Re: Grabbing oblong objects
 
Quote:

Originally Posted by theprgramerdude (Post 1088972)
Do you know why your first derivative potentiometer readings may be unstable? I'd recommend trying to instead take the average derivative over a period instead, so either integrate a few derivative values and divide with respect to time, or just take the readings from the potentiometer at a much slower rate (I'd recommend the first one if your ADC+Pot combo is possibly the issue and you have the compute power, it essentially equates to crude oversampling).

The HiTechnic prototype board has 10bits of ADC resolution.

Quote:

Originally Posted by Hitechnic.com;
The prototyping board update rate may be controlled within a range of 4-100 milliseconds per sample.

So, it can do 10 - 250 samples per second.
The code that I tested was sampling every 10 ms, or 100 times a second.

The mechanism is using a 270 degree linear 10k Ohm potentiometer, and uses almost all of that range ( > 230 degrees)
through gearing, and actual movement range.
with that, there are about 3.79259 ticks per degree on the pot.

While running, the velocity would be about 3 ticks per cycle.
The problem arises when it is not moving, as there are a few readings that have near the same values as when it is not moving.

I will try it with a longer sampling time, in an attempt to get more ticks per cycle, which should allow a better distinction between moving and not moving.

The question then becomes: how do I use the velocity readings to change the setpoint of the PID controller?
I would imagine that a timer would be needed, as I don't want it to think that it was stalled right when it started moving and thus immediately change the setpoint and not move.

AdamHeard 06-12-2011 02:19

Re: Grabbing oblong objects
 
Without knowing the exact mechanical design it's hard to give completely valid advice.

First it'd be good to test (as discussed) if looking at the velocity of the sensor is enough to determine the "edge" of the piece. If that's a no, this plan clearly won't pan out without modifications.

Could you modify the design such that the motor doesn't directly close the jaw, but rather moves and is linked to the jaw with a spring? If you got the ratio/spring figured out right this would allow you to "overclamp" substantially, and have a forgiving/flexible clamp due to the spring.

This would certainly simplify the software, as you only have one PID setpoint to call for closing, and it never changes.

You could also use some sort of limit/touch sensor on the jaw to indicate when the jaw first makes contact with the object, then set your setpoint to some value further than that (a constant which you figure out by testing of course).

It's important to take a step back and see if the overall approach needs modification, versus more advanced individual features.

biojae 06-12-2011 03:06

Re: Grabbing oblong objects
 
2 Attachment(s)
Quote:

Originally Posted by AdamHeard (Post 1089068)
Without knowing the exact mechanical design it's hard to give completely valid advice.

Ok. Here's the design.

It is a chain based fourbar grabber. It is powered by 2 continuous turn servos.
Both arms are powered and move simultaneously. The potentiometer is part of the gear reduction.

Attached is a sketch.

The black object in the center is a crate.
The blue members are the C channels.
The red circles are sprockets/gears.

The sprockets that connect to the gears are mounted solidly to each beam, so that they do not spin, thus providing the fourbar motion.
The gears turn the black channels.

Justin Stiltner 07-12-2011 17:49

Re: Grabbing oblong objects
 
with the sensors you have I think the most obvious one is:

You know the potentiometer value for a gripper that is closed with nothing in it(object of zero width) and you know fully open. If you command your claw to close, it does so, and the steady state value achieved is not that of a zero width object. Then you know you must have grabbed something, and your claw is no longer moving(steady state) so you change from your closed loop position controller to just applying some small amount of motor pwm signal that is enough to hold the object.

This works in this case because the motor is stalled and the pwm in effect controls the voltage, which will be proportional to the current which produces the torque in the motor.

alternatively you could have the set point for the claw position controller be set just a bit more closed than the steady state value, assuming you are only using a proportional controller this will have the same effect as setting a small pwm value as previously stated.

Jared Russell 07-12-2011 18:18

Re: Grabbing oblong objects
 
Have you considered passive compliance (e.g., something deformable like foam or rubber) on the interior of your gripper? Then design your setpoint so that it is at a position which compresses your gripper to the desired effect.

Alternatively, if you don't mind stalling your servos, simply tell the gripper to close all the way (or close to it), and don't use an I term in your PID controller. This will effectively limit how hard the controller tries to drive the motors.


All times are GMT -5. The time now is 23:27.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi