问:
Why does a ID controller not exist?
Why doesn't a PID only consisting of ID exist?</p>

答:
While a simple D controller is merely useless for the reasons outlined by ryan0270 in his answer, there are cases where a simple I controller does perform perfectly well. It pretty much depends on the characteristics of the system we have to control.

Real Example Case

Stabilize the head motion of a humanoid robot by sending counter-velocity commands to the neck while we can sense velocity disturbances by means of a IMU device that are caused by the movements of the torso (or whatever disturbances, e.g. the robot can walk).

It comes out that the velocity response of the group Head+IMU when solicited by a velocity step can be described by the following second order under-damped process:

$$
G(s)=\frac{0.978}{1+2 \cdot 0.286 \cdot 0.016s+(0.016s)^2}e^{-0.027s}.
$$

Therefore, the goal is to design a controller that provides a sufficient counter-action in the following classical disturbance rejection diagram:

A I-only controller with gain $K_I=11$ (discrete controller running @ 100 Hz) suffices to accomplish the job making the closed-loop system Type I and performing great in real experiments. No need for P then.

This is shown in the plot below, where three system responses are drawn for three corresponding controllers counteracting a step-wise velocity disturbance. The proportional part starts becoming helpful only for very tiny value of the gain P. The integral part is dominant, doing almost all the task.

Title: Why does a ID controller not exist?


问:
I need more robots
I know that this isn't a programming question, but it is robotics so I thought you could all be flexible since it's my first question?

Anyway. I love making robots using robot kits that come with instructions. It's always fun to use afterwards because of the controllers I build with it.

The problem is that I can't find anymore robots. They are all either too expensive, not what I'm looking for, or both.

Can anybody give me links to some good robot kits?

My price limit is £30 - £40.

Here are the three robot kits I have built. I need kits that are like these:

Robot Arm: http://www.amazon.co.uk/gp/aw/d/B002HXTONC/ref=mp_s_a_1_9?qid=1419721030&sr=8-9&pi=AC_SX110_SY165

Remote Control Robot Beetle: I can't post more than two links. Go to maplins and type in the name of the robot and you'll find it. It's a rover version of the robot arm.

3-in-1 All Terrain Robot Kit: http://www.maplin.co.uk/p/3-in-1-atr-all-terrain-robot-n12dp

I don't want to program this robot. I want it to be like it is in the examples above. Buy the kit, read the instructions, then build it.

Thank you all in advance!

PS. Any further information will be given if asked for.

答:
I will agree with the other answer, what you are calling a robot is a stretch. A robot by definition is a computer operated complex machine. In my mind, the complex part of the definition also excludes an arduino for the most part.  Following a line or wall is not complex, and arduinos seldom do more than that. But an arduino is often the best pre-complex step for beginners.

I also strongly believe a robot is 99% software.  If you build it, and do not program it, you do not have a robot. You have a pile of electrical components. It is unable to perform ANY task, and can not be called a robot.

Search eBay for Arduino Smart Car.  And learn to program it, before moving on to real robots.

ContentLicense: CC BY-SA 3.0

Title: I need more robots


问:
Alternatives to cameras for a dirt sensor for an autonomous vacuum robot?
When I use a standard manual vacuum, I often notice that I have to pass over a spot several times because a single pass does not necessarily catch all the dirt.  My eyes/brain can easily perceive this information visually, but I don't know how an autonomous robot vacuum can detect whether a pass over a patch of dirt was successful or not.  What kind of sensor/action can I use to determine if the robot vacuum successfully picked up the dirt from a particular patch?

I would prefer to avoid a visual camera if at all possible because it would necessarily have to be mounted above the robot and thereby limit the range of reachable locations.  Is there some other low-cost sensor that can accomplish the same task that can be placed low to the ground?

答:
A low power laser shining across the floor surface at a glancing angle will show a bright glitter of light off of any specks of dirt. A photo-sensor could be arranged to see the sparkle, and order a 'redo' of any area that glittered more than a given threshold...a threshold that would have to be determined experimentally, but should work for most floors.
Alternately, the same idea could be applied to the air flow just inside the vacuum nozzle, and the vacuum only moving on after the dirt particle pickup dropped below a certain threshold. This might make for a very slow moving machine, though.</p>


答:
To be honest I don't think that one can begin his experience in robotics without programming or having some electronics skills.
There is (to my knowledge) no out-of the box solution to get started. Of course...you could start with some sumovore robots or something like that, but you will soon discover that after building up the robot according to its instructions you have nothing else to do. You leave the robot running around without the possibility to get directly involved in realizing robots o robotic system (I hope you understand what I mean).

I can tell you that most of people doesn't start with robots directly. Most of them are coming from the IT, electronics, mechanical fields. But the first important thing is to learn to program and to have skills in electrics (I mean: not literally soldering your circuit, but understand how sensors works and what they are capable for, the protocols used... its a MUST).

Given your budget I strongly suggest you to buy an Arduino. You will spend a lot of time learning to program small applications and have a lot of fun. Furthermore you can buy some motor drivers, servomotors and start moving things, or simply to check datas coming from sensors (see here for many possibilities). The possibilities you have with Arduino are really a lot, you will never get bored. Then, once you are confident with what you want to do, you can move on and program small robots, robotic arm, etc... With such a kit you will have a lot of fun for the next 6 month.

Enjoy!

Title: I need more robots

Body:
I know that this isn't a programming question, but it is robotics so I thought you could all be flexible since it's my first question?

Anyway. I love making robots using robot kits that come with instructions. It's always fun to use afterwards because of the controllers I build with it.

The problem is that I can't find anymore robots. They are all either too expensive, not what I'm looking for, or both.

Can anybody give me links to some good robot kits?

My price limit is £30 - £40.

Here are the three robot kits I have built. I need kits that are like these:

Robot Arm: http://www.amazon.co.uk/gp/aw/d/B002HXTONC/ref=mp_s_a_1_9?qid=1419721030&sr=8-9&pi=AC_SX110_SY165

Remote Control Robot Beetle: I can't post more than two links. Go to maplins and type in the name of the robot and you'll find it. It's a rover version of the robot arm.

3-in-1 All Terrain Robot Kit: http://www.maplin.co.uk/p/3-in-1-atr-all-terrain-robot-n12dp

I don't want to program this robot. I want it to be like it is in the examples above. Buy the kit, read the instructions, then build it.

Thank you all in advance!

PS. Any further information will be given if asked for.


问:
Effect of adding a Pole and Zero to PID
I am confused about how adding a D (which adds a zero to the complete system) decreases the speed of the system. But when we normally add a zero to the system, it causes the system to overshoot.

The same goes for the I part of the PID. Normally when we add a pole to the system, it has less overshoot, but at the same time the integrator increases the overshoot!

How can I make sense out of this inverse relation?

答:
I think your confusion stems from the fact that you don't make any difference between adding pole/zero as cascade to a generic system (i.e. no loop) and adding pole/zero to a PID controller in a loop. In a loop, the behavior of phase lead/lag does matter a lot.

Then, just to be precise, an integrator adds up a very particular pole (in the origin), while the derivative part adds up not only a zero (in the origin) but also a high-frequency pole to make D feasible.

Title: Effect of adding a Pole and Zero to PID

ContentLicense: CC BY-SA 4.0


问:
How can I replace acceleration in the dynamic model of the robot?
In the dynamic model of the robot, it is obvious that we found the torques as functions of the angular acceleration of the joint as well as the linear acceleration of the link center of mass along the three axies.

My question is regarding the values of these accelerations. In general, step motors specifications do not give the acceleration.

Thank you

答:
Probably I'm missing your point, but the fundamental dynamics equation of a manipulator describes physical relations among quantities irrespective of the particular electronics/mechanics running underneath.

If there is a rotating shaft with a joint mounted on it then there is always an acceleration. In a stepper, velocity and acceleration might be significantly discontinuous due to the nature of the actuation, but they can be still computed/measured/estimated.

This harsh behavior of such fundamental dynamic quantities is one of the reasons why DC motors (+ circuitry) are preferable over steppers, with the cost of higher expense.

Moreover, to complete the reply, a stepper is usually employed in a open-loop configuration, which motivates its cost effective choice. Therefore, if the datasheet does not provide the user with a model of how the stepper will accelerate/decelerate under some given input conditions, then we are somehow forced to measure with a dedicated equipment what is happening at the joint side (e.g. see this paper) to be able to retrieve information about the ongoing dynamics. Clearly, this goes against the initial idea of cost saving and in this respect other solutions are more effective, as previously said.

Further, it is well known that feed-forward models themselves are inaccurate description of the reality, thus feedback is always required, especially in dynamics context.

To conclude, my opinion is that steppers in a open-loop scheme are inadequate for dynamics control.

By the way, here's recapped for your convenience the model of the stepper: link. You have a matlab block for that you could employ to experiment; the model is the same cited in the paper above. In principle, if you find estimates for all those electrical and mechanical quantities, you can consider going open-loop.


问:
Natural frequency computation (for PID gains computations)
I am currently trying to parametrize the low-level gains of a robotic arm. This arm uses a classical PID for each joint.

I am trying to use a method based on computation rather than a trial-and-error/tweaking approach. The method I use considers each joint independently and assumes the system driven by the PID is linear. Hence I infer a transfer function, a characteristic polynomial, poles and this gives me gains $K_p$, $K_i$, and $K_d$ for each joint.

Now, computed as I did, these gains depend on the natural angular-frequency. For example:
$$
K_p = 3 a w^2
$$
where $a$ is the inertia and $w$ is the natural angular-frequency.

Hence my question: how shall I compute $w$, the natural angular-frequency for my system? Is this an enormous computation involving the geometry and other complex characteristics of the robot, and that only a computer can do or are there simple assumptions to be made which can already give a rough result for $w$?

I guess this is a complex computation and this is one of the reasons why PID gains are most often found by trial-and-error rather than from computation. Though I am looking for some more details on the subject to help me understand what is possible and what is not.

Kind regards,

Antoine

答:
Rough estimates of the resonant angular frequency $\hat{\omega}_i$ for joint $i$ can be always guessed from the current configuration of the manipulator.

Let focus on joint $i$ and consider all downstream joints $\left \{j:i<j \le n \right \}$, where $n$ is the number of DOFs of manipulator. Put the angular positions $\theta_j$ of these latter joints in such a way to determine somehow a worst case estimate (see below) of moment of inertia $\hat{I}_i^{\text{max}}$ computed with respect to joint $i$; that is:

$$
\hat{I}_i^{\text{max}}= \max_{\mathbf{\theta} \in \mathbb{R}^{n-i}} I_i(\mathbf{\theta}).
$$

Then, by neglecting the internal dynamics and friction components:
$$
\hat{\omega}_i=\sqrt\frac{\hat{k}_i}{\hat{I}_i^{\text{max}}},
$$

where $\hat{k}_i$ represents an estimate of the stiffness of the downstream structure. See this link for further details.
Here, $\hat{I}_i^{\text{max}}$ can be retrieved through simple geometrical inspections, and also by resorting to tools such as the Huygens–Steiner theorem.

Importantly, since it comes out that $\hat{\omega}_i$ is inversely proportional to $\hat{I}_i^{1/2}$, we then try to maximize $\hat{I}_i$ in order to account for the worst impact (i.e. lower $\hat{\omega}_i$) on the control design.

Of course, the validity of such an approach remains limited, but yet worth being pursued, particularly considering that you're not forced to experiment on the real manipulator to get the Bode plot.


问:
iRobot Create 2 discrepancy betweenOpen Interface Specifications and Create 2 Serial to 3.3V Logic
I am cautiously moving forward with my new iRobot Create 2, planning on using a Raspberry Pi with ROSberry installed to control the Create 2. Discovered a problem with the pin out specs between the iRobot Roomba Open Interface (OI) Specification and the Create 2 Serial to 3.3V Logic document. Here is the discrepancy (marked by DISCREPANCY):

PIN ((OI)) Serial to 3.3V

Vpwr Roomba battery voltage

Vpwr Roomba battery voltage

RXD  Roomba TX DISCREPANCY

TXD  Roomba RX DISCREPANCY

BRC  Ground DISCREPANCY

GND  Ground

GND  Roomba BRC DISCREPANCY

The discrepancy is with pins 3,4,5 & 7.

Don't want to fry my Raspberry Pi, any clarification and/or help appreciated.

答: I helped work on the create 2. I will have to double check on pins 5 and 7 but pins 3 and 4 are correct. The RX of the Create needs to connect to the TX of the pi. The same goes for the TX on the Create connecting to the RX on the pi.</p>


答:
I agree with most of what has been said here, but would like to make the point that getting into robotics is a journey and that people can follow different paths to get there!

Specifically we shouldn't undervalue the need for assembly skills (soldering, materials, etc) or knowledge of supporting areas (Battery technologies, motors and controllers, use of multi-meter, generic electronic components, materials and their properties, etc). Playing with "kits" can give you some of these skills and it is even better if you make your own "machine" from scratch.

For instance I have just completed my battle robot - which is radio controlled - and not autonomous and technically therefore not a robot (sigh). However the point is that I have learnt so much during the process that I certainly would not discount the experience. And it has been so much fun too. (Let us please not discount the fun element in all this!)

I suppose it is much the same for our friend and his kit "robots". And so many others. including those who came to robotics from IT or from Electronics. They enjoy the journey and before they know it, they are at their destination..

As for the recommendations to start with Arduino, I agree 100%.  Its cheap plus you can get a lot of cheap kit for it (especially from China, try www.banggood.com) and start to get to grips with sensors and programming which will come in very useful for your next project.

Title: I need more robots


问:
Non-markovian problems/approaches in robotics
As far as i can tell, the markov assumption is quite ubiquitous in probabilistic methods for robotics and i can see why.  The notion that you can summarize all of your robot's previous poses with its current pose makes many methods computationally tractable.

I'm just wondering if there are any classic examples of problems in robotics where the markov assumption cannot be used at all.  Under what circumstances is the future state of the robot necessarily dependent on the current and at least some past states?   In such non-markovian cases, what can be done to alleviate the computational expense?  Is there a way to minimize the dependence on previous states to the previous $k$ states, where $k$ can be chosen as small as desired?

答:
Memory of the past is required whenever failures and/or inadequacy arise in the perception layer of the robot thus affecting significantly its current representation of the world, forcing eventually to apply some sort of backtracking strategies.

Quoting S.D Whitehead and Long-Ji Lin in their paper "Reinforcement learning of non-Markov decision processes":

These non-Markov tasks are commonly referred to as hidden state tasks, since they occur whenever it is possible for a relevant piece of information to be hidden (or missing) from the agent’s representation of the current situation.

Hidden state tasks arise naturally in the context of autonomous learning robots. The
simplest example of a hidden state task is one which occurs when the agent’s sensors
are inadequate for the task at hand. Suppose a robot is charged with the task of sorting
blocks into bins according to their color, say Bin-l for red, Bin-2 for blue. If the robot’s sensors are unable to distinguish red from blue, then for any given block it can do no better than guess a classification. If there are an equal number of blocks of each
color, then guessing can do no better than chance. On the other hand, if the robot can detect color, it can easily learn to achieve 100% performance. The former case corresponds to a non-Markov decision problem, since relevant information is missing
from the agent’s representation. The latter case is Markov since once a color sense is
available the information needed to achieve optimal performance is always available.
In general, if a robot’s internal representation is defined only by its immediate sensor
readings, and if there are circumstances in which the sensors do not provide all the
information needed to uniquely identify the state of the environment with respect to the
task, then the decision problem is non-Markov.


问:
Robots minimum distance
I am trying to implement a mechanism to make robots avoid being too close (Say in a distance less than d). I am not familiar with those systems and I have to implement a strategy to avoid robots being too close to each other. Could anyone recommend me some readings for such a problem or a set of keywords to search for? I don't know yet how to start.

答:
A very effective and elegant approach is the resort to the so-called Potential Fields.

Essentially, each robot of the swarm generates a repulsive potential field which is tuned to be limited in the space around it (pretty much as a charged particle), so as any specific target is responsible for an attractive field, which in turn can reach farther distances.

Then, the single moving robot accumulates the field in the space location where it is by summing all the contributions in sign. The resulting potential will be the driving force to be integrated for yielding the final motion.

To make things work easily, the negative fields must be set very strong but limited in the space around robot mates. However, the designer can have fun choosing the potential shapes and playing with tuning parameters.

Title: Robots minimum distance


答:
I am sorry that there is confusion. My personal opinion is that 7-pin mini-DIN connectors are confusing. Unfortunately, multiple vendors have different pin numberings, and things are further confused as some vendors choose to preserve numberings across the M-F boundary, while some do not (they have 1 mate with 2, 3 with 4, and, 5 with 7). This is the case, in this tutorial.

The pin numbering in the OI manual is for the female connector in the Create. The pin numbering in the Create 2 Serial to 3.3V Logic document is for the male connector on a cable. On the cable end, we chose to keep the pin numbering convention of a wire-ended cable that we use in a lot of the tutorials, which is made by a vendor named Tensility (part number 10-00543). Unfortunately, their pin numbering is the mirror of that on the Create. (There is a note to this effect on the bottom of the second column on the first page -- "Note that the Tensility cable uses the opposite pin numbering convention as Roomba.")

If you use this cable, and follow the color scheme in the tutorial, you'll be in good shape (one more gotcha is that there are two black wires, one of which is connected to the shell. A multimeter will help you figure out which one).

If you are just pushing wires into the Create connector itself, without a connector, (which I do not recommend,) use the diagram in the OI manual; it is drawn as if you were looking down upon the female receptacle pins in the robot. Be aware that TX on the Create should go to RX on the Pi (with a level shift), and vice versa!

Happy hacking!

Title: iRobot Create 2 discrepancy betweenOpen Interface Specifications and Create 2 Serial to 3.3V Logic

Body:
I am cautiously moving forward with my new iRobot Create 2, planning on using a Raspberry Pi with ROSberry installed to control the Create 2. Discovered a problem with the pin out specs between the iRobot Roomba Open Interface (OI) Specification and the Create 2 Serial to 3.3V Logic document. Here is the discrepancy (marked by DISCREPANCY):

PIN ((OI)) Serial to 3.3V

Vpwr Roomba battery voltage

Vpwr Roomba battery voltage

RXD  Roomba TX DISCREPANCY

TXD  Roomba RX DISCREPANCY

BRC  Ground DISCREPANCY

GND  Ground

GND  Roomba BRC DISCREPANCY

The discrepancy is with pins 3,4,5 & 7.

Don't want to fry my Raspberry Pi, any clarification and/or help appreciated.


问:
How to attach a motor to a blade?
The hole is a slightly too big for the motor's shaft. I thought about hot gluing them together.

Link to picture here

答:
Which piece is the robot? This is not a robotics question.

I have to assume since you are asking a question that shows a lack of fundamental mechanical understanding, that for its intended use, precision is not a requirement.

In that case, wrap the motor shaft with some tape until you have the tightness you are looking for.

A more appropriate  fix would be some form of adapter.

For any real application, the propellor size is almost certainly incorrect for that motor. A gear reduction unit is needed.

Title: How to attach a motor to a blade?


问:
How much torque do I need for a CNC machine?
I have a handful of 31.2oz-in stepper motors (Mouser.com - Applied Motion: HT17-268D), and I was curious if they would be big enough to run a 3D printing/cutting/etching type (think RepRap) of machine. I had in mind to attach them via  a simple gear to a screw-type drive to run the tool head back and forth.

Maximum bed size would probably be ~1.5'3.

Heaviest tool head would be something about half the weight of a Dremel tool.

Hardest substances I would use it on would probably be hardwoods (with high speed cutter) and copper (for PCB etching).

How do I figure the amount of torque needed to drive the head, and would the motors that I already have be big enough to do the job?

答:
I was hoping that someone else would answer this question with some sort of formula or rule of thumb that would apply to a much wider range of materials / cutting speeds / etc.

According to the RepRap website,

"It is recommended that you get approximately 13.7 N-cm (= 0.137 N-m or 1400 gf-cm or 19.4 ozf-in or 1.21 lbf-in) of holding torque (or more) for RepRap axis motors to avoid issues, although one stepper with less has been used successfully.
For Wade's Geared Extruder (most widely used one as of 2012) it is suggested to use motor that is capable of creating a holding torque of at least 40 N-cm."
-- http://reprap.org/wiki/StepperMotor#Holding_Torque

Since your motors have 31.2oz-in of holding torque -- significantly stronger than that recommendation -- the motors you already have should work fine for the axis motors of a RepRap-like machine.


问:
Feedback controller: Is there any influence between outer and inner loop when running at different frequencies?
I've develop a quadrotor (only simulation on my PC using ROS) and the feedback controller resumes more or less the following structure:

where you can think that process is the dynamic movement of the quadrotor (motion equations), the inner loop is the attitude controller (it just sets the orientation about all 3 axis) and the outer loop is the position controller that takes care where the quadrotor actually is. Why are they separated? Because in many papers I found out that the attitude controller (pitch, roll, yaw) need to run at higher frequency then any other controller in the system. The position controller instead needs to run at lower frequency.

The following picture is a better explanation of my description. Don't be scared...it is more simpler than one could think:

Now I did it as in the paper. BUT I discovered that my quadrotor was really unstable and I spent days and days trying to correct the gains of the controller without getting a stable system. My intuition said to me that maybe they are running at wrong frequency, so I put a different frequency values for the position controller being sure it is not a multiply of the main frequency (something like 1000Hz and 355 Hz for example.)

Lately I removed the timer in my program (C++) and let the position controller run at the same frequency as the attitude controller just because I run out of ideas and suddenly worked everything nice.

So here is my question. What should I consider when my system has an outer/inner controllers? How to be aware of that?

Regards and happy new year!!!

答:
As short answer, the design of nested controllers proceeds normally from the inner/faster loop to the outer/slower loop. Hence, the outer controller is required to stabilize the "equivalent plant" composed of the actual plant along with the inner controller. In this stabilization design, of course, the frequency of the outer controller plays an important role. Generally speaking, therefore, it's not a matter of equating the two sample frequencies. Multi-rate controllers are quite widespread indeed.

To choose the sampling rate $f_s$ one should observe the following thumb rule:
$$
10\cdot f_c<f_s<40\cdot f_c,
$$
where $f_c$ is the cross-over frequency of the system to control.

Motivations for this consideration can be found in this article (page 6).


答:
In short, there is no particular need for synchronization of inner and outer loops. The inner loop should run "fast enough" to control attitude dynamics and the outer loop should run "fast enough" to control translation dynamics. In my last quad the inner loop ran at 200Hz and the outer loop ran at a variable rate from 50Hz-100hz.

Typically, you shouldn't be trying to "tune" the loop frequencies. Once they are fast enough there is no further benefit to be had. In your case, I would carefully check the code to see what the inner loop controller is doing between outer loop controller updates. In most setups, it will just remember the last command from the outer loop and control to that.

To elaborate on the rationale for separate inner/outer loop controllers ...

As you noticed in papers, for quadrotors it is very common to have a separate inner loop (attitude) and outer loop (translation). One strong motivation for this has been the relative ease of attitude control and state estimation. The attitude subsystem is fully actuation and can be aggressively controlled for tight command tracking. Equally important, state estimation is generally quite accurate using a small 9-axis IMU (gyro + accel + mag).

When implemented correctly, this allows the outer loop to assume that it's attitude commands are tracked very tightly. The system now looks like a system where attitude acts like a traditional input. In this case, the translation subsystem also becomes fully actuated. For this to work, the inner loop typically needs to run much faster than translation dynamics. Conversely, this means the translation dynamics are relatively slow so the outer loop controller doesn't need to run very fast.

The biggest limitation for the outer loop is how quickly and accurately you can estimate the translation state. For fully autonomous systems, This is typically slow and not very accurate so you can't act aggressively.

One final note, from a control theory point of view most of the inner+outer loop controllers don't have stability guarantees; I've seen only one paper where they went through the effort for a similar control architecture. There are also several papers where they create advanced algorithms with stability analysis but those typically aren't work the effort to implement.

Title: Feedback controller: Is there any influence between outer and inner loop when running at different frequencies?

Body:
I've develop a quadrotor (only simulation on my PC using ROS) and the feedback controller resumes more or less the following structure:

where you can think that process is the dynamic movement of the quadrotor (motion equations), the inner loop is the attitude controller (it just sets the orientation about all 3 axis) and the outer loop is the position controller that takes care where the quadrotor actually is. Why are they separated? Because in many papers I found out that the attitude controller (pitch, roll, yaw) need to run at higher frequency then any other controller in the system. The position controller instead needs to run at lower frequency.

The following picture is a better explanation of my description. Don't be scared...it is more simpler than one could think:

Now I did it as in the paper. BUT I discovered that my quadrotor was really unstable and I spent days and days trying to correct the gains of the controller without getting a stable system. My intuition said to me that maybe they are running at wrong frequency, so I put a different frequency values for the position controller being sure it is not a multiply of the main frequency (something like 1000Hz and 355 Hz for example.)

Lately I removed the timer in my program (C++) and let the position controller run at the same frequency as the attitude controller just because I run out of ideas and suddenly worked everything nice.

So here is my question. What should I consider when my system has an outer/inner controllers? How to be aware of that?

Regards and happy new year!!!


问:
Is there a brushless motor controller accepting over 500 updates/s?
I want to use brushless for my line follower.

The problem is most ESCs don't accept more than 400-500 updates/s due to the characteristic of steering signal.

Is there a way to overcome this with a custom flash or am I out of luck?

答:
Here are some off the shelf ESCs which claim to give 400Hz + update rate

1000Hz
http://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html

600Hz
http://www.amain.com/next-level-30-amp-multi-rotor-esc-w-simonk-firmware/p265104

499Hz
http://www.helipal.com/storm-multirotor-30a-opto-esc.html

Normally SimonK firmware should give you some scope to play around for your requirements. You can refer following links

https://github.com/sim-/tgy

http://www.rcgroups.com/forums/showthread.php?t=1513678


问:
Need a Relay Alternative
I have an application that needs a XBee and another module to be turned on and off digitally via a microcontroller.

The Setup is 2 XBee's and an application board is connected to the Microcontroller. On PowerON I need 1 Xbee and the Microcontroller to come on and do its routines. After the uC gets the signal from the Xbee (wirelessly from a baseStation) the board has to turn on the other XBee and application board. And when the operation is over, the XBee and Board is to be powered back down. I dont want to put them in sleep or low power state, just power both those devices off.

I was thinking of using a relay. But i cannot find a 3.3v 1A SMD Equivalent system. I am looking for a SMD type of footprint to go on a very compact board.

What options do i have?

The XBee needs around 1A Power and the Application board 500mA.

答:
XBee sleep mode is supposed to be less than 10uA, so (if you can get it working) then use that.

A P-FET on the high side can be used to turn off anything, you'll need to drive it with a signal transistor to switch it from the mcu - e.g. here or google for FET high side switch.

Title: Need a Relay Alternative


问:
Nano sized electric motors
What is a good website for buying 1.5V continuous motors? I'm looking to build a clockwork robot but I cannot find a motor small enough to fit inside my power box and I don't want to mount it outside of the box. I have a 1" by .75" space that the motor needs to fit into. I have found a few websites but they look sketchy and none of them have good reviews.</p>

答:
Maxon motors are quality motors for industrial automation, their catalog is here - http://www.maxonmotor.com/maxon/view/catalog/

The 320173 fits in your dimensions ( assuming the 0.75" is diameter ) and is nominally 1.8V. New ones are around a hundred times more expensive than the cheap pager motors, but rated at 2W rather than 50mW.

You can get Maxon motors second hand on ebay (the ones I got were for N-gauge model locomotives- they were 12mm diameter x 19mm 12V 1.2W - the 118429 but with a easily removed gearbox on ebay as 139885 ), though you're probably better sizing the machine around the motor you can afford rather than trying to get a particular model.

Though I'm not sure why a clockwork robot needs an electric motor - surely it would be an electric robot!

Title: Nano sized electric motors


问:
Compatible ESC's with brushless 3 phase motors
Am trying to find the right ESC for the following two motors

http://www.e-fliterc.com/Products/Default.aspx?ProdID=EFLM30180MDFA#quickFeatures

http://www.e-fliterc.com/Products/Default.aspx?ProdID=EFLM3032DFA

Can't figure out which of the ESC's listed on the site would be best? Are there alternative (cheaper or better?) options?

答:
Looking at the second, I see 62 amps continuous, 75 max burst, you want a brushless speed controler that can handle that, assuming you plan on using the full power of the motor. So, from that vendor; http://www.e-fliterc.com/Products/Default.aspx?ProdID=EFLA1080B

It takes some looking, but the first motor is a replacement for a kit. That kit comes with a 5 amp speed controler/receiver combo - so you would need a 5 amp brushless speed control. http://www.e-fliterc.com/Products/Default.aspx?ProdID=EFLA1005

That is quite a difference between the 2, power wise. You need to think about physical size and power requirements. Then I'd recommend cheap chinese verson instead;
hobbyking

Just remember, brushless motors need brushless speed controlers. other than that, match up potential amp draw to speed controller capability. Choose batteries based on intended length of runtime. The battery C rating indicated how much current it can deliver. A 1000mah battery rated at 20C can deliver 20 amps.


问:
The aerial refueling problem: sketch of a feedback controller
At first happy new 2015!!!

I'm looking for my next simulator development: a Tanker is flying at constant speed (350 Knots) (no acceleration, no change of altitude or direction). The Tanker is approached from behind by a UAV which needs to refuel or transfer data through a wire. The UAV knows the direction, the speed and relative position from the tanker in order to approach it smoothly. It knows that at about 5 m from the tanker is the contact successful.
Here a picture I found on internet but it is clear more than thousand words:

To achieve the task I thought to implement a "simple" PID which controls the position and the velocity, but for this I have in my mind two different designs approaches:

Solution one: the motion equation of my system provide the position $x,y,z$ and velocity $Vx, Vy, Vz$ of the UAV (to simplify things I will consider just $x$ but of course $y,z$ must be eventually considered too). Those are feedback with the desired position (5m) and velocity (350 Knots) of the tanker. The feedback line is separated for each state and PIDs are working quite indipendently as in the following picture:

please note that to simplify things I never considered the acceleration.

Solution two: this is the most tricky one and I was yesterday thinking about it all the time. In this case only one state vector is going to be feedback to the desired setpoints. In this case I would feedback only the velocity then integrate it and feed the result into the second PID. Maybe the following picture is clearer:

But here I'm not really sure if the second idea is conceptually wrong or could be affordable. I'm pretty sure that the first one is working and leads to good result, but I was wondering if the second one is affordable or is not recommended for a control design.

Regards

答:
Both the solutions you proposed do suffer from unwanted interaction among the two PIDs. You're basically trying to assign two simultaneous goals - i.e. final relative position along with terminal non null speed - when the system has only one input variable, let's say the "thrust" driving the UAV dynamics.

The correct scheme should be the one depicted below:

There exists only one PID providing the driving force to the system, which is fed by the error between the modeled dynamics of the Tanker (plus the relative offset) and the current UAV position.

A typical outcome is plotted here for the plant $m\ddot{x}=-d\dot{x}+u$, where $m=10$, $d=0.1$ $x(0)=(0,0)'$, and the controller's parameters are $P=22.608$, $I=0.874$, $D=51.891$, $N=10.413$ (PID in parallel form).

As it is visible in the graph, the unique goal of the UAV is to catch up the increasing position of the flying Tanker; the fact that eventually also the terminal speed turns to be equal to the desired one comes out exclusively as positive consequence of the good position tracking performance. When you track a position very well, then you also track how it changes over time (i.e. its velocity).

Take-home message about hierarchical control loops: when the designer opts for a combination of inner and outer loops with two nested PIDs, he can only assign as set-point the final position for the outer loop, whereas the inner PID is tuned to have some given performance of dynamic behavior but not to get any steady-state velocity.


问:
How to program parallel PID control loops? So I can give my robot multiple set points to follow
So I'm in the process of building my robot and it has encoders on every wheel measuring speed and position and a compass sensor measuring heading.

I have 3 seperate PID loops at the moment, I can either control the robots speed or I can control the robots position or I can make it follow a heading using a line following type algorithm.

Now I am completely stuck on how to merge these control loops, how do I control the robots heading AND its speed. So I can say to it, "go at 20 degrees at 3m/s" or "go at 45degrees for 5 metres then stop"

Really I would like to be able to control all 3, heading speed and position so I could say "go at 20 degrees for 10 metres at a speed of 5m/s" however I have no idea how to merge the loops.

At the end of the day there are 3 inputs (heading, speed and position) and 1 output (PWM to motors) so do I need to use some kind of MISO control scheme, if so which one?

I've looked at cascaded control but that only accepts 1 set point where I want to set 3 different set points. Maybe some kind of state machine? I'm so stuck!!

答:
Try to gather some basic knowledge on the argument by reading papers about the control of the unicycle; here's one of them. This article has pretty much everything you need.

A somehow related question.


答:
The thing i was looking for turned out to be the KISS ESC:
http://flyduino.net/KISS-ESC-2-4S-18A-v11_1

It has an update speed of op to 2000Hz due to it's own control method called oneshot125.

Title: Is there a brushless motor controller accepting over 500 updates/s?

Body:
I want to use brushless for my line follower.

The problem is most ESCs don't accept more than 400-500 updates/s due to the characteristic of steering signal.

Is there a way to overcome this with a custom flash or am I out of luck?


问:
How does Fliike Smiirl counter mechanism work
First of all please see this video : http://www.youtube.com/watch?v=n0dkn4ZIQVg

I think there is ony one stepper motor -or servo- working in the mechanisim. But as you can see each flip counter works alone and separately.

It is not like classical counter mechanism like this : http://www.youtube.com/watch?v=rjWfIiaOFR4

How does it works?

答:
As far as I can tell, you are asking how a "split-flap display" on things like the
Flapit, the Smiirl Fliike, etc. works.

flip clocks

Some flip clocks -- "Retro Flip Clock", etc. -- use a single motor and a "carry gear mechanism" so they can only count forward and backward (or in some cases only forward) in sequential order.

general flip displays

The video you show seems to spin the 100s digit, the 10s digit, and the 1 digit independently of the other digits,
like split-flap displays indicating arrivals and departures at airports and railway stations.

I suspect it is possible to have a mechanism with a total of one or two motors to independently select one at a time of a large number of letter/digit flip sections, and then flip that section an appropriate number of times, perhaps something like the way the Armatron somehow managed to control a bunch of joints with a total of one single motor.

However, in practice,
my understanding is that such displays typically have a dedicated motor for each letter/digit.
For example, Markus' split-flap display (via "Driving an 8-digit split flap display" ), Tom Lynch's split-flap display (via "Split flap display: if you can’t find it, built it" ), the "Signal-to-noise" mechanism, etc. each use a dedicated motor for each letter/digit section.


问:
Joint angle correction using LM
I have a camera mounted on a rotational joint. I need to calibrate the extrinsics of this camera. I can fix the camera at an estimated angle (facing the ceiling). Then I want to get the real angle.

For that I track key-points in the ceiling while moving my robot forward. Supposing that odometry is perfect, I will see a difference between real key-points shift and estimated shift from the odometry.

I thought about using Levenberg Marquardt to find the optimal solution which is the angle and of my camera in the robot frame but what would my equation look like?

答:
I assume you're provided with the following quantities:

The intrinsic parameters of the pinhole camera model in the conventional matrix format $\Pi \in \mathbb{R}^{3\times4}$.

$n$ 3-D stationary points $P_i=(x_i,y_i,z_i)'$ you can track in the environment that are given in the fixed reference frame $O$ used by the odometry, whose projections in the camera image plane are $\pi_i(t_j)$. The camera is supposed to be rigidly attached to a moving robot (we keep the joint fixed), thus $\pi_i$ varies with the observations taken at discrete time instants $t_j$.

$n$ 2-D points $p_i(t_j)$ estimated within the image plane by the tracking algorithm at the discrete instants $t_j$.

The homogeneous transformation $H(x(t_j),\theta+\delta\theta) \in \mathbb{R}^{4\times4}$ describing the location of the camera frame mounted on the robot with respect to the root frame $O$, as provided by the odometry. $H$ depends on the location $x$ (comprising the translation and the rotation of the base) that varies over time so as the joint angle $\theta+\delta\theta$ which is kept fixed, instead, representing $\theta$ the initial estimate of the joint angle and $\delta\theta$ the unknown offset to be sought.

We aim then at minimizing the following cost function:
$$
E=\frac{1}{2}\sum_{i=1}^{n} \sum_{t_j} \left\| p_i(t_j)-\tilde{\pi}_i(t_j) \right\|^2,
$$
where
$$
\pi_i(t_j)=\Pi\cdot H^{-1}(x(t_j),\theta+\delta\theta)\cdot P_i.
$$

It turns out that $\pi_i \in \mathbb{R}^3$ and specifically $\pi_i=\lambda_i\cdot(u_i,v_i,1)'$, so that we can set $\tilde{\pi}_i=(u_i,v_i)'$ to be used in $E$.

The unknowns are $\delta\theta$ and $P_i$; the total number of key-points $n$ can be kept low (around 4$\div$5 non-coplanar points) as we benefit from the significantly higher number of observations at discrete instants $t_j$. The form of the cost function $E$ is suitable for the LM algorithm since the expression for the gradient $J$ is easy to be retrieved (we know how to write down $H$).

A possible knowledge of the locations of the key-points $P_i$ specified in $O$ can be conveniently put inside $E$ to speed up convergence.

Title: Joint angle correction using LM


问:
Robotics Trends
Robotics has always been one of those engineering fields which has promised so much, but is taking a long time to deliver all the things that people imagine.

When someone asks: "How long before we have [X] type of robots?" Are there any resources we can call upon to try to calculate a rough answer. These resources might include:

Rate of progress of computational power, and some estimate of how much will be needed for various types of AI.

Rate of progress of electrical energy storage density, and some estimate of how much will be needed for various types of robot.

Rate of progress of actuation systems, and some estimate of what would be needed for various types of robot.

Lists of milestones towards various types of robot, and which ones have been achieved and when.

Are these types of studies performed, and are the results published?

Added:

In response to Jakob's comment, I am not looking for opinions or discussions on this subject. What I am looking for are published studies which might shed light on this question.

答:
This isn't a published study, but many people use the Technology Readiness Level (TRL) system to assess the state of technologies.

Granted, it doesn't really tell you when a technology might reach a particular stage, but it can be useful in establishing a common framework for this sort of question.

It also can be useful for prioritizing and comparing different subsystems. For example, in a robotic system, if you deem that the actuators are at TRL 6 but your power storage technology is only at TRL 1, you can see what is holding the whole system back and put more effort ($) there.

Title: Robotics Trends


问:
Can't Read current on Pololu Dual MC33926 Motor Driver Shield for Arduino
I purchased a Pololu Dual MC33926 Motor Driver Shield for Arduino, and for some reason I cannot read current from the motor controller. On the Serial.println() it just prints weird data (garbage), and when I use ROS (Robot Operating System) I only see -0.0 (minus zero) value for both motors.

All I've done is plug the shield on my Arduino UNO R3 model, and run the demo that comes with the sample library --
http://github.com/pololu/dual-mc33926-motor-shield .

How can I fix this issue?

答: Sensitivity of the sensor is approx. 525 mV/A. I was trying the same motor Driver - MC33926 and when there was a very low load of the motor, the 0 as the output was correct, because it was drawing very small current.</p>


问:
Questions on gears for a robot actuator
I have some questions regarding building a gearbox for a motor to create a robot actuator. Given my desired motor and loads, I've determined that a gear ratio in the 400-700 range is adequate for my application.

Here is my motor choice for reference: http://www.robotshop.com/ca/en/banebots-rs-550-motor-12v-19300rpm.html

Here are my questions:

1) Mounting gears to a motor: if I have a motor with a shaft diameter of 0.12in (3.2mm), what size gear bore should I use, and how do I attach a gear to the shaft in practice? I'm not that mechanically inclined (yet).

2) Say I build a gearbox of ratio 625:1, as such: https://www.youtube.com/watch?v=lF-4qVBWy88 I have no idea of how "durable" such a set up would be. For my application, I am looking at moving an 8kg mass from 0.6 meters away, coming out to a total torque of 47 newton meters. How can I tell if the gears will break or not?

For reference, these are the gears I'm looking at (and I'm pretty sure they're the same ones in the video): http://www.vexrobotics.com/276-2169.html

3) Assuming those gears above were to fail, what type of gear material would be recommended for my load application of max 47nm?

4) What efficiencies can one expect from gears of different types? I've been assuming 50% conservatively as another answer mentioned.

Thank you for any help, and please let me know if anything was unclear.

答:
Why not just BUY a gear motor.  These things are basically the motor you linked to with a reduction gearbox attached.
Here is a motor with a 380:1 reduction
gear motor  These come is any reduction ratio you need.</p>

Title: Questions on gears for a robot actuator


答:
What you need to do is make a LAYERED control system.  At the bottom layer is the motor speed PID controller.    It will constantly read two parameters "target speed" and "count to stop at".  There is one of these for each wheel.  The Wheel-PID runs the wheel at the desired speed until the encoder count matchers the stop count.

Next you have a heading PID.  It's output is the "target speed" for each of the wheels.  It it needs to go more to the left it increases the speed of the right wheels and reduces the left wheel speed.  This servos the robot to the desired heading.

The next level outputs the desired heading and the "stop at" encoder count.  It knows what heading to go to in order to get to the desired location and how to avoid obstacles and it can set the target speed based on maybe how close the robot is to the location.  It get the current location be integrating the path actually traveled.

You were right when you said "cascade".  One PID's output is the next one's input.  But it need not be one to one

But as you move upward perhaps "PID" is not the right method?

Also you will find you need to combine sensor data when two sensors give the same information like wheel encodes and a compass.  You can use a Kalman filter to combine this data.

Title: How to program parallel PID control loops? So I can give my robot multiple set points to follow

Body:
So I'm in the process of building my robot and it has encoders on every wheel measuring speed and position and a compass sensor measuring heading.

I have 3 seperate PID loops at the moment, I can either control the robots speed or I can control the robots position or I can make it follow a heading using a line following type algorithm.

Now I am completely stuck on how to merge these control loops, how do I control the robots heading AND its speed. So I can say to it, "go at 20 degrees at 3m/s" or "go at 45degrees for 5 metres then stop"

Really I would like to be able to control all 3, heading speed and position so I could say "go at 20 degrees for 10 metres at a speed of 5m/s" however I have no idea how to merge the loops.

At the end of the day there are 3 inputs (heading, speed and position) and 1 output (PWM to motors) so do I need to use some kind of MISO control scheme, if so which one?

I've looked at cascaded control but that only accepts 1 set point where I want to set 3 different set points. Maybe some kind of state machine? I'm so stuck!!


答:
As you noted, there is only one output (the motor's desired PWM) when all is said and done. All three loops may contribute to this output, but how should this be managed? The simplest method is to average all 3 commanded inputs to form a single PWM value, $PWM=(heading+speed+position)/3$.

Of course, this method assumes that all command forms are equally valued. Is heading more important? Then weight it more: $(alpha * heading)+(beta * speed)+(gamma * position)$, where $alpha+beta+gamma = 1$ and $alpha > beta$ and $alpha > gamma$.


问:
How can I use the Arduino PID library to drive a robot in a straight line?
I would like to create an Arduino based robot with 2 wheels, quadrature encoders on each wheel, a H-bridge driver chip (or motor controller) and a caster.  I want to use the PID library to ensure the speed is proportional to the distance to travel.  </p>

<p>At a conceptual level, (assuming the motors do not respond identically to PWM levels) how can I implement the PID control so that it travels in a straight line and at a speed proportional to the distance left to travel? </p>

答:
As said above, you start out by telling each wheel to move at the same speed and then the PID makes sure they are running at that speed.  But this will NOT be perfect.  You need to keep checking for and correcting errors   (1) periodically read and compare the two wheel encoder counts and make one wheel go slightly faster if needed to get the counts equal. and (2) encoders NEVER are perfect you you need an accelerometer and a compass.

You are looking at a Kalman filter.  if you want to combine encoder, compass and accelerometer data to give you the heading.

OwnerDisplayName: Robert


问:
What kind of motor control can I implement if I cannot use an Encoder?
Every time I see a PID control for a motor, it involves an Encoder, so the algorithm knows the real position of the motor or wheel.
But with the robot I have, I cannot use an encoder. I only have ONE optocoupler per wheel which can count how many degrees the wheel has moved. I can use it to increment a counter, but the counter ALWAYS increment (if the wheel moves forward or if the wheel moves backward).

The first moment I saw it as an inconvenient was when I studied the Arduino PID Autotune Library. In the first figure, I would not see decrements on the INPUT.

My objective is to move a little two-wheels robot small segments driven by simple trajectories separated over time by a complete stop (straight 10 cm, stop, move right 90 degrees, stop, straight until detect obstacle...)

Could you suggest me some kind of ideas?
The first idea I have is to transform the PID position control to a speed control (which is more convenient for the feedback loop I have) and keep a counter of the traveled distance to inform the speed control when to stop.

答:
I have the same kind of system.  It is a wheel encoder with just one sensor.  I get just 20 counts per wheel revolution.   It is easy to use.  The software that sets the motor direction also sets a global variable to either +1 or -1.  Then when the interrupt handler gets the signal "tick" it ADDS the global variable to the current count.

In short with one encoder you have to just remember the direction you told the wheel to go.  This only works if the motor is strong or if there is a lot of friction in the system.  It fails if there can be uncommanded wheel motion.


问:
Why Make Bipedal Robots?
A friend and colleague of mine who studies robotics says that bipedal robots present much greater challenges for stability and locomotion than those with more legs.

So why is there so much effort to develop bipedal robots?  Are there any practical advantages?

Of course, I see the advantage of having arm-like free appendages, but it seems like 4 legs and 2 arms would generally be a better design.

答:
I would say:

Compactness of the structure: imagine humanoid robots that are required to operate in household environment: two-legged robots might have less difficulties in navigating among tables and chairs standing very close each other.

Energy consumption: of course the power needed increases proportionally with the number of legs.

Human likeness: an aspect that we don't have to neglect if one day we want to have robots among us, both for social reasons and technological reasons. Regarding the latter, generally speaking, copying the human body entails a number of benefits for robots that are designed to act in human context: this applies equivalently to the robot upper-body (e.g. manipulation) and to its lower-body (e.g. locomotion).

Title: Why Make Bipedal Robots?


答:
In addition to the reasons given by Ugo, studying humanoid robots in general helps in the medical field too.

Trying to understand what sensors/systems robots need helps us understand what sensors/systems we use

If we can make a fully functioning humanoid robot, then individual parts such as an arm or a leg can be converted to a better functioning prosthetic limb for people.

And one more reason I can think of

Why study anything hard? All the subproblems worked on by individual researchers can be easily applied to other types of robots.

Title: Why Make Bipedal Robots?

Body:
A friend and colleague of mine who studies robotics says that bipedal robots present much greater challenges for stability and locomotion than those with more legs.

So why is there so much effort to develop bipedal robots?  Are there any practical advantages?

Of course, I see the advantage of having arm-like free appendages, but it seems like 4 legs and 2 arms would generally be a better design.


问:
Which encoder should I use with a 24V Dc motor and 6mm shaft?
I would like to control the position and velocity of a DC motor like this one (ZY MY 1016 - 24V - 10A - 200W). The motor comes with a 13 TOOTH SPROCKET and the diameter of the shaft is 6mm. It's not possible to apply an encoder to the back of the motor (see picture)

The angular velocity in the description is 2750 RPM, which encoder do you recommend?

答:
Any of them. Which ones have you looked at?

I googled, and the first one that came up was a smaller pololu unit for a micro robot,

But you know what? They all work the same and are fairly simple to build / adapt.

You probably can locate a hall effect sensor at the 13 tooth sprocket.
Understanding Integrated Hall Effect Rotary Encoders

Other than that, this sounds like a shopping question, you might get lucky and find someone who has used a 6mm shaft encoder and can recommend it, but that is not a robotics question.


答:
Really simple;  Bipedal robots are designed to operate in environments made for ..... bipedal people.

A swimming bipedal robot is probably not a good idea.

Since climbing stairs, stepping over curbs, sitting in vehicles, opening doors and reaching into cabinets are all environment issues due to a design for humans, you can save a lot of contingency planning by using a bipedal model.  Yes, it requires some complex math that evolution gave the human bipeds, but the big picture is that in the end, it is much simpler than alternatives.

Title: Why Make Bipedal Robots?


答:
I doubt you will be able to simply by something an attach it.  How to make an encoder will depend on how this motor is used.  Are you doing a chain, gears?  You will need to design the rotation sensor into the rest of the power transmission system.

What you do is place a disk of some kind, plastic or metal and then you make a hole or slot in the disk and your sensor detects the slot.  The simplest sensors to use are these IR LED/photo transistors.   They are cheap and very reliable even in bright light.  I use them with a black plastic disk.  But test your disk material first.  Some that looks black is transparent in IR.  Metal is best.

IR sensor   To use them you need to add two resisters and 5V power.  330R for a current limiter on the LED side and a 10K load resister on the transistor side.  Those values are not critical. I connect this to a interrupt pin on an Arduino.

In your case you might drill a hole in the sprocket gear and mount an IR sensor where it can "see" the hole.  The sensor come with different slot widths.  I'd pick a width abut twice the thickness of the disk

Title: Which encoder should I use with a 24V Dc motor and 6mm shaft?

Body:
I would like to control the position and velocity of a DC motor like this one (ZY MY 1016 - 24V - 10A - 200W). The motor comes with a 13 TOOTH SPROCKET and the diameter of the shaft is 6mm. It's not possible to apply an encoder to the back of the motor (see picture)

The angular velocity in the description is 2750 RPM, which encoder do you recommend?


问:
translation the shaft encoder data
I am designing a robot in real world and i want to plot everything in X,Y (Cartesian) coordinates

I just want to use the encoders of wheels to determine the current position of mobile robot and its orientation depending on a specific calculation formula (like this http://rossum.sourceforge.net/papers/DiffSteer/ ) even if that will lead to inaccurate calculations .

Actually , I found out this formula below to compute x, y coordinates from encoder data but I still confused in some sides of this formula

I had a Rover 5 chassis form Dagu with two normal DC motors and two encoders (incremental rotary encoder) per each wheel, how could I translate the pulses of encoders or how to work out the x.y position of the robot based on the shaft encoder data.

I deduced some of values from Rover 5 chassis :

cm = conversion factor that translates encoder pulses into linear wheel displacement

Dn = nominal wheel diameter (in mm)
:
about 20 Cm

Ce = encoder resolution (in pulses per revolution)
:
Encoder resolution: 1000 state changes per 3 wheel rotations

n = gear ratio of the reduction gear between the motor (where the encoder is attached) and the
drive wheel.
:
Gearbox ratio: 86.8:1

In Rover 5 chassis there are 4 small wires with female headers. RED is +5V for the encoder , BLACK is 0V (ground) , WHITE is signal A , YELLOW is signal B . The important wires in each encoder are signal A and signal B ,so

How to get values of NL , NR  in the formula above from signal A & signal B ?

Is the value of NL is the direct value from  wire signal A or signal B ? the same question for NR .

Thanks a lot

答:
You seem to have gotten the correct formula.  But continue to study them until you understand how they are derived, don't just copy.  </p>

<p>One thing I can add this that odometer only works for a short distance.  A few meters and not even that if outdoors running over rocks and grass.  You need some other kind of sensor and then combine the data.  One of those 9DOF compass/accelerometer/gyros work well can now you can get them for $5 or $6 on a breakout board.  Use this and the wheel data and you are better off.  </p>

Title: translation the shaft encoder data

Body:
You seem to have gotten the correct formula.  But continue to study them until you understand how they are derived, don't just copy.

One thing I can add this that odometer only works for a short distance.  A few meters and not even that if outdoors running over rocks and grass.  You need some other kind of sensor and then combine the data.  One of those 9DOF compass/accelerometer/gyros work well can now you can get them for $5 or $6 on a breakout board.  Use this and the wheel data and you are better off.


答:
What you are asking is "why build something that is hard to make when there are easy to make solutions?"  Simple answer: "because you learn more when you do something that is hard."

Also if yu want a robot that can function in a world with humans then if is best if the robot is in the shape of a human.  We have constructed out world based on our shape and size.  Doors and stairs and walkway paths and the with of isles in the super market and a million other things are build for use by humans.

We could argue that today "everything" is wheel chair accessible so why not build a robot that looks like a powered wheel chair?  OK sounds good until you try siting in a wheel chair for a full day and see how much better walking works.

But really you build the robot based on the task it has to do.  Most don't move at all and are bolted to the concrete floor.

Title: Why Make Bipedal Robots?


问:
Is my quadcopter loop fast enough?
I've been working on a quad copter for awhile now, recently I've finished the interface for PID tuning and its leading me to question several design decisions.

The quad uses a RaspberryPi as its pilot, the entire loop takes less than 20ms. IMU data is gathered, the throttle speeds are calculated, and then finally sent to an Arduino(micro) over an SPI interface. Where they are analogWrite(...), to each ESC.

Can a quadcopter fly with a loop that slow? 20ms = 50Hz?

答: As a rules of thumb, 50Hz is good.  But you need to look at your rates.  What is for example the maximum rate of rotation about "Z" or "yaw"?   If the aircraft can spin at 50 revolutions per second then obviously a 50Hz loop is not going to work.   Divide the 50Hz loop rate by the rates of movements about each axis</p>

Title: Is my quadcopter loop fast enough?


问:
Quadrocopter first build: how to tell if components play well together?
I'm building my first quadrocopter, and I'm trying to come up with a parts list that is suitable for a first build.

I will use this to learn how to fly a quadrocopter manually (lots of crashes!), and to do some experiments with running AI for piloting it.

A couple questions about the below list of parts:

Is this a good choice for a first build? Are we missing any crucial parts?

Do these components work together? Is this battery strong enough to fuel all the components that need power?

Here's the current list of parts:

Frame - 450 mm

Propellers - 10x4.5", two pairs

Motor (4x) - 900kv brushless outrunner motor; max current: 18A; ESC: 25-30A; cell count:3s-4s lipoly

Electronic speed controllers (4x) - 20A constant current, 25A burst current; battery: 2-4S lipoly

Battery - 3300mAh lipoly, 11.1v, 3 cell; constant discharge: 30C, peak discharge: 40C. charge plug: JST-XH. 3300 mAh x 30C = 99 amps?

Charger - lipoly, 50W, 6A, 12v power supply

Power supply - input: AC 100-240v 50/60Hz; output: DC15v 5A

Arduino board

Gyroscope for arduino

Accelerometer for arduino

GPS sensor for arduino?

RC transmitter for arduino

RC controller

答:
You have an Arduino in the list of parts but no software.  Are you writing your own?  This would be a big job.

If you are building this from scratch including the software one big mistake would be to simply build the whole thing then try to fly it outdoors.  NO.  Fist build some small part and test it, then some other small part.   For example the arduino and software.  Run it on your desk with a USB cable plugging in to the PC and just print motor commands and sensor inputs to the screen or log files.   Build a jig to test one motor what you measure current with a meter and RPP with an IR sensor.

You are developing an aircraft and you do that in a series of tiny "baby steps".

If you just want a quad copter then buy a quad copter.  If you want a design project then buy parts but expect a long process, especially with the software development.


问:
Uploading edited code for Arducopter
I'm attempting to customise some code for my DIY pentacopter frame.

To that end, i've modified the some existing code, and saved it under AP_MotorPenta.cpp and AP_MotorsPenta.h . I'm currently trying to upload the code onto my flight controller, but am currently unable to do so due to the following problems.

Problems

Unable to upload to my APM 2.6    ( #1)
Unable to select my pentacopter frame.    (#2)

Problem (#1)

I've saved my customised files in the AP_Motors library, and have compiled the Arducopter 3.2 code in ArduPilot-Arduino-1.0.3-gcc-4.8.2-windows , after which i upload it using mission planner. However, when i am uploading the hex file, i get the following error

"Uploaded Succeeded, but verify failed : exp E2 got 60 at 245760"

However, when i try uploading it directly from the modified Arduino IDE, i get a series of warnings , followed by the messages

avrdude:verification error, first mismatch at byte 0x3c000 0x60 !=
  0xe2 avrdude: verification error; content mismatch

followed by the message

" avrdude done.Thank you. "

Does this mean that the uploading of the firmware to my flight controller is successfull? Also, is there any difference between uploading via mission planner and the modified Arduino IDE?

Problem #2

In the mission planner, originally there is the option to choose one of several frames, (i.e Quad/HexaOcto) etc. After uploading my firmware, how would i go about selecting my penta frame for use?Also is there any further thing that i would have to do?

Apologies in advance if the questions are rather inane, as i have little programming experience to speak of.

I would really appreciate any help i can get.

Thanks in advance !

答:
You say "I have little programming experience to speak of."  I'd fix this problem before going further.  You questions tell be you don't know how to use even the basic Arduino IDE.

Have you gotten the example sketches in the IDE to work?  Staring with the blinking LED example?  Sorry if this is an insulting question butI don't know, you don't say what you CAN do

Now to your question. "Uploaded Succeeded, but verify failed" means that when the code was loaded and the read back to verify  the loading as accurate.  This failed.  So you can't be sure the correct code is loaded in the Arduino.

We don't know why this failed.  I would put the copter and related software aside and verify you can load code into the Aduino and verify it.  Just write some big sketch that nearly fills memory.

Title: Uploading edited code for Arducopter


问:
EKF-SLAM Update step, Kalman Gain becomes singular
I'm using an EKF for SLAM and I'm having some problem with the update step.  I'm getting a warning that K is singular, rcond evaluates to near eps or NaN. I think I've traced the problem to the inversion of Z.  Is there a way to calculate the Kalman Gain without inverting the last term?

I'm not 100% positive this is the cause of the problem, so I've also put my entire code here.  The main entry point is slam2d.

```<code>function [ x, P ] = expectation( x, P, lmk_idx, observation)
    % expectation
    r_idx = [1;2;3];
    rl = [r_idx; lmk_idx];

    [e, E_r, E_l] = project(x(r), x(lmk_idx));
    E_rl = [E_r E_l];
    E = E_rl * P(rl,rl) * E_rl';

    % innovation
    z = observation - e;
    Z = E;

    % Kalman gain
    K = P(:, rl) * E_rl' * Z^-1;

    % update
    x = x + K * z;
    P = P - K * Z * K';
end

function [y, Y_r, Y_p] = project(r, p)
    [p_r, PR_r, PR_p] = toFrame2D(r, p);
    [y, Y_pr]   = scan(p_r);
    Y_r = Y_pr * PR_r;
    Y_p = Y_pr * PR_p;
end

function [p_r, PR_r, PR_p] = toFrame2D(r , p)
    t = r(1:2);
    a = r(3);
    R = [cos(a) -sin(a) ; sin(a) cos(a)];
    p_r = R' * (p - t);
    px = p(1);
    py = p(2);
    x = t(1);
    y = t(2);
    PR_r = [...
        [ -cos(a), -sin(a),   cos(a)*(py - y) - sin(a)*(px - x)]
        [  sin(a), -cos(a), - cos(a)*(px - x) - sin(a)*(py - y)]];
    PR_p = R';
end

function [y, Y_x] = scan(x)
    px = x(1);
    py = x(2);
    d = sqrt(px^2 + py^2);
    a = atan2(py, px);
    y = [d;a];
    Y_x =[...
    [     px/(px^2 + py^2)^(1/2), py/(px^2 + py^2)^(1/2)]
    [ -py/(px^2*(py^2/px^2 + 1)), 1/(px*(py^2/px^2 + 1))]];
end
</code>```

Edits:
project(x(r), x(lmk)) should have been project(x(r), x(lmk_idx)) and is now corrected above.

K goes singular after a little while, but not immediately.  I think it's around 20 seconds or so.  I'll try the changes @josh suggested when I get home tonight and post the results.

Update 1:

My simulation first observes 2 landmarks, so K is $7\ x\ 2$.  (P(rl,rl) * E_rl') * inv( Z ) results in a $5\ x\ 2$ matrix, so it can't be added to x in the next line.

K becomes singular after 4.82 seconds, with measurements at 50Hz (241 steps).  Following the advice here, I tried K = (P(:, rl) * E_rl')/Z which results in 250 steps before a warning about K being singular is produced.

This tells me the problem isn't with matrix inversion, but it's somewhere else that's causing the problem.

Update 2

My main loop is (with a robot object to store x,P and landmark pointers):

```<code>for t = 0:sample_time:max_time
    P = robot.P;
    x = robot.x;
    lmks = robot.lmks;
    mapspace = robot.mapspace;

    u = robot.control(t);
    m = robot.measure(t);

    % Added to show eigenvalues at each step
    [val, vec] = eig(P);
    disp('***')
    disp(val)

    %%% Motion/Prediction
    [x, P] = predict(x, P, u, dt);

    %%% Correction
    lids = intersect(m(1,:), lmks(1,:));  % find all observed landmarks
    lids_new = setdiff(m(1,:), lmks(1,:));
    for lid = lids
        % expectation
        idx = find (lmks(1,:) == lid, 1);
        lmk = lmks(2:3, idx);
        mid = m(1,:) == lid;
        yi = m(2:3, mid);

        [x, P] = expectation(x, P, lmk, yi);
    end  %end correction

    %%% New Landmarks

    for id = 1:length(lids_new)
    % if id ~= 0
        lid = lids_new(id);
        lmk = find(lmks(1,:)==false, 1);
        s = find(mapspace, 2);
        if ~isempty(s)
            mapspace(s) = 0;
            lmks(:,lmk) = [lid; s'];
            yi = m(2:3,m(1,:) == lid);

            [x(s), L_r, L_y] = backProject(x(r), yi);

            P(s,:) = L_r * P(r,:);
            P(:,s) = [P(s,:)'; eye(2)];
            P(s,s) = L_r * P(r,r) * L_r';
        end
    end  % end new landmarks

    %%% Save State
    robot.save_state(x, P, mapspace, lmks)
    end
end
</code>```

At the end of this loop, I save x and P back to the robot, so I believe I'm propagating the covariance through each iteration.

More edits
The (hopefully) correct eigenvalues are now here. There are a number of eigenvalues that are negative. Although their magnitude is never very large, $10^{-2}$ at most, it happens on the iteration immediately after the first landmark is observed and added to the map (in the "new landmarks" section of the main loop).

答:
If you are only updating the covariance sub-matrix associated with the robot and landmark (as is typical), then K and P should be $(N_r + N_l)\times(N_r + N_l)$ for robot state size $N_r$ and landmark size $N_l$. Note that you have:

K = P(:, rl) * E_rl' * Z^-1

which I think should be

(P(rl,rl) * E_rl') * inv(Z).

(see: matrix division).
Check the size of K.

Also:
Please provide a little more information: Does K go singular immediately or only after some time?

This worries me: project(x(r), x(lmk)); since lmk is not defined.


问:
Issues upgrading Arduino code for Kinect controlled arm from 2 servos to 4
I have arduino code for operating 2 servos, but we are using 4 servos and am having trouble getting the other 2 to talk.

The program so far as I can make out is that the angles for the servos that are calculated by the processing side are being sent out one after the other (shoulder, elbow, wrist, wrist2) then repeated. The arduino program gets this data and stores in into an array and then is written to the pin of the appropriate array segment. So 0 is shoulder, 1 is elbow, 2 is wrist and 3 is wirst2.

I can easily get 2 servos to run with no problem.  But when I try and add 1 or 2 more we get no response.  Can anyone please help me to get the other 2 servos to work?  My knowledge on this code is rather limited, so any help is appreciated.

processing Data being sent to the arduino:

```<code>byte out[] = new byte[4];
out[0] = byte(shoulderAngle);
out[1] = byte(elbowAngle);
out[2] = byte(wristAngle);
out[3] = byte(wrist2Angle);
port.write(out);
</code>```

Arduino Code:

```<code>#include <Servo.h>

//Declares the servos.
Servo shoulder;
Servo elbow;
Servo wrist;
Servo wrist2;

//Setup servo positions.
int nextServo = 0;
int servoAngles[] = {0, 0};

//Define pins for each servo.
void setup()
  {
  shoulder.attach(50);
  elbow.attach(51);
  wrist.attach(52);
  wrist2.attach(53);

  Serial.begin(9600);
}

void loop()
{
  if(Serial.available())
  {
    int servoAngle = Serial.read();

    servoAngles[nextServo] = servoAngle;
    nextServo++;

    if(nextServo > 3)
    {
      nextServo = 0;
    }

    shoulder.write(servoAngles[0]);
    elbow.write(servoAngles[1]);
    wrist.write(servoAngles[2]);
    wrist2.write(servoAngles[3]);
  }
}
</code>```

Sorry for the lengthy post but have been stuck for a while.

答:
I don't understand the purpose of the array?  Why do you need to store the angle values?

Why not just to this?

elbow.write(Serial.read());

That said the over all design has a big problem.  It is very easy to get out of sync if a byte is dropped.  Better to write out six byte blocks with the first two bytes of each block being a unique sync word.  Use some impossible value like x00ff.   Then you wait for a sync word and then read the next four bytes.

The other more complex but better method is to have a checksum at the end of the block, verify the block is correct and only then write out the angles.   Using both a sync word AND a checksum makes it nearly bomb proof.  A written you data can have errors and you would never be able to know.


问:
Robot docking for self-recharging
I want to build a simple obstacle avoider robot, but this time I want it to be self-recharging so I am building a dock for this purpose, so I want it to be able to locate the dock and go for it when battery voltage is lower than a fixed value.

I am having trouble to chose the right components for locating the dock, I think I am going to use an IR emitter on the dock so the robot can head toward it when battery is low (let's forget about the orientation problem for the moment, but if you have any thoughts about it that will be helpful) but I am not sure if the robot is able to detect the IR LED (or whatever) from a long distance (over 10 meter)

Is it possible to use this solution for this distance? If not, what do you suggest?

(If there is a simple ready solution to buy that's ok, let's say I have no budget limit)

答:
You can detect an IR LED from quite some distance.  This is how TV remote controls work.  A tiny battery operated LED can send data even when not aimed directly at the TV.  The trick is to modulate the LED with some high frequency then the receiver uses an analog filter to pass only that frequency.  This filters out room light (which is close to DC.)

Homing in on an IR LE is just like those line following robots.  You have a row of IR receivers each with a narrow angle of view and turn the robot so the center receiver gives the brightest signal.  This works in the easy case that the room is clear of obstacles.

I have not done this but I think a cheap video camera (web cam) would work well. A blinking IR LED would be easy to detect, then star the robot so as to keep the blinking LED centered.  But you'd need a computer able to run openCV or the like.  An Arduino could handle a row of IR phototransistors but not a camera.

Title: Robot docking for self-recharging


问:
Lifting Robot To Lift Small Crates
I am trying to design a robot to lift tote-crates and transport them around in a localized area. I want to be able to carry 3 tote-creates at a time.  This robot needs to be able to pickup the creates. I only want the robot to carry three at a time so keep is small and mobile. I was thinking of a design with a central lift that could carry the crates. What would you suggest as a simple ingenious way to create this robot? </p>

答:
The simplest way?  Every crate has its own wheels and motor.  In other words one robot  per crate.  I bet that in some cases this is lower cost.  It certainly lowest the design complexity.

The other design is a "travel lift".  These are used on boat and lumber yards.  You would build a smaller version.  It is the shape of an inverted "U" with four wheels. It looks like an overhead crane, the kind the runs on an overhead I-bean track but the I beam is on wheels.  Then you place three lifts on you mobile I-beam track.  The robot could stores three crates, if the I-beam where longer it could store more.

You crate ned a handle that a lift can capture.  A magnet might help to initially align the parts and then close a mechanical latch.

like the one robot per crate idea as being fool proof simple.

Title: Lifting Robot To Lift Small Crates


问:
How do self driving cars really work?
I'm absolutely fascinated by the notion of a driverless car.  I know there is a lot involved with it and there are many different approaches to the problem.

To narrow the scope of this question to something reasonable for the SE network, i'm curious to know if there is a common sequence of subproblems that every driverless car needs to solve at each timestep to make an autonomous car possible for real life, point to point transportation possible.  I imagine that once the starting point and target destination on a given map are set, a self driving follows an algorithm that loops through certain operations to solve certain problems along the way.  I'm more interested in knowing what those problems are specifically at a high level, rather than detailed algorithms to solve them.  Do all self driving cars solve the same subproblems along the way?

答:
The basic algorithm is called "SLAM".  If you google "SLAM Algorithm" you will get about a million hits.

It can NOT depend on a stored map.  That can't work because the most important objects are not the roads and intersections but the OTHER cars and pedestrians and that box the just fell of the truck and the traffic cones that close off a lane.  In fact MOST things the car has to deal with are very transient.

The other thing that SLAM does in localize the car.  It has to continuously solve the "where am I?" question by looking around.   GPS can give an absolute position but a car want RELATIVE location, like "I am 16 inches from the curb." so it needs to be able to see the curb.

A conventional map is good only for high level route planning.  Same with GPS, it is only good for high level thinking.  To actually drive you have to scan the environment and make a "map" of all the moving and non-moving objects in real time.   Again notice the most important things on your map are MOVING OBJECTS.

Title: How do self driving cars really work?


答:
I find it quite astonishing that I was actually pondering on this particular type of matter regarding bipedal robots, or more specifically humanoids, very recently.

Humanoids, given that their physical structure extensively resembles that of a human, are more suitable in operating in environments where humans would normally operate in.  This alone has the potential to alleviate the tasks that would otherwise seem redundant and repetitive but also situations where it would be too dangerous for humans to work in.

Intrinsically, our environment is filled with objects that have been specifically designed for us to interact with. Whether it's the faucet in your sink, the knob at the door or the hand-drill, all these items have been designed for us to easily manipulate.  Ideally if we want robots to operate in such an environment and utilize our tools, the robot would have to be built in a way that would allow it to accomplish such a feat in an efficient manner.  Consequently the most viable robot that can satisfy these stipulations are humanoids.

Title: Why Make Bipedal Robots?


问:
Public dataset for monocular visual odometry
I am planning to develop a monocular visual odometry system. Is there any indoor dataset available to the public, along with the ground truth, on which I can test my approach?

Note: I am already aware of the KITTI Vision Benchmark Suite which provides stereo data for outdoor vehicles.

If anyone has access to the datasets used in the following paper [SVO14], it would be even more great: http://rpg.ifi.uzh.ch/docs/ICRA14_Forster.pdf

答: I am not sure if there are monocular odometry datasets there, (I think it is mostly for standard 2D laser based SLAM), but you should check out radish.</p>


答:
I found a monocular dataset captured from a Micro Aerial Vehicle (MAV), and it has been been made available here:
http://projects.asl.ethz.ch/sfly/org/doku.php?id=mav%20datasets

In case the url stops worksing in the future, I am adding the name of the publication that came along with this dataset:
"A Benchmarking Tool for MAV Visual Pose Estimation"
Int. Conf. Control, Automation, Robotics and Vision
Singapore, 7-10th December 2010

Title: Public dataset for monocular visual odometry

Body:
I am planning to develop a monocular visual odometry system. Is there any indoor dataset available to the public, along with the ground truth, on which I can test my approach?

Note: I am already aware of the KITTI Vision Benchmark Suite which provides stereo data for outdoor vehicles.

If anyone has access to the datasets used in the following paper [SVO14], it would be even more great: http://rpg.ifi.uzh.ch/docs/ICRA14_Forster.pdf


问:
Code control your arduino with keyboard
I've seen lots of examples on how to communicate from Arduino to the computer, but the few that talked about computer to Arduino communications were very hard to understand.

My question is: What code can I use to control my arduino Uno with my keyboard

if it helps, I'm trying to set up a WASD steering behavior.

答:
http://playground.arduino.cc/Main/PS2Keyboard

The extended version http://playground.arduino.cc/Main/PS2KeyboardExt2

This example will show you how to read data from keyboard.The library will let you process keys in real time.From there simple if statement can be used to get the desired effect.I hope that the links will answer any other questions you have.

I hope I have helped but,these question will be better answered in the arduino section vs the robotics section.Comment for any clarification needed.

Title: Code control your arduino with keyboard


问:
Where is the function _MAV_RETURN_ defined?
I'm trying to understand the source code of ArduPlane. The MAVLink message is decoded using a set of _MAV_RETURN_???? functions, e.g. _MAV_RETURN_float

When I grep recursively for _MAV_RETURN_float, I could not find where it is defined. I wonder if I'm missing anything.

UPDATE

Here is the source code of Ardupilot, including ArduPlane.

https://github.com/diydrones/ardupilot

答:
Macros(_MAV_RETURN_??) for uin8_t, int8_t and char are defined at https://github.com/diydrones/ardupilot/blob/master/libraries/GCS_MAVLink/include/mavlink/v1.0/protocol.h#L236 onwoards.

However for datatype with more that 8 bits, they have written inline function _MAV_RETURN_## using 'Token Pasting Operator' which handles rest 16bit, 32bit and 64bit datatypes handled by mavlink including float. This function is written at https://github.com/diydrones/ardupilot/blob/master/libraries/GCS_MAVLink/include/mavlink/v1.0/protocol.h#L242 onwards

You an read more about Token Pasting Operator (##) in following links
https://stackoverflow.com/questions/216875/in-macros
https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html#Concatenation


问:
Questions on gears for a robot actuator
I have some questions regarding building a gearbox for a motor to create a robot actuator. Given my desired motor and loads, I've determined that a gear ratio in the 400-700 range is adequate for my application.

Here is my motor choice for reference: http://www.robotshop.com/ca/en/banebots-rs-550-motor-12v-19300rpm.html

Here are my questions:

1) Mounting gears to a motor: if I have a motor with a shaft diameter of 0.12in (3.2mm), what size gear bore should I use, and how do I attach a gear to the shaft in practice? I'm not that mechanically inclined (yet).

2) Say I build a gearbox of ratio 625:1, as such: https://www.youtube.com/watch?v=lF-4qVBWy88 I have no idea of how "durable" such a set up would be. For my application, I am looking at moving an 8kg mass from 0.6 meters away, coming out to a total torque of 47 newton meters. How can I tell if the gears will break or not?

For reference, these are the gears I'm looking at (and I'm pretty sure they're the same ones in the video): http://www.vexrobotics.com/276-2169.html

3) Assuming those gears above were to fail, what type of gear material would be recommended for my load application of max 47nm?

4) What efficiencies can one expect from gears of different types? I've been assuming 50% conservatively as another answer mentioned.

Thank you for any help, and please let me know if anything was unclear.

答:
This is not directly answering all your questions, but if you are starting out with mechanical stuff I highly recommend reading pretty much all this guy's web site.

http://www.etotheipiplusone.net/

In particular, take a look at his battle robot stuff. There is some gold in there!
If you want a more condensed version, he wrote another great article on building stuff fast and on the cheap. It's on Instructables, but don't hold that against it...

http://www.instructables.com/id/How-to-Build-your-Everything-Really-Really-Fast/

Also, there is some more great stuff in here:

http://web.mit.edu/2.75/fundamentals/FUNdaMENTALS.html

Title: Questions on gears for a robot actuator


问:
Linear or Switching Power Supply for a Embedded Project
Power Block Designing noob here.

I have a beaglebone 2x XbeePro(s) and another 500mAh device connected to the board i am building a PCB Around.

I need some advice on weather to use Linear Voltage Regulation vs Switching mode regulation.

Secondly if i am using linear voltage regulation setup do I need multiple regulators for the different devices?

My plan is to use A 2S 1000mAh Battery -> Fuse -> 2x 1.5A LM1084's in parallel output feed to the beaglebone and a LM3940 for both the XBees. Or its better to have each XBee on its on LM3940 drawing power from a seperate LM1084?

Linear Regulators tend to get hot on full load, hows the performance of Switching mode regulators ?

答:
A linear regulator has a major drawback: it dissipates the power it doesn't deliver. Using the well-known 7805, the output voltage is 5V, your input shall be at least 7V to allow a good regulation (2V dropout voltage), if your load requires 1A, your 7805 dissipates 1A * 2V = 2W. This makes your Linear regulator hot. The best efficiency you may expect from a 7805 is 70% (and, to the best of my knowledge, a linear regulator doesn't exceed 80%).

Switching regulators are non linear. For a switching regulator, 80% is a poor efficiency (but sometimes acceptable for very cheap designs), power efficiency is usually around 90% under full charge, and may come up to 99% when large amounts of energy are involved, with an expensive design. For little loads, efficiency may drop to 60%, due to the power consumption of the regulator itself.

So, in my opinion, you should use switching regulator, for a better power efficiency and lower heat dissipation. If you need a single voltage, try to use only one regulator: it's cheaper, and avoid the little load situation. If you want to design a low power application, you'll probably have to choose a more sophisticated design, but it's probably not the case, as you use a beaglebone, which prevents you to manage each processor power supply independently.


问:
What was the earliest concept of a robot?
I'm a highschool student studying electronics and for an assessment task on the history of electronics I have decided to focus on the history of robotics. I want to begin with the earliest possible concept of a robot and progress through major developments in robotics to the current day. Where should I begin my research?</p>

答: If I recall correctly Leonardo da Vinci is credited with the earliest design of a robot. My personal favorite is generally referred to as Leonardo's robot. However some accounts place Leonardo's cart as having come first and is generally considered a robot because it could be "reprogrammed" by replacing its cogs.</p>


问:
How computationally powerful is an Arduino Uno board?
What can an Arduino board such as the Uno really do? Of course simple things like controlling a couple servos is very easy for it. However, I don't think an Uno board would be able to preform real-time 3D SLAM from point cloud data gathered from a Kinect sensor on a mobile robot, right? If the robot had any speed at all the Arduino wouldn't be able to keep up, correct? Could it do 2D SLAM while moving and be able to keep up? What about taking 1/10 of the points from the Kinect sensor and processing only those?

Basically, what are some examples of the resource limitations of such an Arduino board?

答:
It depends - on the number of landmarks in the feature map, and how much time you're willing to invest tuning the algorithm for speed, and a number other parameters which you may or may not be able to control for a given application.

Edit: As a thought experiment, I think it would theoretically be powerful enough to do extremely simple near-real-time SLAM in a very contrived environment, such as the center of a gym floor with a few cones set out.  It could take a single scan line from the Kinect and update a low-resolution, 2D internal map, updating periodically (say every 10 seconds).

The Uno's 2K RAM would probably be a deal breaker, but the Mega might have enough (8K) and there is hack for upgrading it to 520K.

In practice, doing floating point matrix calculations on an 8-bit processor is not a good idea.


答: If you are interested in real and fictional robots (for concepts), the CMU Robot Hall of Fame may be useful.</p>

Title: What was the earliest concept of a robot?

Body: I'm a highschool student studying electronics and for an assessment task on the history of electronics I have decided to focus on the history of robotics. I want to begin with the earliest possible concept of a robot and progress through major developments in robotics to the current day. Where should I begin my research?</p>


答:
The raw specs on the Arduino's microcontrollers list clock speeds as high as 16 or 20 MHz -- around the speed of an mid-1990s Intel 386 computer.

That sounds promising, until you consider the fact that it doesn't natively support floating point math -- the "FLOPS" measurement by which most CPUs are compared.  I've seen some arduino demos that calculate the speed of the Arduino at about 60 kFLOPS, whereas the Intel 386 at 20 MHz does something like 170 kFLOPS (according to this page).

Also, it should be noted that the Arduino does 8-bit math and the 386 is doing 16-bit and 32-bit math.  A DSP board might be more suited to that kind of data acquisition, but I'm in no position to advise there.

Getting that code to work in such a constrained environment as the Arduino might be possible, but it will take a lot of optimization.  You'd be better served by using a more powerful CPU to implement those algorithms; make sure that they work on the powerful CPU, then attempt to optimize for the weak CPU.

Title: How computationally powerful is an Arduino Uno board?

Body:
What can an Arduino board such as the Uno really do? Of course simple things like controlling a couple servos is very easy for it. However, I don't think an Uno board would be able to preform real-time 3D SLAM from point cloud data gathered from a Kinect sensor on a mobile robot, right? If the robot had any speed at all the Arduino wouldn't be able to keep up, correct? Could it do 2D SLAM while moving and be able to keep up? What about taking 1/10 of the points from the Kinect sensor and processing only those?

Basically, what are some examples of the resource limitations of such an Arduino board?


问:
Starting out advice on making robots and tinkering with microcontrollers
I'd like to start making robots and tinkering with microcontrollers. Where do I start, and what do I need?

I'd like to make my own robots. I'm comfortable with programming (assembly and C) so I've got that part covered, but my electronics/circuits knowledge is a little weak. I have no idea what material to start with and which tools I need, nor how to put stuff together.

For the microcontroller, I'm thinking about going with the Pololu Orangutan LV-168 or the Arduino Duemilanove, although I'm leaning more towards the Orangutan because of the built-in LCD and pushbuttons (which I would expect to use, especially for debugging and user interaction). Am I on the right track? It seems to me like the number of I/O ports is small, but is that the case in practice?

答:
It sounds like your enthusiasm is in the right place, but I think you're trying to make intelligent design decisions without knowing what you're designing.  This is good!  These are all things to be worried about when designing a robot, whether as big as your shoe or as big as your car.  But they aren't what you should be worried about right now.

In your situation, I'd choose a robotics kit that's based on an Arduino.  That will give you a good starting place in terms of seeing how other people solve the problems of materials, motors, etc.  The Arduino has a huge user base and is pretty simple to program and re-program.  You can always add your own hardware and software to a kit, to make it do the things you want -- keep pushing the envelope.  Also, get some electronic kits (non-robotic kits are perfectly fine); they will teach you a bit about electronics and circuits that would be less fun to learn from a book.

Make as many mistakes as you can.   There are no right answers or silver bullets when it comes to building robots... It's an iterative process that comes with bursts of inspiration.  If you run out of I/O ports on the Arduino, start looking for another microcontroller board that has more of them.  If you find you need more user interaction (LCD, buttons, etc), get a board that supports that.

Just don't try to solve all the problems before you take your first step.


问:
Rainbowduino 3.0 - Arduino IDE fails to upload
OK, not really robotics, but has anyone been able to upload to a Rainboduino v3.0 using the Arduino IDE? I can't seem to figure it out, and there is virutally no documentation online. I followed this blog entry, but got no connection to the board. </p>

<p>If anyone can give me some suggestions, I would appreciate it! </p>

答:
It looks like the Rainbowduino 3.0 uses an ATmega328, so first be sure to choose a board that's using that.

If that doesn't solve the problem, try looking at this wiki article about the Rainboduino v3.0.


问:
Wheels vs Continuous Tracks (Tank Treads)
I'm building a small robot using some cheap Vex Robotics tank treads. However, my choice of picking tank treads is almost purely based on the fact that they seem like more fun than wheels. I don't actually know if they really have much of an advantage or disadvantage when compared to wheels.

What are the pros and cons of both wheels and continuous tracks?

答:
Well, you generally use wheels when:

You want speed. Treads need a lot more torque to power, thus you generally use low-rpm/high torque motors.

You want maneuverability: Treads are a big pain to turn with. Differential steering is very ineffective (the bot skids to steer, which may not work if you have really grippy treads)

But, treads are better when:

You want to move on uneven terrain: Wheels get stuck in potholes/bumps, treads don't.

You want traction: Treads in general are way grippier than wheels--climbing an incline is easier and you have less skids.

You don't want the bot to be affected by pushing/gravity: A wheeled bot is easily pushed around (and, as mentioned, can skid on inclines). Bots with treads are hard to push and they don't skid.