问:
Forward and Revers Kinematics For Modified Hanging Plotter
I'm building a modified version of the standard hanging plotter (v-plotter). The basic idea is that you have two cables hanging from stepper motors which form a triangle supporting the pen at the tip.

My design the strings anchored at points $C$ and $D$ which causes the behavior to be somewhat different that the normal plotter, especially when operating close to the motors.

I was able to work out the forward kinematics fairly easily, but the inverse kinematics are turning out to be a real headache. You can see my attempt at a standard geometry solution on math.stackexchange here.

Is there anything specific to calculating kinematics for robotics which could help me?

I'm not interested in modifying the hardware to make the math easier. I'm also not interested in discussing the center of gravity of the pen, cable weight...etc. I want to calculate the kinematics for this as an ideal system.

Any and all advice is appreciated.

Thank you.

答:
Inverse Kinematics are easier to calculate with visualizing the problemspace. Here is a example for a robotarm with 2 DOF:

fig = plt.figure()
ax = Axes3D(fig)
x,y,z=[],[],[]
p1=(300,300)
goal=(400,300)
radius1,radius2=50,100
step=10
for a1 in range(0,360,step):
  for a2 in range(0,360,step):
    p2 = pa.polarpoint(p1, a1, radius1)
    p3 = pa.polarpoint(p2, a2, radius2)
    diff = pa.distance(goal, p3)
    if diff<10:
      print a1,a2,p3,diff
      ax.scatter(a1, a2, diff,c='r')
    x.append(a1)
    y.append(a2)
    z.append(diff)
ax.scatter(x, y, z)
plt.show()
```

The program plots the errorvalue in a 3D Map. For other robotypes like a hanging plotter the codelines with the polarpoint has to be adjusted. The 3D map is not the solution directly, but it helps to program a heuristics for finding the lowest point in the map. In most cases Gradient descent in combimation with particle swarm optimization is the way to go.

Body:
Inverse Kinematics are easier to calculate with visualizing the problemspace. Here is a example for a robotarm with 2 DOF:

fig = plt.figure()
ax = Axes3D(fig)
x,y,z=[],[],[]
p1=(300,300)
goal=(400,300)
radius1,radius2=50,100
step=10
for a1 in range(0,360,step):
  for a2 in range(0,360,step):
    p2 = pa.polarpoint(p1, a1, radius1)
    p3 = pa.polarpoint(p2, a2, radius2)
    diff = pa.distance(goal, p3)
    if diff<10:
      print a1,a2,p3,diff
      ax.scatter(a1, a2, diff,c='r')
    x.append(a1)
    y.append(a2)
    z.append(diff)
ax.scatter(x, y, z)
plt.show()

The program plots the errorvalue in a 3D Map. For other robotypes like a hanging plotter the codelines with the polarpoint has to be adjusted. The 3D map is not the solution directly, but it helps to program a heuristics for finding the lowest point in the map. In most cases Gradient descent in combimation with particle swarm optimization is the way to go.


问:
What determines the amount of noise an actuator produces?
Many robots and other mechanical devices produce the signature whirring noise as they move, some produce less. What makes the difference? What restrictions a silence requirement places on a robot?</p>

答:
There is the motor with its mechanical balancing, and its bearings, and all associated rotary parts, with their respective vibrations, adding up. If a brushed DC motor is used, the brushes have an inherent commutation "whirring".

Also friction noise of all moving parts, though this last is much damped as a side-effect of lubricants used, hence usually not a big factor.

A parallel would be the ancient floppy disk drives, which rotated much slower than a blue-ray drive, but made quite a racket, compared to the near-silent, excellently mechanically balanced, modern Brushless DC motors running blue-ray drives and hard disks.

ContentLicense: CC BY-SA 3.0


问:
How do I measure the distance that a cord (string) has moved?
For a pet project, I am trying to fly a kite using my computer.  I need to measure how far a cord extends from a device.  I also need to somehow read out the results on my computer. So I need to connect this to my pc, preferably using something standard like USB.

Since the budget is very small, it would be best if I could get it out of old home appliances or build it myself.

What technology do I need to make this measurement?

答:
Sure, here are a couple of choices for you:

For high end, you can look at a 200 counts per revolution rotary encoder like this one:

$30 Sparkfun 200 Counts Per Revolution Rotary Encoder

You'll need a microcontroller like an Arduino to count the rotations, there's some sample code to play with.

$5 Adafruit 24 Counts Per Revolution Rotary Encoder

Cheaper, not quite as much community support in comments.

For a little more fun, you can combine the rotary encoder with a gearmotor so you could control the kite string with one piece of equipment.

$40 Pololu 64 Counts Per Revolution Encoder + Gearmotor


问:
How can we solve the problem of robot size in sensor based motion planning?
As you know in Bug algorithm there is a simplifying assumption that says the robot has no size and can fit between any arbitrarily small gap in the map. How can we overcome the challenge of robot size. As we don't have any per-calculated map (in sensor based navigation), can we still tackle the problem in configuration space?
For example, let's assume that the type of the sensor is Hokuyo URG-04LX Laser Rangefinder. Hence we can visualize the sensor measurements by the visualization matrix $V$:
\begin{equation}
V_i  =\begin{pmatrix}cos(\theta_i )* d_i, \quad sin(\theta_i )* d_i\end{pmatrix}\\
\end{equation}
Where $D= [d_1,d_2,\dotsc, d_n]$ is the set of distances, and $\theta_i$ can be calculated as:
\begin{equation}
\theta_i = \theta_{i-1} + {0.36}^\circ,\qquad \theta_1 = 0
\end{equation}
All the information we have about the robot's surrounding at each moment is $V$. I strongly believe that there is no well-formed formula which can define the robot size in this configuration, and also as we don't have any map, but a simple visualization, growing the obstacles by the radius of the robot size in the configuration space just doesn't make sense.</p>

答:
If you are able to sense obstacles with a sensor pattern that is circular (eg laser scanner, contact sensors on a circular body, etc), and you can rotate the robot pose without translation, then you can satisfy the assumptions of the Bug algorithm.

If you use a point model for your robot in the map, then you grow the obstacles by the radius of your robot.

If your sensors are not circular, then you will need to create an algorithm for local movement that moves the sensors in a manner that will detect the obstacles without putting the robot in a trapped position. This will probably prevent your robot sensing narrow but valid paths through the obstacles.

EDIT: You have a circular sensor. If you have differential drive, then you can pick the smallest sensor radius that your robot fits inside and use that. If you have ackerman steering then there is a radius within which you can rotate in place with forward-backward motions. You can use that radius.

All of this is focused on the Bug algorithm. You should use a different, or layered algorithm if you cannot meet the basic assumptions of the bug algorithm.

Also, you can sense the contents of the gap between consecutive points of set $D$ by rotating the robot.


问:
How are huge industrial robots powered?
Take a look at this monster lifting a car.

Now I don't think one can get that power by plugging into a wall outlet. So how are these huge robots (their servos) powered? Gasoline? How is power stored, if it needs to be?

答:
Industrial Robots with having as aim manipulation of large objects are powered electrically in almost all cases (30-40 years ago there have been popular hydraulic variants).

Industrial robots are powered by industrial 400V 3 phase current, so in a sense, they are plugged in a wall outlet, but but a household wall outlet but an industrial one, like this.

A typical household single-phase outlet in Europe can supply a 16 Ampere current at 230 Volts, that is about 3.68 kVA. As a comparison, high payload Fanuc Robot (similar to the one in the question), the M-900iA, equipped with an R-30iB controller requires an industrial 3 phase outlet which can supply 18kVA. Documentation here. This translates to a current consumption of 25.981 Amperes at 400V supply voltage.

Note1: Most industrial robot have a spring system to easier cope with high payloads by balancing the load of axis 2.

Title: How are huge industrial robots powered?


问:
Controlling the Power of a Solenoid
I am trying to control the force of a solenoid. My current system has a bank of capacitors connected to a relay. In order to control the force (how hard I am trying to hit the object) I am increasing or decreasing the the time the relay is on. The problem is this works but it either hits with too much force or way too much force. I can turn the relay on for 5 ms or more. If I try to turn it on for 1 ms it does not even respond. (I am using a mechanical relay.)

I would like to have more control on how much of the energy I discharge so I can control how hard/soft the solenoid moves (say discharge only 10 percent of the total energy stored so it hits slower). While searching I found out about Solid State Relays which according to wikipedia can be switched on an off way faster that mechanical relay (of the order of microseconds to milliseconds).

So my question is am I on the right track? or is there something better to achieve what I am trying to achieve?

答:
You can use a MOSFET instead of relays. MOSFET replies faster so you can achieve your goal..

Here is a simple schematic of a shooting system using solenoids.

Note that the solenoid is the L1 Inductor in the schematic and I've used the push-pull mechanism for putting diodes in the schematic which are necessary for this system... You can see wikipedia for further info.

And the Optocoupler is used to translate micrcontroller's signals.. ( The microcontroller's logic one is 5v while this system's logic one (VS) is 16v.)

And surely you need to put parallel capacitors between GNDHV and VS for the shooting system to work. ( Not present in this schematic. )

Legend :
GNDHV: Voltage supply's ground ( the ground that comes in to your circuit )
VS : Voltage supply
GND: The low voltage ground which is used to power up the micro controller.
Kick: The kick signal.

Note: This system kicks when the Kick is set to zero.

Title: Controlling the Power of a Solenoid


问:
how to manipulate arm robot?
I want to make a robot arm with a gripper that can go to any x y z coordinates near it. the robot itself will be simple just servo motors and Arduino but I don't know how to make reach the desired coordinates, any ideas?</p>

答: What you need is a set of equations that gives you the joint parameters of your robot as a function of the desired end-effector position. For this, you need to compute the inverse kinematics of your robot. Depending on how complex your robotic arm is, deriving those equations might be tricky and multiple solutions (or poses) can be possible. This page explains how to use the inverse Jacobian Matrix method to derive the inverse kinematics.</p>

Title: how to manipulate arm robot?


答:
There are multiple way to do so. It depends on how much effort you want to put in.
In any case, you'll have to do some math and define your frames.

Solution 1

As @lucab said you can calculate those set of equations.

Then compute the inverse kinematics .

This will let you find the set of angles your joints need to have in order for the end of your arm to reach the desired position.

Solution 2

Another popular approach with robotic arms is to use the Denavit-Hartenberg convention. This convention allows you to define your arm joints with another set of parameters.

Then you can use these parameters to build your arm model thanks to Peter Corke Toolbox. This toolbox allows you to do:

- forward kinematics: which mean you it will calculate for you the position of the end of the arm for a desired set of angles

- inverse kinematics: calculate the set of angles needed to get to a position.

If you need more details, feel free to ask.

Title: how to manipulate arm robot?

Body: I want to make a robot arm with a gripper that can go to any x y z coordinates near it. the robot itself will be simple just servo motors and Arduino but I don't know how to make reach the desired coordinates, any ideas?</p>


答:
Determining your x, y, and z depends greatly on how many Degrees of Freedom (DoF) the robotic arm has (which in most cases is just the amount of joints or servos there are not counting the end effector)

You may want to dive into the world of forward and inverse kinematics. In a nutshell:

forward kinematics is generally used when you have your joint angles and want to find your x, y, and z.

Inverse kinematics is used when you know what your x, y, and z is but you want to find your joint angles.

Forward kinematic equations are almost always easier to solve for than inverse kinematic equations since they usually guarantee closed form solutions whereas inverse kinematics makes no such guarantee.

The more accurate your sensors are in measuring angular displacement, the more accurate your end effector will be to the x, y, and z you choose. The process will be something like this:

Select position (x, y, z) --> plug position into inv kin equ to get thetas --> command motors to thetas

Although it may seem like you have no interest in forward kinematics, its actually very helpful in solving the inverse kinematic equations.

Start with forward kinematics, obtain what your x, y, and z equations are as a function of generic thetas (x(θ1, θ2, θ3, ...), y(θ1, θ2, θ3, ...), z(θ1, θ2, θ3, ...)), and perform inverse kinematics by turning the x, y, and z equations, which are functions of thetas, to theta equations as a function of generic x, y, and z (θ1(x, y, z), θ2(x, y, z), θ3(x, y, z), ...).

Where your thetas are your joint angles with respect to your previous link axis.

If still having issues understanding forward or inverse kinematics after researching (many textbooks seem to make it more complicated than it actually is), let me know and I can derive a couple examples.

EDIT

In order to do forward kinematics, it helps to know transformation matrices. Here is a video I put together awhile ago. Not the best video, but I plan on redoing them and making a series about this type of stuff when I get the free time.

Once you understand transformation matrices, its a matter of giving your robot several coordinate systems in unique places. Could be at each joint, or could be using the denavit-hartenberg (DH) technique to reduce the amount of parameters needed to describe the relation between coordinate systems to 4 parameters.

After the coordinate systems are in place, you'll need to multiply various rotation and translation operators with one another to get from a base coordinate system to your end effector coordinate system. Or in other words, you need to find the combination of rotations and translations to get your base coordinate system overlaid on top of your end effector coordinate system.

Once the combination of Rots and Trans operators are found, multiply them all together to get your transformation matrix of your end effector with respect to your base. It'll be a 4x4 matrix; just pick off the 3x1 vector in the top right and you'll have your x, y, and z equations that will tell you your end effector position given your thetas.

Now the difficult part:

You want to derive what your thetas should be to get to a position of your choosing, not the other way around. So use those 3 equations you picked off of the transformation matrix to to help you solve for thetas given an x, y, and z.

Unfortunately determining the thetas from these equations can be somewhat tricky, and sometimes, depending on how crazy your robot configuration is, there is no solvable answer using this approach.

If you have a three or four DoF robot (not including the end effector), and not doing anything too crazy, you should be able to solve for it using some high level algebra.

In order to help you further with the inverse kinematics, you will either need to provide the forward kinematic equations, or show what configuration you plan on having the servos in; but hopefully this was enough to push you in the right direction.

Title: how to manipulate arm robot?


问:
How to move root locus to the left?
I'm trying to control system that has 3 poles (2 in the right half plane)

I sketched root-locus but the two positive poles are going right and never be in the left half plane at any value of k

The state space of system is following

```<code>A =
0   1   0
-3.20205979037663e-08   0   -31.1556786564355
83333.3331597258    0   -173598.323255178

B =
0
-3.11556786564355e-08
83333.3331597350

C =
-0.999999999999890  0   0

D =
0
</code>```

How can I control system like this?

Note: I'm using matlab

答: You want to study "state space pole placement design."  It is a very powerful technique.   In Matlab the steps are for you to create a vector of poles that you want the system to have, and then use the place function.   Matlab's help for this command is nicely specific.

Title: How to move root locus to the left?


问:
Area coverage of autonomous underwater robot
I'm currently working on an autonomous underwater cleaning robot and would like your input on some navigation algorithms

Problem:

Wash the inside of big, open and filled tank, e.g. water storage tank (Figure 1), with an autonomous robot. The inside of the tank is divided in sections, such that the robot has a limited washing area. The washing are can be square, rectangular, parallelogram or other shapes. The inside of the tank may have unknown obstacles, e.g. inlets and outlets.
Since the robot will function under water, there are a few limitations when it comes to sensors.

Available sensors:

Wheel encoders

Distance measurements, e.g. ultrasonic, sonar, for obstacle avoidance

Boundary detection

Bumper with mechanical switch for collisions

Pressure sensor

Camera. Not necessary clean water so low visibility is an issue, i.e. difficult/impossible with visual odometry

Non-available sensors:

INS

GPS

Current solutions:

Random walk within boundaries (Figure 2). Either driving in straight lines (Figure 2), spirals (Figure 7) or a combination of lines and spirals (Figure 6)

Parallel swaths with 30% overlap (Figure 3). Requires cm precision on position estimate to guarantee coverage. Figure 4 shows an identical simulation but with one wheel radius 0.5mm larger than the other. This shows that it is not sufficient to only rely on wheel encoders for positioning as it will drift. With perfect positioning the parallel swath algorithm is 2x more efficient than random walk

One possibility is to add an acoustic navigation system, but it would be too expensive.

This problem is similar to the lawn mower and vacuuming robots. However, it seems like most of the products use random walk or a similar approach. Does anyone know a more efficient algorithm to cover the area based on the information provided?

For all the simulations, the red line represents the robot’s movement and the black is washed area.

Looking at other similar questions I couldn't find the answers I've been looking for:

How to localise a underwater robot?

Robot wire follower + how to position on wire

Working of Autonomous Lawn mower(ALM) in an unbounded area without a perimeter wire

What algorithm should I implement to program a room cleaning robot?

Figure numbering:

1 2

3 4

5 6

7

References:

OmniClimbers: Omni-directional magnetic wheeled climbing robots
for inspection of ferromagnetic structures

答:
If you can't localize, you can't do anything that requires localizing.

If you can't use wheel encoders accurately enough to do a rectangular fill (parallel lines) then, by the same reasoning, you can't use them to do any other shaped fill pattern either (concentric circles, spirals, etc.).

I only see one real solution here (that's not random walk), but its success depends on the physical construction of your vehicle and the sensors you're using.

Use the pressure sensor to indicate depth, then build a PID controller around the pressure sensor to steer the vehicle. Your x/y coordinates of the "rectangular" path you're trying to traverse aren't actually x/y coordinates. You're in a cylinder; they're cylindrical coordinates. Really you have h/$\theta$ coordinates.

You're still left with the problem that you can't localize, so you have no absolute $\theta$ coordinate, so you'll never be able to guarantee any coverage in a particular $\theta$ range.

What I would suggest you consider instead of rectangular regions, if you're attempting to make a "cleaning crew" that will work cooperatively to clean the whole structure, is to use cylindrical regions.

So, let's say you have four robots. You could have each robot clean the entire height (0 to h) and a quarter of the circumference (0 to $\pi$/2, etc.). But you can't do this, because there are (presumably) no features by which you could localize in the tank. Every $d\theta$ looks like every other $d\theta$, so you can't assign any robot a particular range in the $\theta$ dimension.

What I'm suggesting you do instead is to have each robot clean the entire circumference (0 to 2$\pi$), then segment by height. Each robot has a pressure sensor and can tell that they are in their correct height band.

Now all you need to do is know that your wheel encoders are accurate enough to detect that you've traversed the circumference plus some overlap tolerance.

This solution requires your ability to resolve your depth accurately. How accurate? I would say you should be at least half the width of the cleaning instrument. If your brush is a foot wide, then you should be able to determine depth accurate to +/- 6 inches. This ensures you're still cleaning in the desired band if you go off-target. This is the minimum resolution; ideally you'll get something much better.

You'll probably want to overlap by (brushWidth - depthAccuracy) to ensure complete coverage where you went off-track during a normal sweep. So, again, if your band is (brushWidth = 1 foot), and you go off-track by -0.5 feet, then the upper +0.5 foot of the band was not cleaned in that segment. Therefore you'd want to overlap (1 foot - 0.5 foot) = 0.5 feet to ensure the whole band was cleaned.

So, your algorithm flow would look something like:

```<code>desiredHeight = 0;
finishHeight = h/4;

brushWidth = 1; % Foot
depthAccuracy = 0.5 % Feet

speed = 1; % Percent
circumferenceOverlap = 1.1;

while (desiredHeight <= finishHeight)
    while (deadReckoning < circumference*circumferenceOverlap)
        actualHeight = PressureSensor();
        steerDifferential = PID(desiredHeight-actualHeight);
        LeftWheel.Speed(speed - steerDifferential);
        RightWheel.Speed(speed + steerDifferential);
        deadReckoning = deadReckoning + (LeftWheel.Distance() + RightWheel.Distance())/2;
    end
    deadReckoning = 0;
    desiredHeight = desiredHeight + brushWidth - depthAccuracy;
end
</code>```

So, briefly again, just keep a running count of how far you've traveled with the wheel encoders. Once you've gone a full circumference plus some tolerance, then increment the height and clean another circumference. This solution leverages the fact that the tank is a cylinder, and that (start = end) on the $\theta$ dimension.

Now, if there are sparse obstacles that maybe you couldn't use to localize everywhere (couldn't see for example), you can setup an avoidance subroutine to go around it. But this should clean the entire tank efficiently. You'll want to tune the PID controller to keep the vehicle on track, but that performance will again be determined by the resolution on the depth sensor.

A word of caution: the pressure sensor corresponds to a depth, as in below the water line, not a height. You should be able to detect the surface of the water by an ultrasound reflection at the air/water interface, and likewise should be able to detect the bottom of the tank by the reflection at the water/tank interface. You should take this into account if you're planning on cleaning the entire tank and not just the submerged portion of the tank.

Also, any flow in the tank will affect pressure readings, which will cause false depth measurements.

Body:
If you can't localize, you can't do anything that requires localizing.

If you can't use wheel encoders accurately enough to do a rectangular fill (parallel lines) then, by the same reasoning, you can't use them to do any other shaped fill pattern either (concentric circles, spirals, etc.).

I only see one real solution here (that's not random walk), but its success depends on the physical construction of your vehicle and the sensors you're using.

Use the pressure sensor to indicate depth, then build a PID controller around the pressure sensor to steer the vehicle. Your x/y coordinates of the "rectangular" path you're trying to traverse aren't actually x/y coordinates. You're in a cylinder; they're cylindrical coordinates. Really you have h/$\theta$ coordinates.

You're still left with the problem that you can't localize, so you have no absolute $\theta$ coordinate, so you'll never be able to guarantee any coverage in a particular $\theta$ range.

What I would suggest you consider instead of rectangular regions, if you're attempting to make a "cleaning crew" that will work cooperatively to clean the whole structure, is to use cylindrical regions.

So, let's say you have four robots. You could have each robot clean the entire height (0 to h) and a quarter of the circumference (0 to $\pi$/2, etc.). But you can't do this, because there are (presumably) no features by which you could localize in the tank. Every $d\theta$ looks like every other $d\theta$, so you can't assign any robot a particular range in the $\theta$ dimension.

What I'm suggesting you do instead is to have each robot clean the entire circumference (0 to 2$\pi$), then segment by height. Each robot has a pressure sensor and can tell that they are in their correct height band.

Now all you need to do is know that your wheel encoders are accurate enough to detect that you've traversed the circumference plus some overlap tolerance.

This solution requires your ability to resolve your depth accurately. How accurate? I would say you should be at least half the width of the cleaning instrument. If your brush is a foot wide, then you should be able to determine depth accurate to +/- 6 inches. This ensures you're still cleaning in the desired band if you go off-target. This is the minimum resolution; ideally you'll get something much better.

You'll probably want to overlap by (brushWidth - depthAccuracy) to ensure complete coverage where you went off-track during a normal sweep. So, again, if your band is (brushWidth = 1 foot), and you go off-track by -0.5 feet, then the upper +0.5 foot of the band was not cleaned in that segment. Therefore you'd want to overlap (1 foot - 0.5 foot) = 0.5 feet to ensure the whole band was cleaned.

So, your algorithm flow would look something like:

desiredHeight = 0;
finishHeight = h/4;

brushWidth = 1; % Foot
depthAccuracy = 0.5 % Feet

speed = 1; % Percent
circumferenceOverlap = 1.1;

while (desiredHeight <= finishHeight)
    while (deadReckoning < circumference*circumferenceOverlap)
        actualHeight = PressureSensor();
        steerDifferential = PID(desiredHeight-actualHeight);
        LeftWheel.Speed(speed - steerDifferential);
        RightWheel.Speed(speed + steerDifferential);
        deadReckoning = deadReckoning + (LeftWheel.Distance() + RightWheel.Distance())/2;
    end
    deadReckoning = 0;
    desiredHeight = desiredHeight + brushWidth - depthAccuracy;
end

So, briefly again, just keep a running count of how far you've traveled with the wheel encoders. Once you've gone a full circumference plus some tolerance, then increment the height and clean another circumference. This solution leverages the fact that the tank is a cylinder, and that (start = end) on the $\theta$ dimension.

Now, if there are sparse obstacles that maybe you couldn't use to localize everywhere (couldn't see for example), you can setup an avoidance subroutine to go around it. But this should clean the entire tank efficiently. You'll want to tune the PID controller to keep the vehicle on track, but that performance will again be determined by the resolution on the depth sensor.

A word of caution: the pressure sensor corresponds to a depth, as in below the water line, not a height. You should be able to detect the surface of the water by an ultrasound reflection at the air/water interface, and likewise should be able to detect the bottom of the tank by the reflection at the water/tank interface. You should take this into account if you're planning on cleaning the entire tank and not just the submerged portion of the tank.

Also, any flow in the tank will affect pressure readings, which will cause false depth measurements.


答:
Brief process for pole placement in Matlab:

Check that the system is actually controllable.

.

```<code>nStates = size(A,1);
R = zeros(nStates,0);
for n = 1:nStates
    R(:,n) = (A^(n-1))*B;
end
if rank(R) == nStates
    disp('Controllable');
else
    disp('Not controllable');
end
</code>```

Find the open-loop poles. Get their natural frequencies.

.

```<code>olPoles = eig(A);
wns = sqrt(sum(abs(olPoles).^2,2));
</code>```

In your case, the first pole is huge and negative, the other two are purely imaginary. I'm assuming you want to get rid of this oscillation and keep everything else the same. In any event, whatever you choose:

Pick new poles. There's a lot of guidance available online about how to pick "good" poles, so I'm not going to go into any detail here. Like I said, at least to start with, I'd just change (create) damping on the two undamped poles and iterate from there. Whatever you choose, get your closed loop poles by doing the following for each pole:

clPole = - (dampingRatio*wn) +/- 1i*wn*sqrt(1-dampingRatio);

Do this for each pole. If you don't want to change a particular pole, then just set clPole(n) = olPole(n);.

Setup the equations to be solved to insert your new poles.

.

```<code>syms P1 P2 P3;
syms s;
syms g1 g2 g3;

G = [g1 g2 g3];
desiredPoleEquation = (s-P1)*(s-P2)*(s-P3);
currentPoleEquation = det([s*eye(nStates) - (A - B*G)]);

[desiredCoeffs,desiredSValues] = coeffs(expand(desiredPoleEquation),s);
[currentCoeffs,currentSValues] = coeffs(expand(currentPoleEquation),s);

equationSetup = sym(zeros(nStates+1,2));
controllerGainEquations = sym(zeros(nStates+1,1));
for i = 0:nStates
    desiredIndex = find(desiredSValues == s^i);
    if ~isempty(desiredIndex)
        equationSetup(i+1,1) = desiredCoeffs(desiredIndex);
    else
        equationSetup(i+1,1) = 0;
    end
    currentIndex = find(currentSValues == s^i);
    if ~isempty(currentIndex)
        equationSetup(i+1,2) = currentCoeffs(currentIndex);
    else
        equationSetup(i+1,2) = 0;
    end
    controllerGainEquations(i+1) = equationSetup(i+1,1) == equationSetup(i+1,2);
end
</code>```

The end of the block of code above is controllerGainEquations, which has a function of P1,P2,...,PN on the left and g1,g2,...,gN on the right.

Solve the equation controllerGainEquations for [g1,g2,...,gN]. The result here will be gains as a function of poles P1,P2,...,PN.

.

```<code>controllerGains = sym(zeros(nStates,1));
controllerGainsStruct = solve(controllerGainEquations,[g1,g2,g3]);
controllerGains(1) = controllerGainsStruct.g1;
controllerGains(2) = controllerGainsStruct.g2;
controllerGains(3) = controllerGainsStruct.g3;
</code>```

Almost done - now plug in the values you picked for the poles.

.

```<code>controllerSolvedGains = controllerGains;
controllerSolvedGains = subs(controllerSolvedGains,P1,clPoles(1));
controllerSolvedGains = subs(controllerSolvedGains,P2,clPoles(2));
controllerSolvedGains = subs(controllerSolvedGains,P3,clPoles(3));
</code>```

Use the gains correctly. Your control signal is now $u = -G*x$, where $x$ is the vector of states. It is not whatever you originally had. You don't add anything to it. It's not anything other than $u = -G*x$.

Finally, a couple notes on the method I've given:

I wrote this myself because this method will solve for gains with a symbolic state matrix. Pole placement is a method for linear, time-invariant (LTI) systems, so in theory you shouldn't be using a symbolic state matrix, but it's handy for scenarios where you have configurable/variable parameters and want one calculation for gains.

The gains calculated this way aren't necessarily "robust". Matlab's place() command is supposed to create "better" gains.

Protip - if you're getting huge number fractions as a result, it's because controllerSolvedGains is still a symbolic. Use double(controllerSolvedGains) to get a succinct number to use.

Finally, this just works to drive the states to zero. If you want to do reference tracking, you should look into integral control, which requires adding a state (integral error) to the system $A$ matrix. That's beyond the scope of what I wrote here.

:EDIT:

Every step I wrote is the long way to do it. If you have a non-symbolic state matrix and you have the Control System toolbox, then you can do each step as follows:

Check that the system is actually controllable.

.

```<code>nStates = size(A,1);
olSys = ss(A,B,C,D);
R = ctrb(olSys);
if rank(R) == nStates
    disp('Controllable');
else
    disp('Not controllable');
end
</code>```

Find the open-loop poles. Get their natural frequencies.

[wns, dampingRatios, olPoles] = damp(olSys);

Pick new poles. You have to do this on your own.

4 to 6.  Setup, solve, and substitute the closed loop poles to find the gains. All of this is done in one command:

```<code>`G = place(A,B,clPoles);`
</code>```

Use the gains correctly. This is still up to you to do.

Title: How to move root locus to the left?

Body:
I'm trying to control system that has 3 poles (2 in the right half plane)

I sketched root-locus but the two positive poles are going right and never be in the left half plane at any value of k

The state space of system is following

```<code>A =
0   1   0
-3.20205979037663e-08   0   -31.1556786564355
83333.3331597258    0   -173598.323255178

B =
0
-3.11556786564355e-08
83333.3331597350

C =
-0.999999999999890  0   0

D =
0
</code>```

How can I control system like this?

Note: I'm using matlab

Body:
Brief process for pole placement in Matlab:

Check that the system is actually controllable.

.

nStates = size(A,1);
R = zeros(nStates,0);
for n = 1:nStates
    R(:,n) = (A^(n-1))*B;
end
if rank(R) == nStates
    disp('Controllable');
else
    disp('Not controllable');
end

Find the open-loop poles. Get their natural frequencies.

.

olPoles = eig(A);
wns = sqrt(sum(abs(olPoles).^2,2));

In your case, the first pole is huge and negative, the other two are purely imaginary. I'm assuming you want to get rid of this oscillation and keep everything else the same. In any event, whatever you choose:

Pick new poles. There's a lot of guidance available online about how to pick "good" poles, so I'm not going to go into any detail here. Like I said, at least to start with, I'd just change (create) damping on the two undamped poles and iterate from there. Whatever you choose, get your closed loop poles by doing the following for each pole:

clPole = - (dampingRatio*wn) +/- 1i*wn*sqrt(1-dampingRatio);

Do this for each pole. If you don't want to change a particular pole, then just set clPole(n) = olPole(n);.

Setup the equations to be solved to insert your new poles.

.

syms P1 P2 P3;
syms s;
syms g1 g2 g3;

G = [g1 g2 g3];
desiredPoleEquation = (s-P1)*(s-P2)*(s-P3);
currentPoleEquation = det([s*eye(nStates) - (A - B*G)]);

[desiredCoeffs,desiredSValues] = coeffs(expand(desiredPoleEquation),s);
[currentCoeffs,currentSValues] = coeffs(expand(currentPoleEquation),s);

equationSetup = sym(zeros(nStates+1,2));
controllerGainEquations = sym(zeros(nStates+1,1));
for i = 0:nStates
    desiredIndex = find(desiredSValues == s^i);
    if ~isempty(desiredIndex)
        equationSetup(i+1,1) = desiredCoeffs(desiredIndex);
    else
        equationSetup(i+1,1) = 0;
    end
    currentIndex = find(currentSValues == s^i);
    if ~isempty(currentIndex)
        equationSetup(i+1,2) = currentCoeffs(currentIndex);
    else
        equationSetup(i+1,2) = 0;
    end
    controllerGainEquations(i+1) = equationSetup(i+1,1) == equationSetup(i+1,2);
end

The end of the block of code above is controllerGainEquations, which has a function of P1,P2,...,PN on the left and g1,g2,...,gN on the right.

Solve the equation controllerGainEquations for [g1,g2,...,gN]. The result here will be gains as a function of poles P1,P2,...,PN.

.

controllerGains = sym(zeros(nStates,1));
controllerGainsStruct = solve(controllerGainEquations,[g1,g2,g3]);
controllerGains(1) = controllerGainsStruct.g1;
controllerGains(2) = controllerGainsStruct.g2;
controllerGains(3) = controllerGainsStruct.g3;

Almost done - now plug in the values you picked for the poles.

.

controllerSolvedGains = controllerGains;
controllerSolvedGains = subs(controllerSolvedGains,P1,clPoles(1));
controllerSolvedGains = subs(controllerSolvedGains,P2,clPoles(2));
controllerSolvedGains = subs(controllerSolvedGains,P3,clPoles(3));

Use the gains correctly. Your control signal is now $u = -G*x$, where $x$ is the vector of states. It is not whatever you originally had. You don't add anything to it. It's not anything other than $u = -G*x$.

Finally, a couple notes on the method I've given:

I wrote this myself because this method will solve for gains with a symbolic state matrix. Pole placement is a method for linear, time-invariant (LTI) systems, so in theory you shouldn't be using a symbolic state matrix, but it's handy for scenarios where you have configurable/variable parameters and want one calculation for gains.

The gains calculated this way aren't necessarily "robust". Matlab's place() command is supposed to create "better" gains.

Protip - if you're getting huge number fractions as a result, it's because controllerSolvedGains is still a symbolic. Use double(controllerSolvedGains) to get a succinct number to use.

Finally, this just works to drive the states to zero. If you want to do reference tracking, you should look into integral control, which requires adding a state (integral error) to the system $A$ matrix. That's beyond the scope of what I wrote here.

:EDIT:

Every step I wrote is the long way to do it. If you have a non-symbolic state matrix and you have the Control System toolbox, then you can do each step as follows:

Check that the system is actually controllable.

.

nStates = size(A,1);
olSys = ss(A,B,C,D);
R = ctrb(olSys);
if rank(R) == nStates
    disp('Controllable');
else
    disp('Not controllable');
end

Find the open-loop poles. Get their natural frequencies.

[wns, dampingRatios, olPoles] = damp(olSys);

Pick new poles. You have to do this on your own.

4 to 6.  Setup, solve, and substitute the closed loop poles to find the gains. All of this is done in one command:

`G = place(A,B,clPoles);`

Use the gains correctly. This is still up to you to do.


问:
Is there any robot stability control equation that describes the relation between velocity of the robot and its orientation?
Let’s assume at time t a moving robot (e.g. PIONEER 3-DX) changes it’s steering angle by $25^{\circ}$. Obviously, in order to maintain stability and avoid overturning,  the robot must reduce its velocity between the time interval $t$ and $t+1$. But the question is by how much?</p>

答:
That's not obvious. If I'm in a tank, going 0.5 km/h, I don't need to slow down at all. If I'm in a bobsled going 100km/h and the track banks, I don't need to slow down at all.

When you steer, you begin to move around a circle with a particular radius of curvature. This means you also begin to experience centrifugal force.

$$
F_c = mv^2/r
$$

where $F_c$ is the centrifugal force, $m$ is the mass, $v$ is the speed, and $r$ is the radius of curvature.

Now, you have a force. It acts through the center of mass of the vehicle. If the center of mass is at some height $h$ above the surface, then you get a torque in addition to the force, where:

$$
\tau_c = F_c h
$$

where $\tau_c$ is the torque on the vehicle caused by the centrifugal force and $h$ is the height above the road.

Now, the centrifugal force is free to increase until one of two things happens:

The centrifugal force exceeds the static force between the tires and the road. Once this happens the tires "break loose" and the vehicle begins to "drift".

The torque exceeds the torque required to rotate the vehicle. Once this happens the vehicle rolls over.

There was a bunch of news coverage maybe 15 years ago when SUVs were first introduced in the US where the vehicles where rolling over a lot. Their center of mass was too high, meaning that the torque on the vehicle was created much earlier (at lower speeds) than drivers were used to.

So, you don't need to slow down at all until the tire's grip is overcome and/or the vehicle begins to roll.


问:
How to power this servomotor?
I would like to use and test this type of servo motor, significantly stronger than the ones I've been using previously.

However the datasheets seem to be limited and I can't exactly tell how to use the driver.

Would it be fair to assume that to use this system, I would get say a 500 W (or higher) power supply and be able to plug into my (North American) wall outlet to use this motor? And if so, would that give me enough power? I believe NA wall outlets give something like 12 A @110 V max, or 1.32 kW.

How could I tell if this is enough for the above servo, or might I have to upgrade to using an industrial power line?

What if I want to power multiple of these motors at the same time? Surely 1 power outlet wouldn't work.

[semi-related bonus question]  What is the difference between "2 phase", "3 phase" etc in this stepper/servo motor?

答:
No. If there is no {installation, electrical, maintenance, etc} manual/description etc. (and maybe add also quality certificate also here) it is not fair to assume anything. Buying something without knowing its characteristics and placing it under current is a fire hazard, therefore it is not safe to assume characteristics! Guessing characteristics form picures is never a good idea.

From the (missing) installation manual.

If a motor consumes 500 W then 1 electrical outlet capable of supplying 1,32 kW can power 2 motors. 2 Electrical outlets capable of supplying 1,32 kW can power 2 each.

phases are the number of "inputs" for a motor. a 3 phase motor needs 3 signals to turn (dephased from each other) a two phase motor need two. The number of phases times the number of poles give the number of steps which divided 1 rotation (if I am not mistaking).

Title: How to power this servomotor?


问:
Assigning parameters in perpendicular axes: D-H is a must
So I was given a course assignment to assign frames and write D-H parameters for this robot using only 5+1 frames (with Frame $\{5\}$ at $P$ and Frame $\{0\}$ at $O$).

And I assigned them like this:

My question is:
From Frame $\{1\}$ to Frame $\{2\}$, what are joint distances $a$ and $d$?

The best answer I could get was 0. But obviously it should be zero for one axis and $a_1$ for the other. What's wrong?

I have read a similar question here. But the answer points me to another method which is impossible for me.

Edit:
No matter I put $a_1$ in $a$
$$(\alpha,a,d,\theta)=(-90^\circ,a_1,0,\theta_2-90^\circ)$$
or in $d$
$$(\alpha,a,d,\theta)=(-90^\circ,0,a_1,\theta_2-90^\circ)$$
The joint distance $a_1$ does not appear in $z$.
What it gave out is
$$\left( \begin{array}{cccc}
\sin{\theta_2} & \cos{\theta_2} & 0 & a_1 \\
0 & 0 & 1 & 0 \\
\cos{\theta_2} & -\sin{\theta_2} & 0 & 0 \\
0 & 0 & 0 & 1
\end{array}\right)
\text{    or    }
\left( \begin{array}{cccc}
\sin{\theta_2} & \cos{\theta_2} & 0 & 0 \\
0 & 0 & 1 & a_1\\
\cos{\theta_2} & -\sin{\theta_2} & 0 & 0 \\
0 & 0 & 0 & 1
\end{array}\right)$$
Obviously, $a_1$ should appear in $Z$-translation instead!

答: Each parameter is for a simple transform such that when all 4 are combined you go from one frame to the next. It can be helpful to understand each of the 4 simple transforms, and you should do that if you haven't already. </p>


答:
I found this video helpful when learning about the DH method.

DH is all about describing the differences between coordinate systems using rotation and translation about/along the X and Z components of the coordinate system.

EDIT

It seems that your frames {0} and {1} are not in the correct location if your wanting to follow the DH convention. When your on a rotation (pivoting) joint (such as the first joint), you should move up the coordinates to the next joint. That should make joint distances a and d be 0, allowing the DH convention to sufficiently describe the differences in frames.

Title: Assigning parameters in perpendicular axes: D-H is a must

Body:
So I was given a course assignment to assign frames and write D-H parameters for this robot using only 5+1 frames (with Frame $\{5\}$ at $P$ and Frame $\{0\}$ at $O$).

And I assigned them like this:

My question is:
From Frame $\{1\}$ to Frame $\{2\}$, what are joint distances $a$ and $d$?

The best answer I could get was 0. But obviously it should be zero for one axis and $a_1$ for the other. What's wrong?

I have read a similar question here. But the answer points me to another method which is impossible for me.

Edit:
No matter I put $a_1$ in $a$
$$(\alpha,a,d,\theta)=(-90^\circ,a_1,0,\theta_2-90^\circ)$$
or in $d$
$$(\alpha,a,d,\theta)=(-90^\circ,0,a_1,\theta_2-90^\circ)$$
The joint distance $a_1$ does not appear in $z$.
What it gave out is
$$\left( \begin{array}{cccc}
\sin{\theta_2} & \cos{\theta_2} & 0 & a_1 \\
0 & 0 & 1 & 0 \\
\cos{\theta_2} & -\sin{\theta_2} & 0 & 0 \\
0 & 0 & 0 & 1
\end{array}\right)
\text{    or    }
\left( \begin{array}{cccc}
\sin{\theta_2} & \cos{\theta_2} & 0 & 0 \\
0 & 0 & 1 & a_1\\
\cos{\theta_2} & -\sin{\theta_2} & 0 & 0 \\
0 & 0 & 0 & 1
\end{array}\right)$$
Obviously, $a_1$ should appear in $Z$-translation instead!


答:
Here are the step that are in my course for using D-H convention:

Step 1

Define the z axis of every joint

Step 2

Define the origin frame R0 (O0, x0, y0, z0)

Step 3

For i in [1, n] (n=number of joint)

Step 3.1

Define Oi that belongs to zi, and to the common normal to zi-1 and zi

Step 3.2

Define xi such as xi is normal to the plan formed by zi-1 and zi

Step 3.3

Define yi such as xi, yi, zi form a right handed coordinate frame

Step 3.4

Define the frame of the tool (or the ending point of your arm)

Step 3.5

Find the parameters:

Qi is at the intersection of xi and zi-1

α_i is the angle between zi-1) and zi around xi axis

ai is the distance |Qi,Oi|

di is the distance |Oi-1, Qi| along zi-1 axis

Hope this helps


问:
What is the torque/force required to rotate the base of a robot arm?
Take a look at the following simple example robot arm:

I want to know the torque required on that bottom motor to rotate the arm. Since it's not exactly rotating directly against gravity like the other joints I'm not sure how to analyze. Assume we know the mass of every part of the robot arm and the distances to the base.

For reference, I am planning on securing my base rotation motor's shaft through a ball bearing rotary table to the rest of the arm. I'm considering the torque required on that motor to properly pick the right component and make sure I get enough speed as well. So understanding how to analyze the forces would really help!

答:
If you only use Newton's second law, you'll get pretty close in your analysis.

$\sum F = m a$

$\sum M = I \alpha$

Using only the first equation and the idea that a torque is a force at a distance ($\tau = F \times l$),  and point masses for the payload and link masses, you will get a quick first estimate.

So choose what acceleration is acceptable to you and the length of your arm.

$\tau =  m a l $

That will give you a starting point.

As you develop your design, you'll want to calculate the Inertias of each link (and the payload), as well as estimate friction from your transmissions.

The torque from the motor at the joint (on the other side of the transmission) will be a function of the efficiency of the transmission.

$\tau_{a}:$ actuator torque, $\tau_m: $ motor torque, $\eta_g:$ gears efficiency, $R_g:$ gears ratio

$\tau_a = \tau_m \eta_g R_g$

The friction in your support bearings will depend on your design.


问:
Stabilizing a Robot Arm at a Specified Height
I have a 4-bar linkage arm (or similar design) for a telerobot used in the VEX Robotics Competition.  I want to be able to press buttons on my PS3-style controller to have the arm raise to certain angles.  I have a potentiometer to measure the 4-bar's angle.

The potentiometer measures the angle of one of the joints in the shoulder of the mechanism, which is similar to this:

What type of control should I use to stabilize the arm at these angles?

答: This sounds like a classic case for a PID controller.  The "derivative" part of this controller will help prevent the arm from oscillating as you move to a new angle, and the "integral" part will help counteract the force of gravity acting on the arm.</p>


问:
Pitch angle is either +90° or -90°
Not exactly a robotics based question but mechanics is involved.
I have a wearable device that gives output in Quaternions which I can read serially via Labview. My task is to develop a threshold based fall detection system based on these values which I am not familiar with.

Here is a sample data I read from the device

```<code>id: 4 distance: 1048 q0: 646 q1: -232 q2: -119 q3: 717
</code>```

I was able to find the Euler angles from the quaternions. I obtain a Rotation matrix from the Quaternion. From the rotation matrix, I derive the Roll, Pitch and Yaw. The coordinate system is North-East-Down. But my Pitch angle remains at positive or negative 90 degree. The fact is I didn't write the conversion code . I am attaching the

.

Please have a look at the code and help me if you could

答:
The problem is that the quaternions given in

id: 4 distance: 1048 q0: 646 q1: -232 q2: -119 q3: 717

are not normalized. In fact,
$$
\|\textbf{q}\| = \sqrt{q_0^2+q_1^2+q_2^2+q_3^2} = 999.6950
$$
I suspect the wearable device gives the quaternions using fixed point numbers that must be scaled by dividing by 1000. Another problem is that the quaternions are only given to three significant digits, so it will be better to calculate the quaternion norm, $\|q\|$, first using the equation above, and then normalize the quaternions using $q_0\leftarrow q_0/\|\textbf{q}\|$, $q_1\leftarrow q_1/\|\textbf{q}\|$, $q_2\leftarrow q_2/\|\textbf{q}\|$, $q_3\leftarrow q_3/\|\textbf{q}\|$. Then you can directly calculate the Euler angles from the quaternions using
\begin{eqnarray*}
\phi   &=&  \tan^{-1}\left(\frac{2(q_2q_3+q_0q_1)}{q_0^2-q_1^2-q_2^2+q_3^2}\right) \\
\theta &=& -\sin^{-1}\left(2q_1q_3-2q_0q_2\right) \\
\psi   &=&  \tan^{-1}\left(\frac{2(q_1q_2+q_0q_3)}{q_0^2+q_1^2-q_2^2-q_3^2}\right)
\end{eqnarray*}
without going through the intermediate step of calculating the rotation matrix.
Also make sure to use the four-quadrant arctan function, atan2(), to calculate $\phi$ and $\psi$ to obtain the correct quadrant.
Here, $\phi$ is the roll angle, $\theta$ the pitch angle, and $\psi$ the yaw angle; all three angles in radians.  Simple multiply by $180/\pi$ to obtain the angles in degrees.  Your answer should be
\begin{eqnarray*}
\phi   &=& -28.5815^\circ \\
\theta &=&  10.3144^\circ \\
\psi   &=&  93.3298^\circ
\end{eqnarray*}
If you repeat the above calculation without first normalizing the quaternions, you will obtain the correct roll and yaw angles, but a complex pitch angle:
\begin{eqnarray*}
\phi   &=& -28.5815^\circ \\
\theta &=&  (90-j732.7)^\circ \\
\psi   &=&  93.3298^\circ
\end{eqnarray*}

Hope this helps!

Title: Pitch angle is either +90° or -90°


答:
You need enough torque to overcome friction, and to accelerate the load.

If you know the friction torque ($\tau_f$), and the mass moment of inertia along the motor axis ($I$), then the minimum motor torque required is
$$
\tau = \tau_f + I\alpha
$$
where $\alpha$ is the required rotational acceleration.

Title: What is the torque/force required to rotate the base of a robot arm?

Body:
Take a look at the following simple example robot arm:

I want to know the torque required on that bottom motor to rotate the arm. Since it's not exactly rotating directly against gravity like the other joints I'm not sure how to analyze. Assume we know the mass of every part of the robot arm and the distances to the base.

For reference, I am planning on securing my base rotation motor's shaft through a ball bearing rotary table to the rest of the arm. I'm considering the torque required on that motor to properly pick the right component and make sure I get enough speed as well. So understanding how to analyze the forces would really help!


问:
What is the top speed of a four legged robot?
In  Neal Stephenson's novel "Snow Crash", a robotic/cybernetic creature known as a "Rat Thing" looses its bounds and runs to rescue another character.  The Rat Thing is portrayed at moving over 700 mph and causing sonic shock waves.  Can such a speed be reached by purely mechanical means? </p>

答:
Can such a speed be reached by purely mechanical means?

Yes, according to this:

Felix Baumgartner [a four legged being, two of them called "arms"] who jumped from a height of 128,100 feet (39,000 m) and reached 1,342 km/h (834 mph), though he achieved this velocity at high altitude, where extremely thin air presents less drag force.

Just falling from a high altitude is the only purely mechanical way I can think of.

That's probably not what you had in mind as an answer. This is still useful to think about: A ground based human shaped robot would need more than 1g of acceleration, to overcome the low terminal velocity on the ground.

You could do that in a car, but that would mean burning fuel, which is chemical energy. I very much doubt that there's a mechanical way to store the necessary energy in a way that's lightweight enough to still be able to move around.

That's likely still not the answer you are looking for.
Even if you loosen the requirement of purely mechanical to just the parts that create the motion, like legs,  you still have to deal with the noncontinuous way are in contact with the ground. In practise, you also have to deal with unevenness of the ground and small obstacles like rocks, etc.

tl,dr

Reaching 700mph purely mechanically is possible, but not on the ground with a robot that uses legs.


问:
What microcontroller and parts will work for the robot project described bellow?
I want my robot to contain about 20 MB of data or a little more, this will be mostly in text, some pictures so that it can recognize one or two particular objects.

So obviously, I want a camera connected to it and I want it to be able to save images (no need to display them, just save, I would access them through a PC later. However, I do want it to have an output text screen, i.e.: I want it to be able to display text on a screen, just plain text.)

I also want it to be controlled by speech recognition, so it has to be able to accept voice input. Also, iI want it to be capable of producing voice output, but only one or two prerecorded sounds.

Lastly, an infrared sensor will be used for distance gauging and a push button one for contact.

Summary of needs:

Microcontroller and parts required to:

store at least 20 MB of data, text (the microcontroller needs to be
able to access this text and run algorithms on it, GET data only, not
change it), and images (images only for image recognition)

allow saving images taken by the camera

speech recognition as input

output audio (only one or two prerecorded sounds)

output plain text on a screen

equip an infrared sensor for measuring distance and contact
push buttons for detecting contact

If relevant, I am using tracked wheels, two DC motors, the robot will move upon detecting an object using the camera. I will decide what motor controller to use when one of you good fellows let me know what microcontroller would be adept for my wants.

Note: for speech recognition input, I will use an advanced sound sensor, and for the infrared and push button sensors I obviously know what I'm using, same with the camera.

I only mentioned these ones so you would know what I need the microcontroller to be capable of to use. But as for the data storage and saving photos and screen, I have no idea what I can use as I have never used anything similar in a robot before.

答:
From a practical perspective, usage of Beaglebone Black is amazing (although you may end up with image capture issues). It has two PRUs and quite a lot of GPIOs if hardwares are to be interfaced. If image recognition can be done with costly cameras which support h264 compression format (like Logitech c920), Beaglebone black is the clear 'winner'. Else, according to what I have heard, dual-board systems like UDOO are amazing if ease of programming is the main concern. Raspberry Pi is extraordinary if image processing is the sole focus.

Reference: Comparison of embedded systems

(Note: I have ignored some of the nice boards which do not have huge communities. Odroid, PCduino etc are in that list)


问:
What the name of this kind of computer vision?
Whats the name of the technique used to read symbols with computer vision?

Like the one used for this wood cutter:

I want to use something like this to measure distance from the camera to a piece of tape with symbols, or read QR-like symbols to recognize areas, but I can't find information on this because I don't know how this technique or method is called.

What is it called?

答:
This type of image processing is also known as "Pattern matching", "Feature matching" or "Image recognition" in broader aspects. "Pattern detection" is a bit different generally; For example, Techcrunch symbol can be green in color or black; "Pattern detector" detects only the features (say edges and corners) and not color or 'subtle' differences.

OpenCV is the de-facto standard in my opinion. However, some of the other notable libraries include the following:

Aruco light-weight marker detection package

Deep learning based image processing libraries like Caffe, Chainer etc


问:
What is the actual physical actuated quantity when controlling the position of a servo?
I'm trying to learn about servo control. I have seen that the most generic position control method for servos is PID, where the control input is position error. However, I am not sure about what is the actuated quantity. I am guessing that it is one of:

Voltage applied to the motor

Current applied to the motor

I am then guessing that the actuated quantity gets turned into one of:

Torque that the motor exerts

Angular velocity that the motor runs at

I haven't been able to get my hands on and explicitly control a physical servo so I cannot confirm that the actuated quantity is any of these. I know very little of the electronics that controls the motor. It might well be that the controlled quantities are different for different series servos.

My bet is on torque control. However, assume that the servo is holding a weight at a distance (so it is acting against gravity), which means an approximately constant torque load. In this case, if the position error is zero and the servo is at rest, then each of P, I and D components are zero, which means the exerted torque is zero. This would cause the weight to sink, which is countered by the error in its position causing P,I components to increase. Wouldn't this situation cause the lifted weight to oscillate and balance at a constant position which is significantly different from the goal position? This isn't the case with the videos of servos I have seen lifting weights. Or is this the case and friction is smoothing everything out? Please help me understand.

答:
motor controllers

what is the actuated quantity

Yes, the output of the control electronics and the input of the motor, in the simplest case -- DC permanent-magnet motors -- is the voltage applied to the motor.

In other cases, the output of the control electronics is the duty cycle of a PWM voltage applied directly to the motor or indirectly to the "signal" wire of a radio control servo.
They work a little differently.

In yet other cases, many people control position using stepper motors.
They work very differently than DC permanent-magnet motors.

motors

the actuated quantity gets turned into

Your suggestion of "torque control" is approximately true when motor very slow or stopped.

The so-called "back-EMF" generated by the motor by "generator action" is proportional to its angular velocity.
This back-EMF allows motors to be used as generators, such as the motor/generators used in a few cars and the regenerative breaking used in a few vehicles.
(Part of the back-EMF is caused by the "autoinductance" of the windings, but that part is usually negligible, so I will not mention it further -- the article you mentioned has a good explanation).

At any instant, the electrical current in the motor is proportional to the applied voltage minus the back-EMF.
Meanwhile, the mechanical torque generated by the motor is approximately proportional to that electric current.

Therefore at low speeds the mechanical torque generated by the motor is proportional to the applied voltage.
But at high positive speeds, the torque generated by the max positive voltage is less; the "max speed" is often defined as the speed where the max positive voltage gives zero torque.

PID

assume that the servo is holding a weight at a distance (so it is acting against gravity), which means an approximately constant torque load. In this case, if the position error is zero and the servo is at rest, then each of P, I and D components are zero, which means the exerted torque is zero. This would cause the weight to sink, which is countered by the error in its position causing P,I components to increase. Wouldn't this situation cause the lifted weight to oscillate and balance at a constant position which is significantly different from the goal position?

There are 2 different cases: the short-term state immediately after some heavy load is applied, and the long-term state after the arm is allowed to settle.

Please tell the person who told you that "if the position error is zero and the servo is at rest, then the I component is zero" to experiment with a PID controller, or read a little more about control systems (a, b, c, d, e), or both, to fill in the gaping hole in his knowledge of what the I component does in a PID controller.

PID with near-zero I component

In the short term, the P, I, and D components start out at approximately zero,
and so the exerted torque is approximately zero.
When Fred suddenly applies a heavy load, there is not enough torque to hold it in position, so it sinks.
The error in its position causes the P,I components to increase.
If, hypothetically, one had a controller where the I component was completely ignored,
then the arm would settle at some constant position, as you mentioned.
The arm would stabilize at the position where the voltage supplied by the controller (proportional to P, the error in position) was exactly enough to hold up the weight.

PID with significant I component

However, with the PID controller you mentioned, the I component increases as long as there is any error.
Eventually there would be enough I component accumulated that the controller would increase the voltage more than enough to hold up the weight, pushing the weight back up towards the zero-error point.
Whether the weight overshoots or not depends on how the PID controller is tuned, but as long as the P,I,D components are anywhere close to a reasonable value, the PID controller will eventually settle down to the state where:

the arm is stable at almost exactly the goal position (with practically zero error)

therefore the P and D components are practically zero

The I component is not zero -- it still has some large value that accumulated previously when the arm was below the desired position.

the control electronics (because the I component is not zero) drive the motor with some voltage

the motor converts that voltage into some torque that holds the weight up at the goal position.

Many robotic control systems are quick enough that they converge on this final state within a tenth of a second.

When Fred (that prankster!) yanks the weight off the arm,
even though the arm is already at the goal position,
the high accumulated I component causes the arm to pop up.
That small error causes the accumulated I component to bleed off,
and (hopefully soon) the arm returns to almost exactly the goal position (with practically zero error).


问:
Dynamically detect changing obstacles
So the idea is that there would be one robot acting as overwatch, which would detect all of the obstacles in an area (which are not necessarily static), and then send the data about the obstacles' positions to another robot that would navigate around the obstacles to a goal.

My initial thought was to have the overwatch robot be in an elevated position in the centre of the area, then sweep around using an ultrasonic sensor. This way, it could keep track of the obstacles in a set of polar coordinates (distance, angle). But then I realised that this method doesn't account for collinear obstacles.

So the question is, what is the best way to detect a bunch of non-static obstacles within an area?

As a side note, I have seen a system similar to this, where there was a robot detecting obstacles (in that case, a crowd of people) and another robot pathfinding around the obstacles (the people), but I'm unsure exactly how that system was detecting the obstacles.

答: Having an overhead camera (like a single low cost webcam if needed). Ultrasonics is meant to be directional while cameras are not meant to be. The downward facing camera placed at a height and horizontally centered over the area can detect robot and obstacles in Cartesian coordinates and that information can be transferred to the moving robot using Bluetooth or similar methods. If the camera cannot be mounted overhead, inverse perspective transform can be applied or rotation matrices can be employed. If occlusion occurs, more number of cameras can be used generally using data fusion. </p>

Title: Dynamically detect changing obstacles


问:
Learning Materials for Beginners in Robotics and Quadrocopters
I am a web developer. I am fascinated by Quadrocopters and i am trying to learn how to build one and basically i am trying to jump into robotics fields. I don't have much electric circuit and electronics knowledge so i did some research on how to build and what type of knowledge you would require to develop such flying machine. So i started learning basics of electronics from Lessons In Electric Circuits by Tony R. Kuphaldt

The books are very interesting but i could not find a technique so that i can implement what i learn from the books. Basically i am just going through the stuffs, and understanding them little by little. What i want to know is that what is the right way and effective way to learn electronics and electric circuit from your experience and i should i do now so that i can increase my learning speed so that i can achieve my goal.

While i was researching i came across topics such as mathematical modelling and modelling the quadrocopters first and them implementing them on real. How can i gain such knowledge to model something mathematically and implement such in real life? How much math and what areas of mathematics do i need to learn and how can i learn such?

Now you have idea what i want to learn and achieve. Can you please suggest me a road map or steps i need to take to gain such knowledge and skill to develop myself, so that in near future i would be able to build such flying machines on my own.

答:
Your question is interesting one as most of us experience the same during the beginning of development of drones. I am a drone software developer and I was just a student with enthusiasm towards physics, mathematics, development of hardwares (as a part of purpose of life). I hadn't even known the types of differential equations of flight. But, taking up a project (professionally as well with deadlines) helped a lot. This is not "hey me me" story. Some of the websites that helped a lot were robots.stanford.edu and the papers ranging from discriminative training of Kalman filters to full fledged stanford driving software of Stanley, the car that won DARPA Grand Challenge. The 'depth of understanding' depends on your objective and the purpose for which you are developing drone applications. Delft University and University of Pennsylvania have been actively researching on application of drones as well.

From my personal experience, it can be said that simulators like ROS Gazebo MAVproxy can aid the development of research while flying directly feels like a nice hobby.


答:
In general, markers used to measure position visually are called fiducial markers.

Some applications have a single type of fiducial (a solid circle or a cross) repeated many times.

Some applications independently positition many unique barcode-like fiducial markers, sometimes called fiducial targets, frame markers, augmented reality marker, etc.,
such as openAR, ArUco, js-aruco, ARma, JSARToolkit, Cantag, Virtuali-Tee, Studierstube Tracker, Vuforia Frame Markers, etc.
(These applications have more complex computational requirements, because the fiducial can be at some arbitrary pitch, roll, yaw angle relative to the camera, so the software must de-skew and undo the perspective transformation. The Marker-based Augmented Reality article goes into a lot of detail).

Some linear encoders visually detect absolute linear position over long lengths along a long "tape" printed with a long series of unique barcodes,
such as
Absolute Positioning System (APS) code tape,
RESOLUTE single track optical absolute scale,
Data Matrix Position Guided Vision (PGV) code tape,
Leuze barcode positioning system (BPS),
and the "ShaperTape" of the "Origin" from Shaper Tools in your photo.
(These applications generally have simpler computational requirements and so can run faster, because they rigidly hold the camera in a nearly fixed pitch-roll orientation and Z-position relative to the fiducial).

Some fiducual markers are specifically designed with topological region features that allow them to be quickly located and uniquely identified with 2D fiducial tracking in the 2D camera image,
even in applications that need to do full 6D fiducial tracking of the X,Y,Z position and pitch, roll, yaw orientation of the fiducial in the 3D space in front of the camera.

Title: What the name of this kind of computer vision?

Body:
Whats the name of the technique used to read symbols with computer vision?

Like the one used for this wood cutter:

I want to use something like this to measure distance from the camera to a piece of tape with symbols, or read QR-like symbols to recognize areas, but I can't find information on this because I don't know how this technique or method is called.

What is it called?


问:
Forward and Revers Kinematics For Modified Hanging Plotter
I'm building a modified version of the standard hanging plotter (v-plotter). The basic idea is that you have two cables hanging from stepper motors which form a triangle supporting the pen at the tip.

My design the strings anchored at points $C$ and $D$ which causes the behavior to be somewhat different that the normal plotter, especially when operating close to the motors.

I was able to work out the forward kinematics fairly easily, but the inverse kinematics are turning out to be a real headache. You can see my attempt at a standard geometry solution on math.stackexchange here.

Is there anything specific to calculating kinematics for robotics which could help me?

I'm not interested in modifying the hardware to make the math easier. I'm also not interested in discussing the center of gravity of the pen, cable weight...etc. I want to calculate the kinematics for this as an ideal system.

Any and all advice is appreciated.

Thank you.

答:
Alright, this a work in progress at this point.

Basically I decided to rethink the problem after using the triangle based approach was clearly solvable, but required a HUGE amount of algebra (at least as far as I could work out).

The new approach is to not think of the system as a system of triangles, but instead as a sort of trapezoid like so:

For our first pass let's ignore the tilting of the drawing head completely to make life simpler.

The geometry of $C,D,E,F$ is known. Only the lengths of the cables $AC$ and $BD$ change. What we want to find is forward and inverse kinematic equations which relate the lengths of $AC$ and $BD$ to $F_x,F_y$. The other equation we need to find relates $F_x,F_y$ to the lengths of $AC$ and $BD$.

Let's begin by finding $F_x,F_y$ when we know the lengths of $AC$ and $BD$.

We will use a system of three equations. The first two equations will be circles with centers $A$ and $B$, the third equation will be that $CD$ is a known length which we will call $w$.

$$C_x = A_x+\sqrt{L_{AC}^2-A_y^2+2A_yC_y-C_y^2} \tag1$$
$$D_x = B_x-\sqrt{L_{BD}^2-B_y^2+2B_yD_y-D_y^2} \tag2$$
$$D_x - C_x = w \tag3$$

Because $A_y, L_{AC}, B_y$, and $L_{BD}$ are known, let's say $\alpha =  L_{AC}^2 - A_y^2$, $\beta = L_{BD}^2 - A_y^2$ where $A_y = B_y$.

We also know that $C_y = D_y$ which simplifies the equations to:

$$C_x = A_x+\sqrt{\alpha+2A_yC_y-C_y^2} \tag1$$
$$D_x = B_x-\sqrt{\beta+2B_yD_y-D_y^2} \tag2$$
$$D_x - C_x = w \tag3$$

Plugging $(1)$ and $(2)$ into $(3)$ we find:

$$\left(B_x-\sqrt{\beta+2B_yD_y-D_y^2}\right) - \left(A_x+\sqrt{\alpha+2A_yC_y-C_y^2}\right)  = w \tag4$$

Distributing terms and re-organizing we can find:
$$\sqrt{\beta+2B_yD_y-D_y^2} + \sqrt{\alpha+2A_yC_y-C_y^2}  = B_x-A_x-w \tag4$$

We can also say $\gamma = B_x-A_x-w$ to simplify things further.

$$\sqrt{\beta+2A_yC_y-C_y^2} + \sqrt{\alpha + 2A_yC_y-C_y^2} = \gamma\tag4$$

Solving for $y$ we find:
$$C_y = \frac{8 \gamma^2 A_y-\sqrt{64 \gamma^4 A_y^2-16 \gamma^2 (\alpha^2-2 \alpha \beta-2 \alpha \gamma^2+\beta^2-2 \beta \gamma^2+\gamma^4})}{8 \gamma^2}\tag5$$

We can then plug that answer back into $(1)$ to get $C_x,C_y$. $F_x$ is then given by $F_x = C_x + \frac{w}{2}$ and $F_y = C_y - h$

Now, working in the other direction when we have $F_x$ and $F_y$ and want to find the lengths of $AC$ and $BD$. This direction of computation is done more often, and should be optimized.

First we find $C$ and $D$ which is fairly trivial because we know the geometry there and can say:

$$C_x = F_x - \frac{w}{2}$$
$$C_y = F_y + h$$
$$D_x = F_x + \frac{w}{2}$$
$$D_y = F_y + h$$

From Pythagorean theorem, we can then directly compute the lengths $L_{AC}$ and $L_{BD}$ as:

$$L_{AC} = \sqrt{{(A_x-C_x)}^2+{(A_y-C_y)}^2}\tag6$$
$$L_{BD} = \sqrt{{(B_x-D_x)}^2+{(B_y-D_y)}^2}\tag7$$


问:
Sensor for tracking relative position of human
I am making a robot that needs to continuously track the relative position of a human, up to 15 meters away and with at least 300 degrees coverage. Currently I am using a Hitechnic IRSeeker v2 sensor and made a beacon wristband with 6 TV remote IR LEDs. But the maximum distance I can get is around 3 meters.

I ordered some 3 watts IR LEDs to boost the power, but the size of the wristband will be a problem because it will not run on a CR2032 battery.

I also bought some IR remote receivers. But I am not sure if the reflection from the wall will give false results.

Is what I am trying to do possible? Is a beacon 15m away feasible using this technology?

If it is, then what do I need to modify in my current implementation?

If not, are there any other technologies that I should be considering to track the relative position or direction of human, 15 meters away with at least 300 degrees coverage?

答:
There are two environments namely indoor and outdoor environments. If it is indoor, then there may be interference issues like what you have mentioned - walls. In the outdoor environments, (particularly during sunny days) cheap IR sensors can encounter false-detections and that has to be compensated by using IR filters (hardware method) or using digital filters (software method; unreliable) and they are not directional generally.

"Triangulation" is one of the most popular techniques and three WiFi/similar hotspots along with a mobile WiFi/Bluetooth device like embedding it in a band that you have mentioned are needed. However, if obstructions like walls occur, then, it is wiser to use electromagnetic rays that penetrate the walls (there will be many factors involved in the penetration of rays through concrete like thickness, composition, paint etc) and this is an active research topic. One of the easiest methods is to use several cameras at multiple locations and use cascade object classification and/or use a combination of triangulation.


问:
How to convert G code to motor command?
In cnc machine, programs change G-code to commands to stepper motors using parallel port.

I want to know what is the G-code and how can it be converted to stepper motor commands?

The programs doing this are not open-source, So can I find open source project doing the same?

答:
LinuxCNC is an open source project dedicated to "converting" G-code into motor commands. It is not at all a simple task.

The basic steps are:

Read the G-Code file into memory

Interpret the G code (mostly motion commands and way points, but also branches and loops)

Plan a continoupous path between the waypoints

Add the time dimention to your path (velocities and accelerations)

Project values to your motor axis

Make your motor controller follow the reference trajectory (this is the
part which is heavily dependent on your motors and motor driver, in your ase the stepper motor with parallel port)

On driving a setpper motor with your paralel port (once you know what is the desired trajectory of your motor) information can be found here and here

Title: How to convert G code to motor command?


问:
how to add a Matlab code to a simulink model?
I want to program an arduino using matlab by "arduino support package" and I want to use simulink in normal input output operations but also use Matlab language in another part so is it possible to make a code consist of simulink model and matlab language and add this code to arduino ? and if it possible how to make it ?</p>

答:
You can run a reduced version of the matlab language in Simulink using the  Matlab function block, but I doubt this includes arduino commands.

You can extend this reduced version of the Matlab language by declaring the external functions which you would like to use, with the coder.extrinsic command. here is a tutorial on how to do this.


答:
You can use from simulink library browser under User-defined functions figure out which one is suitable for your system.

If you get some delay while calling Matlab function than you can also use a sybsytem as matlab function because matlab function gives output in delay  in terms of calling function and returning the value but  if you generate the same function im simulink model then output will be without delayed version as shown in the figure

Title: how to add a Matlab code to a simulink model?

Body: I want to program an arduino using matlab by "arduino support package" and I want to use simulink in normal input output operations but also use Matlab language in another part so is it possible to make a code consist of simulink model and matlab language and add this code to arduino ? and if it possible how to make it ?</p>


答:
Currently the fastest four legged robot is Cheetah by Boston Dynamics that runs 29mph. Real cheetahs can run 70mph and are the fastest land animals. I don't think it would be possible for a robot to run much faster than that. Why? At higher speeds aerodynamics play a crucial role, and a legged design would be hard to optimize in that way.

Also keep in mind, that there is currently only one land vehicle that broke a sound barrier - thrustSSC. Powered by jet engines, it consumes insane 18l of fuel per second. The mass of the fuel itself would be extremely hard to carry for a legged robot.

Title: What is the top speed of a four legged robot?

Body: In  Neal Stephenson's novel "Snow Crash", a robotic/cybernetic creature known as a "Rat Thing" looses its bounds and runs to rescue another character.  The Rat Thing is portrayed at moving over 700 mph and causing sonic shock waves.  Can such a speed be reached by purely mechanical means? </p>


问:
Is RobotBASIC outdated?
I found this website http://robotbasic.org/ and it talks about a language used for programming things related to robotics, and I want to make sure whether or not it's worth investing any time or energy into compared to other languages before I just wipe it from my browser bookmarks for good. Nowadays, are there better languages and methods for going about the same things that it talks about?

I mean, the site looks pretty old, like something from the late 90s or pre-2010, plus I never heard of it anywhere except for this site, so I wonder if it's just not relevant any more if it ever was.

答: It looks like a light-weight 2D ROS-like simulation system for Windows and a robotic framework like that of Arduino. By glancing over the software, it can be assessed that the software was meant for non-real-time applications with quick-and-easy programming styles (particularly meant for Windows). However, I have found that it is not a standard simulation tool [1][2][3].</p>

Title: Is RobotBASIC outdated?


问:
Kuka KR-C4 Documentation
Is there an official documentation from Kuka that explains at a beginner level how to start programming Kuka Robots equipped with KR-C4 controllers?</p>

答:
The Kuka KRC4 Controller can be programmed using the KRL language. This official Kuka manual  gives a good introduction to both basics of hardware and software.

KRL is a high level programming language which runs on a mixed Windows-VxWorks environment.

Title: Kuka KR-C4 Documentation


问:
Increasing the rotation range of a servo motor
How do I increase the rotation range of a standard servo? Most servos have a rotation range of ~ 180 degrees. I would like to access the entire 360 degree range on the servo, partially because I would be attaching the servo's shaft to the robotic wheel and would like it to be able to make full rotations. Or is that not possible?

I would not like to however lose the 'encoder' part of the servo which allows me to clearly specify which angular position the wheel should stop at.

If I use gears in order to transform this system range, would it lead to loss of precision?

In addition, would such a transform allow the wheels to continuously rotate in one direction? From what I understand, this won't work.

Would a stepper motor with an external encoder or a dc motor with an external encoder work?

答:
It is possible to do it. Take a look at this link.
Of course you will not have the encoder possibility with that servo. But you dont have it currently either. You have to solder middle pin from rotary encoder (resistor) and read the value of resistance to determine current position of shaft.

If you need positioning i would suggest DC motor with encoder or stepper. With stepper you can count steps made. That is only rough estimation on distance made by robot as you dont have feedback if motor has actually turn or not.


问:
2 way Switch powerbar
For some important reasons the plugged cable 1 must not be on at the same time as the the plugged cable 2. It must be idiot proof...

I'm talking about regular house power north america.

What is the specific name of it. I've done some research and I can't find anything. I thinking about crafting the thing with 2 powerbar and a custom button, but I'm looking for something less homemade.

Thanks

答: The idiot proof solution is not to have two cables.</p>

Title: 2 way Switch powerbar


问:
Driving sensorless three phase BLDC motor with Arduino and IMU
I have started to work on a little project of mines, which consists in implementing the stabilization a single axis gimbal using Arduino.

The gimbal is driven by a sensorless three phase brushless DC (BLDC) motor, while on it's shaft there is a generic payload provided with an IMU board (3 axes gyros + 3 axes accelometers), which can give feedback to the Arduino about the angular rates and accelerations.

I have googled a bit about this topic and there are so many solutions out there, the only thing I really do not understand is about the control of the BLDC motor.

Can I use a sensorless control of the motor, by sensing the back EMF
even if the motor is spinning very low?

How can I energize properly the phases of the BLDC motor if it is sensorless?

Can I use the IMU for finding out how to spin the BLDC motor properly without counter rotations?

Could you give me any help, please?

答: consider coupling the motor with an encoder that has enough resolution to tell you precisely when to ramp up current to a particular phase. this will give you precise feedback to develop a control loop that should give maximum torque for a given voltage.</p>


问:
What sensors can track small objects (5 cm - 25 cm) in bright sunlight?
ToF (time-of-flight) cameras seem susceptible to bright outdoor conditions.

Are there any sensors made for bright outdoor conditions and could be embeddable in a robot that could detect and/or track small objects (5cm - 25cm) with a range of 10m - 100m?

Would radar work?

答:
Tracking small objects is always tricky.

You can use Ultrasonic sound sensors. Calibrate it to the distance you want to detect. They have low range though.

If you can work on a more complex model then computer vision could also help (Highly unreliable- It needs to have a very strong filter algorithm)


问:
Is there a sensor that can measure through an object?
Is there a sensor that can measure through an object, for example a mattress. (This is not what I want to do but it is a good illustration) I want to mount a sensor on the ceiling above the top bunk of a bunk bed and want to measure the presence of a person on the bottom bunk (when no one is in the top bunk). I have read about thermal and ultrasonic sensors however it does appear that they would be able to measure on the other side of a mattress.</p>

答:
Some signal has to penetrate the object and reflect back to the transceiver in order to do such a measurement. Light can penetrate some object (e.g glass), ultrasounds can penetrate most objects upto a certain depth (based on material). Magnetic and/or electric fields can also penetrate objects, that is how metal detectors work.

In your mattress use case, a signal entering the object, leaving the object on the other side, then getting reflected, the reflection penetrating again the object and leaving on the other side and then picked up by the transceiver is a tough problem with today's commercially available technology.


问:
Web mapping that can be used for autonomous vehicles/robots
Is there web mapping tool that allows developers to use it to plot GPS data of autonomous vehicles/robots?

Google Maps forbids it. See 10.2.C. Google Earth terms of use link jumps to the same page. Bing Maps looks the similar (see 3.2.(g)).

What I want is a internet-based tool that shows either/both satellite images and/or map, which can overlay plot using its API. I'm making a generic GPS plotter on ROS that could be used both for slow robots or fast vehicles/cars.

Thanks!

答:
The Rock framework has such a widget (based on OpenPilot/GCS).

package

http://rock-robotics.org/master/pkg/gui/map2d/index.html

code

http://gitorious.org/rock-gui/map2d


问:
Relay Fix at Normally Open
I am using my RF module to send a High signal to relay but just once by a push button.As soon as I release it the Relay goes to NC . How can I Fix it to stay at NO . I thought of using a Flip-Flop.</p>

答:
Yes, that is a very good way to go...

you can use a t flip flop so you the q output can hold the relay in the state you need and can toogle every time you press the button..

here the T flip flip, your signal every time you press the button must be connected to the clock

and the output signal diagram looks like

Edit

you can replace the flip flop with its equivalent nand gates

or even more, considering that every nand gate can be schematizied with diodes
like

but as you can see you will need more more elements and more place on the main board if you really want to replace the flipflop

Title: Relay Fix at Normally Open


问:
Is there a KUKA IDE?
I'm learning kuka krc robot language, so far so good, and am wondering if there is an  IDE for writing the code i want to program to the robot, something like

giving me suggestions if I mistype a variable

that suggest me methods available in the kuka language

maybe let me debug the code etc etc

any option?

答:
There is the official option which you can by from Kuka. It is called Kuka Office. I am not sure about variable suggestions, but this can be used for debugging.

There is also orange edit (currently in free beta) which many Kuka programmers use. This does have variable suggestions and also suggestions for methods/variables available in the Kuka language.

Another soluton is to use notepad++ withe the KRL language plugins. This will give you variable suggestions (only your variables) and syntax highlighting and formatting.

Title: Is there a KUKA IDE?


答: I am not sure you will be able to find a cheap off the shelf sensor.  But if you are an RF engineer and willing to implement something yourself, you might want to read: A Multifrequency Radar System for Detecting Humans and Characterizing Human Activities for Short-Range Through-Wall and Long-Range Foliage Penetration Applications by Ram M. Narayanan, Sonny Smith, and Kyle A. Gallagher.  </p>

Title: Is there a sensor that can measure through an object?

Body: Is there a sensor that can measure through an object, for example a mattress. (This is not what I want to do but it is a good illustration) I want to mount a sensor on the ceiling above the top bunk of a bunk bed and want to measure the presence of a person on the bottom bunk (when no one is in the top bunk). I have read about thermal and ultrasonic sensors however it does appear that they would be able to measure on the other side of a mattress.</p>


问:
Use of ADC with Sharp Infrared Sensor
I have a Sharp GP2D12 and I've been using it with my Arduino just fine. I have however had some experience in the past where this sensor (which is analog) was fed into an ADC (like ADC0831) to go to a Basic Stamp. I was wondering what the purpose of this is given that both the Arduino and the Basic Stamp support analog inputs if I am not mistaken, thus it seems weird having an extra and necessary link in the chain. Does the ADC provide more resolution? What is the point of it in this circumstance?</p>

答:
The Basic stamp does not have an analog input. It has a method that can be used to attempt to measure voltage, but the output won't be as good as a proper ADC.

Briefly, the Basic Stamp uses an internal RC circuit and a timer to "count" how long it takes to charge the pin, then converts that time constant to a voltage. Here is an application note that describes the process in greater detail.

The method is prone to errors with noise and temperature drift, and also appears to be poor at handling slow changes in input voltage.

So, the point of the ADC is to get a stable reading of the Sharp sensor's output. The Arduino does have an analog input pin, the Basic Stamp does not.

Title: Use of ADC with Sharp Infrared Sensor


问:
How to dimension a 3 DOF robot arm with RRR configuration?
How can the maximum length and mass of the linkages of a RRR type robt arm be calculated, if the motor's mechanical characteristics are given?</p>

答:
First of all you need to understand how the lenghts and masses effect the torque load on your motors. The masses and lenghts will give you a required torque, while your motors give you the available torque. In this case understand is to write a mathematical function that realtes these terms. This can be done either in the static case or in a dynamic case.

Static case:

Static analysis links positions and forces and there is no motion component to is. It characterises your robot while at rest. Usually writign the static equations is pretty straiht forward using geometry relations and the Newton-Euler equations for forces and torques.

In this case you can identify a worst case position (most probably the streched out position of the arm, including its maximum payload) and you can see how much torque is needed to hold the arm in that position. If you have less (mechanical torque, after losses in various components) available in the joints, the arm will fall down. If you have exactly that amount available, the arm will hold, but will not be able to start moving. The larger the torque in the joints then the statially required torque, the higher acceleration can be applyed when starting to move from this position. Changing the mass or length of the linkages (these will be parameters of the static model) will change the required torque.

Dynamic case:

The dynamic analysis studies the relationship between torques and motion. It includes already the static analyssi (teh case with no motion). The recursive Newton-Euler method can help you write the equations of the dynamic model. As before, you should identify a worst case pose (or more worst case poses for each joint, also including the maximum design payload). This is not straight forward since the worst case pose will be also dependent on the linkage lengths, masses and on the velocities and acceleration (which will be dependent on the load that the motors have). So it will be a trial and error iterative process. Depending on how far you want to go with the math, you can also write a search algorithm which finds the worst case pose. After finding the maximum required torque for each joint, you have to compare this with the maximum available mechanical torque in the joint (after losses). Safety margins should also be considered.

The above mentioned two cases, static and dynamic models do not neceserily have to be written by hand. There are tools available (both commercial and free) which can simulte the dyanmics based on the structure you implement. On very powerful tool is the Matlab Multibody toolbox (aka SimMechanics) (highly expensive). Free tools for this task are Gazebo or Webots. You can find a more comprehensive list here.


问:
Mechanical design for motorized spherical caster wheels
Design goal is to have a mobile robot that operates on 3 large casters, essentially 2 to 4 inch diameter steel ball bearings, that are motorized. No other mechanism would touch the surface. The robot should thus be able to move in any XY direction on a flat surface, with steering being achieved by varying the speed and rolling direction of these wheels. The robot has no designated "front" side, so it does not need to (and should not have to) bodily turn, in order to move off in any given direction.

Conventional wheels or tracks are not the preferred approach.

Looking for suggested mechanical layouts of multiple rubber wheels, pressing down onto the steel ball from within the castor housing, to drive the ball in any direction. A single wheel on a stepper, rotated around the vertical axis using a sail-winch servo, is one approach under consideration. Would this be ideal, or are there any serious flaws in this approach?

Alternatively, is there any other suggested method of driving such a steel ball in any arbitrary direction under electronic control?

答:
What about two perpendicular rubber sheathed shafts? This would have the benefit of neatly separating out the x and y directions into two components.

This could be thought of as an inversion of the function of an old analogue mouse.

From the comments, it is clear that in order to rotate the steel balls in 100% x or y, the rollers on the opposing axis must be removed from contact with the balls.

There is also the assumption that the castor housing has bearings to keep the steel ball in position.