问:
Guidelines for a "stopwatch based" craft
I'm a swimmer and would like to create a small object that would help me folow my trainning plannification.

In other words I want to create a custum stopwatch, with 5 colored led that will be on or off according to the trainning program.

This is my training:

0:00 to 5:00 : Low Effort (Green light)

5:00 to 15:00 : Medium Effort (Yellow light)

15:00 to 20:00 : High Effort (Orange Light)

20:00 to 25:00 : Medium Effort (Yellow light)

25:00 to 26:00 : Maximum Effort (Red light)

26:00 to 30:00 :  Low Effort (Green light)

30:00 Trainning done (Should turn off automaticaly.)

The whole thing must be waterproof.
Must work on battery.

I'm asking for some guidelines, I'm not asking for a complete patent(would be appreciated though) but the main idea how to do it. So I can avoid wasting my time on research and tests.

I don't want to spend too much time on the project less than 100 hours maybe. I have studied in computer science and I have most of the materials I'll need. I can buy what is missing.

I'm a little bit noob on this kind of project, I want to know how you do it.

Thanks for help.

答:
That should be doable and is not that hard. I suggest a small arduino (e.g. Adafruit Trinket), an (RGB LED), a small coin cell and a button. The coding is trivial. You attach this components to a replacement watchstrap so that you can wear it on the wrist. You can activate the system with the button and show your lights. Making it watertight is not that easy, I'd start with transparent heat shrink tube after fixing everything in epoxy. The battery should last some time, replacing it will be a bit tricky.  </p>

<p>Update: You could even get rid of the button if you let two metal parts stick out so that they are connected electrically by the water. </p>

Body:
That should be doable and is not that hard. I suggest a small arduino (e.g. Adafruit Trinket), an (RGB LED), a small coin cell and a button. The coding is trivial. You attach this components to a replacement watchstrap so that you can wear it on the wrist. You can activate the system with the button and show your lights. Making it watertight is not that easy, I'd start with transparent heat shrink tube after fixing everything in epoxy. The battery should last some time, replacing it will be a bit tricky.

Update: You could even get rid of the button if you let two metal parts stick out so that they are connected electrically by the water.


问:
Why is it so hard to walk?
At least, on two legs. Asimo, one of the best known humanoid robots, is already capable to walk, although it doesn't seem to do this very stable. And it is a recent result.

As far I know, the legs are essentially many-dimensional non-linear systems, the theory of their control is somewhere in the border of the "very hard" and the "impossible".

But, for example, the airplanes are similarly many-dimensional and non-linear, despite that, autopilots are controlling them enough well some decades ago. They are enough trusted to confide the lives of hundreds of living humans to them.

What is the essential difference, what makes the walking so hard, while the airplane controlling so easy?

答:
Firstly, you have to take into account the all powerful symbol: $

Research is always at odds with $, and it's notoriously difficult to get all the funding you'd want. Meanwhile, the airplane industry is pulling a profit of 33$ B-b-b-billllllllion in 2016. That's a lot of money to work with, and plenty of reason to give it to people who can make automated systems for worst-case scenarios like pilot incapacitation, etc.

There's also time. Many more years and people have been spent working on airplanes and perfecting their singular goal of making people move through the sky.

Academically, it's a different problem set. Airplanes, as noted, have been an ongoing area of development for (relative to walking machines) a very long time. Everything from landing gear to thrust control to aileron manipulation have been worked on extensively and modularly improved; it is thus not a 'from-scratch' process to automate these procedures.

Walking, however, is perhaps a more complicated task. Firstly, there is balancing. The human body took millions upon millions of years to engineer, and we have all the proper mechanics under the skin to turn our ankle this way or that, etc. Replicating these mechanics is difficult enough, but teaching a robot to (on the proper timescale) understand and react to balance is hard. Then we add on the issue of terrain. Walking up a few stairs or a rocky hill, balancing yourself just got a lot harder. And in walking, you lift a leg, let yourself basically fall a few inches forward, and then catch yourself, immediately balancing, grasping a foothold, and already lifting your other foot.

That being said, I think you might be missing a few cool advancements in the robotic-walking sector, and you might be intrigued by THIS Boston Dynamics video.

A few minutes in, and you will surely see the scale of the mechanical and technological feat this is.

OwnerDisplayName: peterh

ContentLicense: CC BY-SA 3.0

Title: Why is it so hard to walk?

OwnerDisplayName: Avik Mohan


问:
Self learning maze solving robot using 8bit microcontroller?
I want to know if there is best algorithm and technique to implement self learning maze solving robot in 8 bit limited resource micro-controller? I was looking for some well optimized algorithm and/or technique. Maze can be of any type. Of-course first time it has to walk all the way and keep tracking obstacles it found.

I think best technique would be neural networks but is it possible to do this in such a short resources of 8bit? Any example online with similar kind of problem?

My wall detection is based on units, well, I have counted the wheel turns and it is almost 95% accurate in integers. For sensing the walls Ultrasonic range finding is used. Wheel can remeber its current position in let say, 3 feet staight, 2 feet right, etc.

答:
Perhaps the best way to get started on this kind of problem is to take relevant coursework(either online or in real life) or to read an introductory book on this topic.

A good introductory book on motion planning and SLAM is Principles of Robotic Motion.

A good course on SLAM/Mobile Robots: Control of Mobile Robots


问:
How to get started on making a dispenser for Indian spices?
I want to make a dispenser system for Indian spices.

Dispense in multiple of teaspoons (5 ml)

Handle powdered spices and small seeds like mustard/cumin

I ordered a spice carousel from amazon and was hoping I'll be able to add an actuator to it, but it needs a lot of force to click the dial.

I'm wondering that I would need something similar to sugar dispensers in coffee machines. To start with I want to design individual units, but eventually want to make a solution that can dispense 6 different spices.

I'll appreciate if anyone gives any idea on how to get started on this, thanks in advance!

答: You should have a look at small screw conveyors. Either experimentally find out how much you have to turn for your spices or make a feedback loop with a scale. </p>


答:
Dynamic walking

The reason why biped walking is more difficult is because lifelike physics-simulation like box2d, havok etc are a relativ new concept in computerhistory. The first widelyknown game which utilized a physics engine was Angry Birds (2009). Later came the QWOP simulator and others.

The first research was done on MIT Lab under Marc Raibert. He not only build the one-leg robot, but also created a computeranimation which fullfill the requirements of SIGGRAPH 1991. Later, Boston Dynamics also first developed a physics simulation inside new algorithm were tested. The first game-engine for the consumer market which supported walking-characters was NaturalMotion Euphoria which was programmed around the year 2000. The time before, the computerhardware was not fast enough to simulate physics in realtime. A biped controller on top of a physics-engine can only be invented if the simulation works reasonable fast.

Autopilots in airplanes

It is simply wrong that autopilots for airplanes exists or that they are capable for landing a Boeing A380. Even current military drones like X-47B need a human-in-the-loop for landing (Lessons learned during developmental test of the x-47b aircraft, page 21 "Mission operators worked directly with coders to develop / validate plan"). Only in steam-punk universe, autonomous airplanes are available and works reasonable well.

Title: Why is it so hard to walk?

Body:
At least, on two legs. Asimo, one of the best known humanoid robots, is already capable to walk, although it doesn't seem to do this very stable. And it is a recent result.

As far I know, the legs are essentially many-dimensional non-linear systems, the theory of their control is somewhere in the border of the "very hard" and the "impossible".

But, for example, the airplanes are similarly many-dimensional and non-linear, despite that, autopilots are controlling them enough well some decades ago. They are enough trusted to confide the lives of hundreds of living humans to them.

What is the essential difference, what makes the walking so hard, while the airplane controlling so easy?


答:
I'm not sure I agree that bipedal walking is so much harder that airplane control. It depends on how you look at it.

Many robots can walk (bipedal walking) and many airplanes are difficult to control because of their flight characteristics or the flight conditions. It is easier for robots to walk in nice conditions. There are many weather conditions too difficult for many airplanes to be controlled in. Occasionally some of those airplanes with hundreds of people in them crash because of this.

But let's focus on what makes bipedal locomotion in robots hard, and why walking robots are not in everyone's home since I think that is your real question.

Walking requires understanding and reacting to how the environment and gravity will apply forces to, and move, your body. Most walking robots measure the orientation of all their parts and have an inertial sensor (like your inner ear) that tells them how they are oriented with gravity, and so they can predict (and control) the influence of gravity on their motion.

Understanding how the environment will apply forces to you is more difficult. Walking on a hard, smooth surface is easy because you can make assumptions about what the contact between the foot and floor is like, and what the friction between them is. Many walking robots will have a force-torque sensor at the ankle to help measure these contacts. Some will have contact sensors in the sole of the foot.

If you try to walk on an irregular or unstable surface, it becomes a lot more difficult. You can no longer make assumptions, but instead have to estimate in real time what the friction of the contact is. This is difficult to do without the right sensors, and if the robot was designed with a bunch of assumptions about the walking environment in mind, it will have a hard time in a different environment. If you estimate the friction and foot support wrong, the robot slips and falls.

That's foot contact... but of course, when we navigate through an environment we use our hands for stability, we might lean against something temporarily, and we bump into things and recover from that. If you go look at the research being done in humanoid robotics, you will see that different projects have investigated (and to some degree, solved) all these problems.

Now think of the things that cause your walking to fail. A small lip that you did not see in a doorway will trip you. A step that is a different height than the others can cause you to stumble. A surface you are standing on that collapses will cause you to lose your balance. A good walking robot will have to perceive and control for all these things. So not only do we need control for walking, and control for exception recovery, but also good perception and environment models to predict where we need to change our control to a different, more appropriate approach.

The problem becomes very complex. It's not a control problem, it's a total system of perception, planning, reflex, and control that needs to be designed. Each year we make progress, but there is more progress needed in creating a system with all the sensing, sensor fusion, processing and actuation needed for good bipedal locomotion in human environments.

Why is it so hard to walk? If I had to pick one, I'd say that perception is the area that needs the most work, rather than control.

Title: Why is it so hard to walk?


问:
Save Depth Map Video
I have recently purchased an Orbbec Astra camera, which uses the same technology and produces the same style depth map as a Microsoft Kinect.

What would be the correct file format to save the depth map frames, How would I go about saving the videos recorded?

I have been able to load a stream but am not sure what format the frames should be saved in so that i can load them for testing at a later stage and still have all the same information.

I am using OpenNI2, OpenCV3.1.0 and C++.

答: If you search a bit you'll find others have all done variations on this approach.</p>

Title: Save Depth Map Video


问:
For servos, can it be implied that `Holding Torque = Operating Torque * 2` like with steppers?
I am following a guide that recommends using stepper motors and it has an approximate holding and operating torque. It says that if you don't know the operating torque, it is often half of the holding torque. I am adapting this to use with a servo and I was wondering can this same formula be used with a servo. My servo has approximately 1.98 kg/cm of torque so does that mean that I can estimate the operating torque would be ~1 kg/cm?

A couple of things:

I know operating torque and holding torque are different. This is just a estimate-it isn't an exact science.

I know servos are harder to find their location (75 degrees, etc.) than to use a stepper and assume that it worked. I have external means of finding the location.

答:
Holding torque, by the stepper motor definition, is not a valid way to quantify servo performance.  Stepper motor torque drops off with speed whereas in a servo it remains relatively constant.  (Operating torque is never half of holding torque and is RPM dependent, your guide lied to you).

A real servo will always have a torque (continuous/operating) rating under which it will remain controlled, and a maximum torque rating where it is just running full power.

I cannot imagine ever buying a servo that does not list those two values, (especially considering that most servos will have a fairly substantial datasheet) but a quick survey shows that continuous torque is generally not half of the maximum torque.

Note that hobby servo specifications are so inaccurate they might as well be made up so this question would not apply to them either.


问:
Motion primtive: machine learning vs. handcrafted
On Google Scholar there are a lot of papers which explain the advantages of motion primitive: instead of searching inside the state-space (configuration space of a robot) the solver has to search inside the plan space of motion primitives. Sometimes this concept is called lattice graph.

Even if all papers are convinced about motion primitive in general, there is room for speculation about how exactly this idea should be implemented. Two different school of thought are out there:

Machine Learning for generate motion primitive. This is based on q-learning, neural networks and motion capture. The projekt "poeticon" (Yiannis Aloimonos) is a good example.

Handcoded motion primtive. This concept is based an manual coded Finite States-Machines (FSM) which can only solve a concrete example like "pushing the box". Additional functionality has to be implemented by hand.

The question is, which concept is better on real life examples?

答:
There is probably no fixed answer to which apporach works best, it all depends on the application, not to mention who you ask.

Sometimes you have a pretty good idea of what some of the motion primitives should be. Perhaps you have some experience from remote control of the robot, or there are some constraints that limit the available motion primitives such that the solution is pretty obvious. In such cases, handcrafted motion primitives will probably work quite well. Furthermore, handcrafted motion primitives better enable theoretical analysis than ones found using machine learning. You can perhaps find some general properties of the primitives, saying that under certain assumptions you can make guarantees.

In other cases, you don't really have that amount of domain knowledge or constraints, or perhaps you want to explore different options not previously thought of. In such cases, machine learning techniques are great, and they offer a low cost of implementation as long as you have good simulation and experimentation possibilities available.

Personally, I think the best thing is to combine the two. Some motion primitives can be handcrafted, some can be machine learned, and some a little bit of both: perhaps create a draft primitive by hand, and use machine learning to refine and make it more robust.


问:
Power solution for Raspberry Pi robot
I am building a Pi car with 4 gear motors (190-250mAh each max). Now I want to use my 10000mAh USB power bank to power up raspberry pi along with the 4 gear motors.

I can power up the raspberry pi directly but I want to use my power bank as the only source of power for the Pi Car. How can I connect both my RPi and motor controller L298N to my USB power bank?

答:
I would rather use:

Two separate voltage sources with ground connected (5V PSU from powerbank + LiPo battery for engines)

or

One bigger LiPo battery with 5V regulator circuit for logic.

But if You want to use your powerbank as only energy source, yes, it is possible. However:

Take care of proper decoupling of 5V line. I mean, check datasheet of bridge you want to use, search for recommended connection schematic and use same capacitors, or at least close to them, as described.

In order to protect your Raspberry from overvoltage, use Zener diode, reverse polarized, rated at 5.3V. It should short-circuit supply voltage line at voltages exceeding its nominal value. It shouldn't happen, since your powerbank has already voltage regulator, but if you want to connect H-Bridge with it, I recommend using it.

Also, I'd recommend You to use different H-bridge, like TB6612FNG. It is capable of powering engines up to 13.5V at 1.6A per channel. It is also smaller and more energy efficient than L298N.

Title: Power solution for Raspberry Pi robot


答:
First things first. If You are studying computer science, learning embedded programming will not be waste of your time. Actually, if you are interested in mobile projects like this, I recommend you to buy ATMega microcontroller with programmer and some electronics, or STM32 Nucleo board.

About your question, I'd create a small PCB with ATMega88 in QFN package, rather than using Arduino, an RTC clock (like DS1307) and communicate them via I2C.

Two buttons would be nice - one for training start/stop, second for display (diodes won't be turned on constantly, only after pushing second button for ~5 seconds - energy saving).

Also, You could use small 7-segment display instead diodes. All these electronics powered by small, ~70mAh LiPo battery, induction charged. And closed in waterproof watch casing.

Moreover, having two buttons and display mentioned above, you could change your training profile without device disassembly.

Yeah. That would be great for swimmers personal training.

Title: Guidelines for a "stopwatch based" craft

Body:
I'm a swimmer and would like to create a small object that would help me folow my trainning plannification.

In other words I want to create a custum stopwatch, with 5 colored led that will be on or off according to the trainning program.

This is my training:

0:00 to 5:00 : Low Effort (Green light)

5:00 to 15:00 : Medium Effort (Yellow light)

15:00 to 20:00 : High Effort (Orange Light)

20:00 to 25:00 : Medium Effort (Yellow light)

25:00 to 26:00 : Maximum Effort (Red light)

26:00 to 30:00 :  Low Effort (Green light)

30:00 Trainning done (Should turn off automaticaly.)

The whole thing must be waterproof.
Must work on battery.

I'm asking for some guidelines, I'm not asking for a complete patent(would be appreciated though) but the main idea how to do it. So I can avoid wasting my time on research and tests.

I don't want to spend too much time on the project less than 100 hours maybe. I have studied in computer science and I have most of the materials I'll need. I can buy what is missing.

I'm a little bit noob on this kind of project, I want to know how you do it.

Thanks for help.


问:
Denavit Hartenberg
My problem says that for the articulated arm shown determine:

The algorithm of the end effector position in terms of q1, q2, q3, q4 and q5 with de Modified Denavit Hartenberg convention and

The coordinate of the end effector EF for the following data table.

I have already made the algorithm, can I have some help with all the matrices?
And also with the graphic forward kinematics?

答:
The DH parameterization reduces the full transform between two joints to a transform with 4 parameters. This parameterization will fit many, but not all, possible kinematics. Let's assume that your instructor did not give you an impossible problem, and that your robot kinematics can be mapped to modified DH parameters.

There are 4 parameters between each joint and thus 4 basic transforms between each joint. For kinematics, the important thing is that the transforms take you to the axis (or line) of the next joint. It does not matter where on that line you arrive. By convention we say that the Z axis of each joint coordinate system is the axis we rotate about or translate along.

Imagine the axis/line of each joint to be infinitely long and you must use only the 4 transforms in sequence (Rotation about X, Translation along X, Rotation about Z, Translation along Z) to go from anywhere on one line to anywhere on the next. So the diagram of the DH transforms will often look different than the physical diagram of the robot. For example, it would be common to use parameters from Joint 1 to Joint 2 such that the location of Joint 2 would be where lines a and d cross in your diagram.

When I do this I use my right hand held up with my thumb and first 2 fingers splayed to represent the Z, X, Y axis and move my hand through the air to help imagine the transforms. 4 transforms between each joint.

Once you figure out the sequence of motions you will be able to use your original diagram to find each of the 4 parameters, and you will be able to insert those parameters into the DH-modified matrices, and finally will be able to multiply them all together to arrive at the coordinate of the end effector.

Title: Denavit Hartenberg


问:
Estimating state of moving object from other moving object
What is the best way to estimate the state

```<code>[x-position;
y-position;
heading (yaw angle);
velocity;
acceleration;
curvature (or yaw rate)]
</code>```

of a moving leading vehicle with sensors mounted on a follower/ego vehicle?

The following measurements of the leading vehicle are obtained via radar sensors mounted on the ego vehicle.

x-y-position in the ego coordinate frame

heading in ego coordinates

relative and absolute velocity and acceleration

No information about curvature (yaw rate). This should be estimated which is possible using the lateral acceleration and longitudinal velocity.

For estimation I think of using EKF or nonlinear moving horizon estimation.

Considering that no prediction about the moving leader vehicle can be made because the control inputs are unknown. Only the measurments (update step) and the movements of the ego vehicle are available (incroporate in prediction).

What kind of model would be appropriate for the whole scenario?

just a model for the leading vehicle? (e.g. bicycle model)

just a model for the following ego vehicle?

or a combination of both vehicles?

Option 1 would be perfect in combination with a simple bicycle model if there was an outside observer who is not moving. Option 2 is not really an option because the configuration of the leader vehicle should be estimated. Option 3 seems to me the right way because of the following thoughts:

Looking from the ego coordinates: is it correct correct that a motion change of the ego vehicle will seem as if the measured locations of the leading vehicle changed? If so will I need a coordinate transformation or is it better to use a model in global coordinates, then transform the measurements (which are in ego coordinates)?. The approach using global coordinates seems counter intuitive because the final estimate should be used for the follower/ego vehicle as reference trajectory.

Can you give me a hint which coordinate frame (global or ego) to use, which model to use in the prediction step and if my thoughts on motion changes are correct?

Or do you know any sources that address this or a similar issue?

For the process model I thought of

```<code>x_k+1 = x_k + v_k * cos(heading_k)
y_k+1 = y_k + v_k * sin(heading_k)
heading_k+1 = heading_k
v_k+1 = v_k
a_k+1 = a_k
curvature_k+1 = curvature_k + a_y_k/v_x_k
</code>```

of course there should be some process noise added, especially for heading, velocity acceleration and curvature because these measurements are rather inaccurate.
For heading, velocity and acceleration I would use the previous estimates (or measurements) since no other source except the measurements from the sensors are available.
Curvature is computed using the acceleration in (global?) y-direciton and the (global?) velocity in x-direction curvature = a_y/v_x

The measurement model looks probably something like this:

```<code>y = [1 1 1 1 1 0;
     0 1 0 0 0 0;
     0 0 1 0 0 0;
     0 0 0 1 0 0;
     0 0 0 0 1 0;
     0 0 0 0 0 0]*x
</code>```

where x is the state vector [x-position; y-position; heading (yaw angle); velocity; acceleration; curvature or (yaw rate)]

The trajectory must be smooth and should be exactly like the driven path of the leader vehicle. So I think some sort of estimation will be necesseray in order to avoid following the measurements in straight lines, which would lead to an unsteady trajectory.

The mesurements of the heading, velocity and acceleration have a rather high variance depending on the situation.

答:
It sounds like you can estimate everything you need to with a direct calculation of the transform between each vehicle since that is provided for you. For the derivative parameters, if your sensors give direct measurement (velocity from doppler on the radar for instance) you probably want to use those values rather than filtering.

Without knowing more I'd be a bit wary of the heading measurement. For instance, is it a direct measurement or an estimate from the velocity info?

The EKF seems unnecessary.


问:
What algorithm should I use for a line follower?
I actively take part in robotics competitions with my school's robotics club, and all of the line followers we use, are implemented using a PID algorithm (PD actually), but recently my electronics teacher told me to get my feet wet with fuzzy logic, he explained to me the reasons for why to use fuzzy logic (a mathematical model of a robot is hard to come up with, fuzzy logic is more "human-friendly" than PID, etc.) My question is if I should really bother with fuzzy logic or stay with PID, or maybe to change to another less known but better algorithm. The tracks that the robot has to follow are regular white over black continues ones, with no weird extras or anything like that, but most of them have marks on the sides of the beginning and end of every turn, but apart from that nothing else. So should I stick with PID or change to something else? Any advice would be very helpful, thanks.</p>

答: For this task, using only PID would be adequate. However, It also depends on the response of your motors to control signals. You can also use fuzzy logic to tune the PID parameters, which are actually time consuming.</p>


问:
Prototyping a device with 25-100 small DC 3.0V motors, is Arduino a good fit?
I want to prototype a therapeutic device that will have a lot of tiny mobile-phone type vibration motors like this one in it, and I want to be able to activate them in any configuration I want.  I'm going to need analogue control, and support for logic like perlin noise functions and so on.  I'm not really going to need sensor data or any other kind of feedback beyond a few buttons for control.  I just need fine control over lots of little motors.  Depending on what results I can get out of, say, 25 motors on the initial prototype, I may decide that I'm done, or that it needs more motors.  I also don't have an enormous budget.

So the question is, is Arduino a good fit for a project like this?  Is it feasible to get that many motors working off the same controller?  I know some of the Arduino boards have up to 50-something serial outputs, but from what I can tell, that may only translate to 25 or so motors, so I'd need a way to extend the board with more serial outputs if I wanted to try more.

Additionally, if Arduino isn't a good fit, what would be better?  Could I try something directly out of a serial port on my PC?  I've never tried to home-cook a robotics application before, so I'm not really aware of the options.

答:
The issue may not be what micro is the best choice. Note 25 to 50 IO can be expensive if implemented on the micro itself. A ATmega2560 with the most pins is significantly more in price then a 328 or Tiny. Same goes for other chips. All those additional pins may not have the function you need.

You can use the micro's SPI (or I2C) port to shift out the IO. For SPI you could daisy chain as many 74HC595 as you need until you get your desired amount of Digital Output. There are equivalents for Input.

And if you wanted to control the intensity of the motor, you can use PWM. And there are SPI or I2C chips for these too.

Note a big problem will be power. If you were to connect 25 motors to a single micro the initial inrush if not the continuous load of turning on all the motors would likely brown out the micro as each IO may individually support the supply for the motor. Combined they all need to feed through the chips VCC pins. Hence breaking it up to individual 74HC595 would spread out the heat and load away from the micro. These are cheap chips and easily ported to any micro. You can even get evals of them on break out PCB's.


问:
Qi Battery Pack
I am trying to build a bot that is "always on". I will be using a qi platform and am looking for a battery that charges through Qi. I've found several batteries that can charge your phone through Qi, but I am looking for one that charges itself through Qi. Any clue where I can find one like that? As a second question, do you think such an idea would work? Any foreseeable problems?</p>

答: What you are looking for is a Qi receiver, that will allow you to transfer energy from a charging station to your robot. Charging a battery will be a separate task. Adafruit has a module capable of providing 5V and 500mA. Or you can go for a complete wireless power bank with USB output. This will also give you 5V that you can use to power up your robot.</p>

Title: Qi Battery Pack


问:
How has the Mars Exploration Rover (MER) has been working for 11 years if it was designed for 90 Sol?
The Mars Exploration Rover (MER) Opportunity landed on Mars on January 25, 2004. The rover was originally designed for a 90 Sol mission (a Sol, one Martian day, is slightly longer than an Earth day at 24 hours and 37 minutes). Its mission has been extended several times, the machine is still trekking after 11 years on the Red Planet.

How it has been working for 11 years? Can anyone explain hardware-related aspects and how smart this Rover is ?

I need to know how this rover is getting services on Mars regarding to hardware related issues?(if any hardware is not working properly, how it can be repair on the Red Planet?)

答:
There are 2 main reasons why the MER is still operating long after it's 90 Sol planned lifetime.

The first is political, strategic, and can be summarized as 'Under promise, over deliver'. When a PI (principal investigator) proposes a high-risk scientific mission like this, they always frame the goals of the project such that their project is viewed successful even when things go wrong. If you say that your project lasted 11 years and then failed, that is one framing. If you say your project lasted 10 years longer than it was designed for, that is another framing of the same information that sounds much better. You can find many NASA projects where things went very wrong but the project was still viewed as successful.

The second reason is statistical. It is difficult to truly understand the details of the quality of the components a machine is built from, and the conditions of operation that a machine will operate in. We can never know exactly how long a machine will operate before failing. But we can use prior experience and statistical calculations to get a pretty good estimate of how long a population of similar machines will operate before failure. A machine like the MER is very complex, and we apply the statistical analysis to each individual part, and all the combinations of the parts. In the end, it is likely that the design engineers actually had 90 Sol of operation as their goal. They would also have had a measure of certainty associated with that. Perhaps it was a 90% chance that the MER would last 90 Sol. Or perhaps it was 99.9%. The higher the certainty required, the more 'over design' is needed to guarantee that.

You can research the term 'design life' to understand better these hardware related aspects.


问:
Need super-basic help with motor encoder
So I have this motor: https://www.servocity.com/23-rpm-hd-premium-planetary-gear-motor-w-encoder

and this motor shield for my arduino uno:
https://www.pololu.com/docs/pdf/0J49/dual_vnh5019_motor_driver_shield.pdf

And no background in electronics to speak of. I cannot find a basic enough resource to tell me where to attach the wires, or really what they each do. The ones that are simple enough for me only deal with motors with a couple of wires. Information on motors with six wires go immediately to discussing things that are way beyond me, or at least use terms that I don't know.

So the motor has six leads, and the only info I can find on them in the documentation are this: Black (Motor -), Red (Motor +), Green (Ground), Brown (Channel B), Yellow (Channel A), and Orange (Sensor Voltage +).

I have the black and red hooked up to M1A and M1B on my shield, so I am able to turn the motor on, vary its speed and direction. I also had all the other wires hooked up to various pins mentioned in the Demo sketch associated with the shield.

I have spent a week trying to figure this out on my own, but I am not getting anywhere (except that I know that hooking up orange to almost anything triggers a fault).

So in addition to the four wires that are not connected to anything, I have these pins mentioned in the sketch that are also not connected to wires: D2 M1INA, D4 M1INB, D6 M1EN/DIAG, D9 M1PWM and A0 M1CS.

I hope someone can provide a pointer to a resource or a good, plain-language explanation for what these wires and pin descriptions mean. Thanks in advance!

servocity

答:
The "Green (Ground), Brown (Channel B), Yellow (Channel A), and Orange (Sensor Voltage +)" wires connect to the encoder on the back of the motor and allow the use of quadrature to detect the number and direction of motor turns.

As noted on servocity's page for the motor, you can count the following numbers of cycles or events per rotation of the motor or of the output shaft:

```<code>Encoder: Cycles Per Revolution (Motor Shaft)                12
Encoder: Cycles Per Revolution (Output Shaft)            4,428
Encoder: Countable Events Per Revolution (Motor Shaft)      48
Encoder: Countable Events Per Revolution (Output Shaft) 17,712
</code>```

An "event" refers to an edge, up or down, on either of the encoder channels.  A "cycle" refers to the two channels going through the four phases of one quadrature-encoder cycle.

Given the gear ratio 369:1, the motor probably spins about 8500 RPM to make 23 RPM on the output shaft.  A software-based quadrature decoder might have trouble keeping up with 6800 events per second (ie, 48*8500 = 408000 events per minute, or 1/60 as many per second) if the Arduino will be doing anything else besides quadrature decoding.  You could combine some of the code shown at an arduino.stackexchange answer with that at another arduino.stackexchange answer to see how many events per second you could count using software on an Arduino.  The 147 microseconds available per event (ie, 1000000 us / 6800 events) might or might not be enough; most likely you will need to use a hardware-based quadrature decoder and counter to track shaft location.

[Edit 3:] If the motor parameter you wish to control or measure is speed rather than position, a typical ATmega328-based Arduino board can count enough encoder events to give that information for a single motor.  For example, if using an Uno you could connect one encoder line to PD5, the T1 input pin on a '328.  With the motor running at full speed, Counter 1 would overflow about twice a second.  In its interrupt handler you would read the current value of micros, store it in a volatile variable, and set a change flag.  The interrupt handler could also add or subtract the counter value to a position total.

[Edit 2:] Regarding the wiring, it appears that you should do like the following:

```<code>Pin# Color   Function             Hook to...
3.   Green   (Ground),               common ground
4.   Brown   (Channel B),            quad. decoder input 2
5.   Yellow  (Channel A),            quad. decoder input 1
6.   Orange  (Sensor Voltage +)      V+ (eg to logic +5 or +12)
</code>```

See wikipedia's Rotary Encoder article for more discussion of quadrature encoding/decoding, along with signal diagrams, etc.

See pololu's "Using the Driver in Single-Channel Mode" page for an explanation of pins like M1INA, M1INB, M1EN, etc.

Body:
The "Green (Ground), Brown (Channel B), Yellow (Channel A), and Orange (Sensor Voltage +)" wires connect to the encoder on the back of the motor and allow the use of quadrature to detect the number and direction of motor turns.

As noted on servocity's page for the motor, you can count the following numbers of cycles or events per rotation of the motor or of the output shaft:

Encoder: Cycles Per Revolution (Motor Shaft)                12
Encoder: Cycles Per Revolution (Output Shaft)            4,428
Encoder: Countable Events Per Revolution (Motor Shaft)      48
Encoder: Countable Events Per Revolution (Output Shaft) 17,712

An "event" refers to an edge, up or down, on either of the encoder channels.  A "cycle" refers to the two channels going through the four phases of one quadrature-encoder cycle.

Given the gear ratio 369:1, the motor probably spins about 8500 RPM to make 23 RPM on the output shaft.  A software-based quadrature decoder might have trouble keeping up with 6800 events per second (ie, 48*8500 = 408000 events per minute, or 1/60 as many per second) if the Arduino will be doing anything else besides quadrature decoding.  You could combine some of the code shown at an arduino.stackexchange answer with that at another arduino.stackexchange answer to see how many events per second you could count using software on an Arduino.  The 147 microseconds available per event (ie, 1000000 us / 6800 events) might or might not be enough; most likely you will need to use a hardware-based quadrature decoder and counter to track shaft location.

[Edit 3:] If the motor parameter you wish to control or measure is speed rather than position, a typical ATmega328-based Arduino board can count enough encoder events to give that information for a single motor.  For example, if using an Uno you could connect one encoder line to PD5, the T1 input pin on a '328.  With the motor running at full speed, Counter 1 would overflow about twice a second.  In its interrupt handler you would read the current value of micros, store it in a volatile variable, and set a change flag.  The interrupt handler could also add or subtract the counter value to a position total.

[Edit 2:] Regarding the wiring, it appears that you should do like the following:

Pin# Color   Function             Hook to...
3.   Green   (Ground),               common ground
4.   Brown   (Channel B),            quad. decoder input 2
5.   Yellow  (Channel A),            quad. decoder input 1
6.   Orange  (Sensor Voltage +)      V+ (eg to logic +5 or +12)

See wikipedia's Rotary Encoder article for more discussion of quadrature encoding/decoding, along with signal diagrams, etc.

See pololu's "Using the Driver in Single-Channel Mode" page for an explanation of pins like M1INA, M1INB, M1EN, etc.

ContentLicense: CC BY-SA 4.0


问:
Servo motor eventual shake
I've been developing an inspection rover with two miniature cameras on two dual axis gimbals.  I've tried analog, digital and now brushless servos from various R/C parts makers and all of them eventually develop a flutter or shake.  I am getting ready to step up to a more expensive servo that will be almost 30X more expensive than the typical $30 R/C servos I started with.  The loads seem to be easily controlled at first but after a few weeks the shaking starts and just gets worse until I replace the servo.  I've tried two different R/C controllers and that hasn't helped and I can't seem to control by programming my Spektrum DX-9 controller.  Any suggestions?</p>

答:
It means that your servos are too weak to handle load. After some time gears and electronics usage is getting worse, so PID of servos is not set properly anymore. That causes flickering.

What exactly servos were You using? From my experience, I'd recommend Dynamixel servos, since they are strong, compact and programmable.

If you dont want to spend that much, KDS servos are also an option. They are designed for 3D helicopters, thus have great rotational speed (0,07s/60°) and are powerful.

Title: Servo motor eventual shake


问:
What are some ways to estimate torque/load on a robotic arm joint
My main problem is measuring joint torque/load economically. There are ways to detect the electric current drawn which is proportional to the torque. Since my motor is a BLDC motor, there will be a driver which drives the 3 phases and hence  the current drawn will also include losses, which would be variable. Is there a proper way to estimate the load by sensing current?

Is there any way to reliably get the torque/load on a motor joint, what are the common ways to do so without spending a ton of money on torque sensors?

Do to link me to any papers/research on this subject, if you'd want to.

I need to judge the load on the joints of a 6 dof robotic arm programmatically and detect unexpected impacts.

答:
Model Based:
Low cost solution is always software:

Develop a dynamic model which computes the load on the motors based on the motions (e.g. with Recursive Newton Euler Algorithm or Lagrange-Euler Method)

Make as simple model to handle losses in driver/motor

Make the difference between real torque and computed torque

It will be not accurate. At least 10% off based on how accurately you can build up your model. Example here.

Strain Gauges:
If you have a section on each linkage which is geometrical known (it helps if it has a regular shape like a cylinder) you can use strain gauges to measure the strain of the linkage and if the material is know and you measure it in the required directions you can calculate the load on the linkage.
The signal has to be heavily amplified so this can lead to complications when routing the signal cables next to motor cables on the robot. Tutorial here.

Optical force sensors:
They might be cheaper then classical force sensors, but the maximum load they can measure is limited. Example here.

Force-Torque sensors:
As you mentions, these are expensive. Mostly similar principle then with the strain gauges, but it is packages, so you do not have to deal with amplification, thermal drifts, interfaces, etc. Example here.


问:
Stabilizing a Drone
I have my IMU and I can get attitude (pitch, roll, yaw) as well as gyro (x, y, z)

As far as I can tell, attitude is all I need to stabilize my drone.

Is there any reason to implement gyro or will attitude suffice?

-- EDIT --

It seems the benefit of gyro is an immediate response to an outside factor effecting drone stability.

Example:
A gust of wind hits your drone. The attitude will not be quick enough combat the effects of wind. As far as I can tell, the gyro will be the best way to combat extreme wobble and outside influences such as wind / tether (leash).

-- EDIT 2 --

It's been a while since I posted this but I should add in that I ended up leveraging the infamous PID algo for my arduino.

答:
Gyro is needed to stabilize angular acceleration. Knowing only your attitude, drone doesn't know how fast on which axis is rotating, knows only where is gravity vector. Gyro gives you feedback on angular acceleration and that's what gives your drone stability.

Also, you can use only gyro in your drone, it will stabilize movement, but won't get back to horizontal flight/hovering position (depending if You are building multicopter or plane).

To fully stabilize your drone flight, you should use both gyro and attitude.

Title: Stabilizing a Drone


问:
State estimation of mobile robot
For a mobile robot - four wheels, front wheel steering - I use the following (bicycle) prediction model to estimate its state based on accurate radar measurements only. No odometry or any other input information $u_k$ is available from the mobile robot itself.

$$
\begin{bmatrix}
      x_{k+1} \\
      y_{k+1} \\
      \theta_{k+1} \\
      v_{k+1} \\
      a_{k+1} \\
      \kappa_{k+1} \\
    \end{bmatrix} =
    f_k(\vec{x}_k,u_k,\vec{\omega}_k,\Delta t) =
    \begin{bmatrix}
      x_k + v_k \Delta t \cos \theta_k \\
      y_k + v_k \Delta t \sin \theta_k \\
      \theta_k + v_k \kappa_k \Delta t \\
      v_k + a_k \Delta t \\
      a_k \\
      \kappa_k + \frac{a_{y,k}}{v_{x,k}^2}
    \end{bmatrix}
    +
    \begin{bmatrix}
      \omega_x \\
      \omega_y \\
      \omega_{\theta} \\
      \omega_v \\
      \omega_a \\
      \omega_{\kappa}
 \end{bmatrix}
$$

where $x$ and $y$ are the position, $\theta$ is the heading and $v$, $a$ are the velocity and acceleration respectively. Vector $\vec{\omega}$ is zero mean white gaussian noise and $\Delta t$ is sampling time. These mentioned state variables $\begin{bmatrix} x & y & \theta & v & a \end{bmatrix}$ are all measured although $\begin{bmatrix} \theta & v & a \end{bmatrix}$ have high variance. The only state that is not measured is curvature $\kappa$. Therfore it is computed using the measured states $\begin{bmatrix} a_{y,k} & v_{x,k}^2\end{bmatrix}$ which are the lateral acceleration and the longitudinal velocity.

My Question:

Is there a better way on predicting heading $\theta$, velocity $v$, acceleration $a$, and curvature $\kappa$?

Is it enough for $a_{k+1}$ to just assume gaussian noise $\omega_a$ and use the previous best estimate $a_k$ or is there an alternative?

For curvature $\kappa$ I also thought of using yaw rate $\dot{\theta}$ as $\kappa = \frac{\dot{\theta}}{v_x}$ but then I would have to estimate the yaw rate too.

To make my nonlinear filter model complete here is the measurement model:

$$
\begin{equation}
   \label{eq:bicycle-model-leader-vehicle-h}
   y_k = h_k(x_k,k) + v_k =
   \begin{bmatrix}
     1 & 0 & 0 & 0 & 0 & 0 \\
     0 & 1 & 0 & 0 & 0 & 0 \\
     0 & 0 & 1 & 0 & 0 & 0 \\
     0 & 0 & 0 & 1 & 0 & 0 \\
     0 & 0 & 0 & 0 & 1 & 0 \\
   \end{bmatrix}
   \begin{bmatrix}
     x_k \\
     y_k \\
     \theta_k \\
     v_k \\
     a_k \\
     \kappa_k \\
   \end{bmatrix}
   +
   \begin{bmatrix}
     v_x \\
     v_y \\
     v_{\theta} \\
     v_v \\
     v_a \\
   \end{bmatrix}
 \end{equation}
$$

More Info on the available data:

The measured state vector is already obtained/estimated using a kalman filter. What I want to achive is a smooth trajectory with the estimate $\kappa$. For this it is a requirement to use another Kalman filter or a moving horizon estimation approach.

答: Kalman filters and other state-estimation techniques are based on analog computing. In most cases differential equations are used. A better solution is based on grammar techniques aka turing-machines. A paper which is using context free grammars for state-estimation is given here. The idea in short: the measurements are interpreted as a stream of tokens like a computerlanguage  and a parser interprets the sentences. To generate such parser motion primitive are used (simple Finite-States-Machines which describes a possible movement of the robot)</p>

Title: State estimation of mobile robot


问:
Perfecting Tripod Gait - Building a R-Hex Robot
I need help with figuring out the following things:

I'm developing a hexapod R-Hex type model with a tripod gait. However, the angles obtained during the robot's walking in real life are not perfectly aligned. Because of this the robot often collapses and falls even on perfectly straight terrain.

My configuration is:

60 rpm dc motors for each leg

H-bridge motor drivers for each dc motor

Atmega 8

Should I change the gait type?

Or is Tripod sufficiently stable?

Are DC motors providing fine enough control or do I need servos?

Do I need a DC motor with an Encoder?
What will be its benefits?

What could be done to improve performance of the robot?

Added: Would a Stepper motor work as well, instead of a servo?

答:
Tripod gait is a stable gait. Moreover, it is a statically stable gait, meaning that if you lock the joints with 3 legs down and turn the power off, the robot will not topple. This implies that you don't need to dynamically balance the robot while walking.

The reason when a legged robot falls down is that its center of gravity does not fall on its support polygon (in tripod gait case, it is a triangle with each corner on one leg that's touching the ground). So what you should do is to measure the center of gravity and guarantee that it never leaves the support polygon of your robot while walking via adjusting your leg motion. Of course, this is all for a statically stable gait. Dynamically stable gaits allow the center of gravity to leave the support polygon in a controlled manner. But as I said, the tripod gait is statically stable.

I'm assuming that you are using naked DC motors without encoders or gear trains. There are two issues about this:

First, make sure that you are getting enough total torque at each leg triplet that lift the robot. It may be the case that the DC motors cannot lift the robot on their own without a gear train.

Second, errors tend to grow without bound when performing such a task, angular position errors being one example. This is simply due to noise and imperfect modeling of the motor. So in a sense, DC motors are not actually "controlled", you just apply an input while not knowing what the output is. You must apply closed loop control, which is done via getting feedback from an encoder. Then, you can sense what the angular position on your motor is, determine your error, and apply an input to correct that error.

Both of these problems are addressed in a servomotor, which is basically a DC motor, a gear train to increase torque and reduce angular velocity, and an encoder. I very much suggest using servos for your leg joints.


问:
LIDAR Points as Landmarks
I am currently trying to implement a GraphSLAM/SAM algorithm for LIDAR. From papers I've read, you generate a directed graph from expected LIDAR measurements to landmarks similar to the image below (taken from the Square Root SLAM Paper by Dellaert).

However in practice the point clouds you obtain from LIDAR are similar to this (taken from the KITTI car collected dataset):

It seems algorithms such as SIFT for 3D point clouds aren't as accurate yet. Is there a commonly used technique to efficiently find features in consecutive point clouds to find landmarks for SLAM algorithms without using >30,000 points in a point cloud?

答:
When your exteroceptive sensor is a LiDAR, the most common way to perform graph-based SLAM is to use pose-graphs. The nodes in a pose-graph - as the name implies - are all poses (no features/landmarks). Instead of matching features/landmarks between scans, you match the scans themselves using some variant of ICP (of which there are many). The output of ICP gives you the relative transformation between the poses, which is an edge in the graph.

Any two poses with enough overlap between LiDAR measurements should in theory generate an edge in your pose-graph. That means sequential poses will have them, but the key to getting an accurate map is detecting when non-sequential poses (i.e., you drove the robot in a circle and have returned to the start) have overlap in their measurements. This is called a loop closure and can substantially improve the accuracy of the estimated poses by curtailing the effects of dead-reckoning.

Once you have your accurate pose-graph, you simply generate a map with the LiDAR measurements at each pose. There are many ways to do this as well, the most common being just generating a massive point cloud, or filling in an occupancy grid.

Title: LIDAR Points as Landmarks


问:
Why are robots made to mimic humans actions? Isn't it better to make them better than Humans?
Robots can be better than humans. If we attach a wheel to a robot, it can move faster than a human with legs.

But why then is a lot of research going on to make robots look, walk and talk like humans. Wouldn't it be better to make robots better than humans and not to be limited by the human body parameters?

答:
better you say ?

That's a nice wheeled robot you have there. Can I borrow it for a day? Thanks.
Wow, it's really fast, I cannot keep up with it walking or running on the street.

Truly an amazing machine. I'd like to show it to my friends and family. They are waiting in my flat that's on the 3rd floor up the stairs...what do you mean it cannot move over stairs? It might be possible with some additional dedicated mechanics? I think you are stretching the meaning of the word "better" a little here.

So maybe your robot is not made for buildings. Let's go hiking. Uh huh? A narrow steep path with rocks and twigs is a difficult terrain for your robot to move around? Maybe we stop right here, because up in the mountains, there are some places where you have to perform jumps from one rock to another. Nothing fancy, the distance is about 1 meter, something the average adult human is easily capable of. Now I'm afraid that your robot might not be able to jump at all. Is that correct?
I would have loved to show my new "better" robot friend a hobby of mine: rope walking. Is it physically able to perform that action? If so, is it able to learn it?

Maybe that robot is more of a beach boy? Let's go! ... What a bummer! It looks like those wheels aren't working at all on sand. I cannot take the robot along. But then what would be the point in doing that anyway, I suspect that this machine can neither swim nor dive.

If we attach a wheel to a robot, it can move faster than a human with legs.

We do not need a robot for that. Any car will be better than a human for a few specific properties under very specific conditions. The human (and other animals) can adopt to many environments and perform many different motions. Even in previously unknown situations.

The only rule in this game is called survival of the fittest, not necessarily the fastest, strongest, etc.

And this is all just about motion. Let's say your robot can do all of the above, does it

weight ~100kg or less?

work without external help? (no gps, no cloud computing, ...)

have a continuous coat of sensors that allows it to detect possible environmental dangers in order to protect itself from that? What if I approach your "better" robot with a blowtorch?

have a built in energy harvesting system capable of converting various kinds of materials (food) into usable energy?

have the ability to heal (!!!) minor damages on its own?

Yeah, that RC car you got there can probably outpace a human. That makes it better in this single discipline under the suitable environmental conditions. Therefore calling it better than a human is a conclusion that I do not agree with.

a matter of compatibility

But why then is a lot of research going on to make robots look, walk and talk like humans.

Because that's the interface that we have to our world. If you build a self driving car, you could easily come up with some electronic radio system to tell the car what road signs there are. But that means that you have to put this new system in place in parallel to the existing road signs.
You'd have to duplicate a whole lot of infrastructure to make it usable by robots. The robot would then be unable to perform in situations where this system he needs is not in place. Compare this to people in wheel chairs. They cannot use stairs either. This means a lot of effort to create additional ramps in front of buildings. They are humans, so we obviously do that. But I doubt anybody would want to buy a robot if that would require applying massive changes to their building.

The robot should adopt to our world, not the other way round.

Additionally, it's a proven design. The idea behind bionics is that we are surrounded by stuff that's out there for thousands if not millions of years. Ignoring that and starting from scratch is just stupid from an engineering perspective.

Wouldn't it be better to make robots better than humans and not to be limited by the human body parameters?

It's an inspiration, an idea, not a goal. I doubt that any researcher is trying to build an exact copy of a human. It's not like they consider it a failure if their humanoid robot would be able to run faster than human, jump higher or bet them at chess.

But as mentioned above, a humanoid robot is compatible to other humans, while being able to adopt to a wide range of environments and situations and seems to be a decent concept overall. From an engineering point of view, it seems to be a plausible direction for research.


答: 50k4 did a good job of enumerating the different ways to measure torque in the joints.  So I won't go into that.  But if you want to detect unexpected impacts, another option is to use accelerometers.  Example here</p>

Title: What are some ways to estimate torque/load on a robotic arm joint

Body:
My main problem is measuring joint torque/load economically. There are ways to detect the electric current drawn which is proportional to the torque. Since my motor is a BLDC motor, there will be a driver which drives the 3 phases and hence  the current drawn will also include losses, which would be variable. Is there a proper way to estimate the load by sensing current?

Is there any way to reliably get the torque/load on a motor joint, what are the common ways to do so without spending a ton of money on torque sensors?

Do to link me to any papers/research on this subject, if you'd want to.

I need to judge the load on the joints of a 6 dof robotic arm programmatically and detect unexpected impacts.


问:
Harmonic drives in hobby projects
After a fair bit of research into industrial robot arms I've learned that a lot of them use components like harmonic drives and sometimes cycloidal gearboxes.

Two main questions:

How feasible are these for use in a hobby project? I do have several thousand dollars at my disposable to build a 6 DOF arm. Arm goals at a glance: 1m total reach, 5kg payload, reasonable speed.

What sources would you recommend? Online the sites seem very specialized, gotta go through sales reps, etc, which kind of worries me regarding the prices lol. Plus for Harmonic Drives I only found one vendor.

Side/related question: would buying from China work out alright or would I not get what I'm looking for (namely: good torque at <1 arcmin backlash)? E.g.
Another example.

--

I have little experience with this technology (precision eccentric gearing), but would definitely like to explore it and purchase test equipment to construct a basic arm. Thanks for any help, looking for a decent starting point.

EDIT -- I would like to use one of these special gearboxes with a NEMA stepper motor if possible (and if it saves cost) since we have a bunch of those lying around, heh.

EDIT2 -- Curious if this item would actually have some sort of strain wave gearing inside of it.

If so this seems very affordable and could provide decent precision on part of a robot arm.

答:
Two parts:

a) If we take into account the cost of harmonic drives and the fact that hobbyist projects aren't intended to make money (no revenue in return), harmonic drives aren't feasible at all for hobbyist projects.

b) Since you are willing to do build a hobbyist-grade robotic arm, I think it would be better if you define the desired specs of your arm then based on this you should start looking for components, or building your own

I think answering point 2, should be done after you answer point 1-b.

For a hobby poject I would always keep in mind the "cost" point, because a robotic arm that uses the same tech and at a similar price point as professional industrial ones is no longer a "hobby project".

Title: Harmonic drives in hobby projects


问:
Inexpensive lidar/radar rangefinder good up to 100m?
I've been looking around for a lidar/radar rangefinder for a few months now and can't seem to find anything reasonable for my application.  My requirements are pretty straightforward:

100m range

I2C or other serial protocol

Accuracy +/- 0.25m

Sampling > 50hz

This isn't a spinning/mapping application, so sampling rate isn't very demanding, and I don't think I'm asking much regarding accuracy, but I can't find anything for less than $600.  It seems like there's a bit of a hole in the market?

The closest ive come is the lidar lite from pulsed lite (now Garmin), but its only good up to 40m, and I've had one backordered for 4 months now!  If they offered this product in an 80 or even 60m application it would help me, but 40m isnt quite enough.

I would assume the technology/demand just isn't out there that anyone is cheaply Producing this device, but I see lots of lidar based rangefinders for golf courses/gun sitting/etc that are around $100 in price and work in these ranges.  What's different about these technologies? Example.  What technology does this use and are there sensors out there that I can buy direct?

Thanks

Also found this, but seems specific to altimeters. Is there something about this device that would only make it applicable for drone altimeter applications?  I know there must be considerations for the incoming environmental light and reflectiveness of the surface it's detecting,so possibility it wouldn't work in an outside application where environmental lighting will vary?  And also this device doesn't call itself 'lidar', so let's ask a very basic question:

Are all laser rangefinders considered 'lidar'?  Surprisingly I haven't found this answer.

答:
Check this, starting from the last part:

I think they are using the same technology as the several of their sensors: ( the one you mentioned)

In the 100 dollar price range I think you will not find anything that meets  your demands.

I have no experience with golf laser range finders.


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

Like the one used for this wood cutter:

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

What is it called?

答:
The general term is "feature detection". But this is very broad. It basically means to find anything in an image that fits to some description. A feature could be a line, point, blob, etc. A detector would be able to tell you the position of a feature in an image.

This is where computer vision ends and photogrammetry begins.

In order to make a connection between the 2D image and the 3D reality it represents, you need a mathematical model of the camera (intrinsic parameters) and it's pose (extrinsic parameters). In your case, the former could be obtained via calibration of the camera and the latter via feature detection in the image. Basically speaking, if you know where the points are in your image and you know the size and pattern of the tape in real life, you can calculate the position and orientation of the camera from that.

The popular library OpenCV does all of the above and a lot more. For the second part of my answer, check this: http://docs.opencv.org/trunk/d9/d0c/group__calib3d.html for the first part, you have to find the feature detector that suits your needs, depending on what you want to detect (or write your own)


问:
How much weight can the iRobot carry?
I'd like to attach some extra equipment to the iRobot. Does anyone have any idea of a weight limit before mobility is restricted or it just breaks? Could it possibly carry a few extra pounds? </p>

答: My dad actually works as a a software designer for iRobot and he tells me that exceeding 15-20 lbs is probably the limit for a load with which the robot can function normally. Personally though, I would just test it out with increasing weights (if you're worried about it breaking, it is built to withstand a 180 lb guy standing on it). However, he also mentioned that with the added weight, it won't be able to accurately measure the magnitude of its acceleration so the cliff safety features (what makes it stop before it tumbles down the stairs) may not work as intended so definitely be careful about that.</p>

Title: How much weight can the iRobot carry?


答:
Note that this question has been answered before. If you are using the iRobot Create 2, the answer is found here: What is the maximum payload weight for create 2/can I use old create accessories with the Create 2?
For the original iRobot Create, the answer is here: Questions about Irobot Create</p>

Title: How much weight can the iRobot carry?

Body: I'd like to attach some extra equipment to the iRobot. Does anyone have any idea of a weight limit before mobility is restricted or it just breaks? Could it possibly carry a few extra pounds? </p>


问:
Gauss Newton Method for Accelerometer calibration
I am following the code obtained in matlab file exchange for the paper

http://ieeexplore.ieee.org/document/4655611/

He calculates the Hessian matrix as follows using Jacobian Matrix J,

```<code>**H = inv(J'*J); % Hessian matrix,**
</code>```

How is this relation true.

And also the g value used is 1 to construct the COST function to be minimized using LEAST SQUARES , but should'nt it be the local gravity value at the particular place you are carrying out the calibration??

Link to the code :

MATLAB Code

Please throw some light on this.
Thank You.

答: $J^T \times J$ is an approximation to the Hessian which comes from the Levenberg Marquardt Algorithm.  It is a least-squares approach, and seems to be used frequently in a variety of optimization problems (such as training artificial neural networks).  See equations 6 and 7 of Appendix A from this paper http://scholarcommons.usf.edu/cgi/viewcontent.cgi?article=4593&context=etd for a derivation.</p>


问:
Are there any advantages to using a LIDAR for SLAM vs a standard RGB camera?
I've been thinking about building a small UAV with an onboard LIDAR, just for fun. I'm interested in SLAM and autonomous flight indoors and thought that I would need a lidar to get a 3D map of the environment. Now, I've spent some more time looking into SLAM techniques and have seen very impressive results with simple RGB cameras, not even necessarily stereo setups. For instance, these results of the CV group of TU Muenchen. They are capable of constructing 3D pointclouds from simple webcams, in real-time on a standard CPU.

My question: are there cases where you'd still need a LIDAR or can this expensive sensor be replaced with a standard camera? Any pros/cons for either sensors?

I'm going to list some pros/cons that I know/can think of:

LIDARs are better at detecting featureless objects (blank walls) whereas a vision-based SLAM would need some features.

Using LIDARs would be computationally less intensive than reconstructing from video

The single RGB camera 3D reconstruction algorithms I found need some movement of the camera to estimate depth whereas a LIDAR does not need any movement.

Using a single camera for SLAM would be cheaper, lighter and possibly have a better resolution than a LIDAR.

答:
My question: are there cases where you'd still need a LIDAR or can
  this expensive sensor be replaced with a standard camera? ...

A each one of them has its advantages/disadvantages. Thus in some cases it would be more suitable to choose a lidar instead of a camera and vice-versa.

A LIDAR doesn't require light to perceive the environment whereas a camera won't be useful in the absence of light.

A LIDAR would fail to detect walls made of glass, since the rays would pass through the walls. In the case of a single camera, I have no I idea how good/bad the results would be but also it would see through the glass (not sure about this part as I have not tested a monocular slam in case there are glass walls/facades, but with a laser it would fail).

Price which is very important and you've mentioned it.

Using LIDARs would be computationally less intensive than
  reconstructing from video

It depends how many points a LIDAR measures, and how many of them you use to construct the map the computational requirements vary a lot. (have a look at velodyne lidars and check how many points/sec they measure).

Using a single camera for SLAM would be cheaper, lighter and
  possibly have a better resolution than a LIDAR.

The resolution depends on the LIDAR and camera you use, so you cannot generalize and say one is better than the other.


答:
The core reason for choosing harmonic drives is desire for zero backlash. Moreover, regarding mass and size, they become more beneficial for higher gear ratios as their size and mass do not scale for higher ratios. More specifically, they take up very little axial space and use only one stage of reduction. They are beneficial for high precision tasks and various difficult control tasks (such as balancing and walking). You first have to ask yourself if you have a high desire for these properties, because there is a price to pay...

Harmonic drives from the vendor you state are of high quality. They are precise, designed for a long lifespan and have good load/weight ratios. From experience, the price tag is approximately 1000 euros per harmonic drive for only the component set (consisting of the wave generator, circular spline and flex spline). Expect to pay more if you want a complete unit (i.e. including housing with input and output shafts and bearings). It is recommended to buy a full unit, because also the housing has high requirements (for instance, both input and output shafts have to be fixed axially and centered to high accuracy) and assembly is not trivial.

As someone already stated, "Harmonic Drives" is in fact trade marketed by the Harmonic Drive company. The principle mechanism is referred to as strain wave generator. You will certainly find more vendors with that name. Whereas it is quite possible that you pay slightly more for the name tag "Harmonic Drive", alarm bells should start ringing if the price is off by a full order of magnitude. Be sure to compare specifications, but also be cautious with them. Different companies use different standards for determining their load ratios; company A in country B may have more of a reputation and legal status to defend than company C in country D. Cheaper strain wave generators might be machined from soft (non-hardened) steel, machined with poor tolerances and may use slightly different principles that use more and smaller parts. As for the latter, the elliptically shaped bearing in the wave generator could for instance be replaced by two ordinary ball bearings, lowering the quality. All could lead to increase of backlash, periodic wobble, lower load ratings, reduced life span and lower efficiency. At this point, it might be worth considering to step back to more common transmissions.

It is difficult to give a direct and quantified answer to your question, because we (or I, at least) simply have not tried all B-brands out there. You would have to buy and try.

To give you a short tldr answer to your main question: no, stay away from harmonic drives as a hobbyist, unless you have serious money and/or time to spend.

Title: Harmonic drives in hobby projects

Body:
After a fair bit of research into industrial robot arms I've learned that a lot of them use components like harmonic drives and sometimes cycloidal gearboxes.

Two main questions:

How feasible are these for use in a hobby project? I do have several thousand dollars at my disposable to build a 6 DOF arm. Arm goals at a glance: 1m total reach, 5kg payload, reasonable speed.

What sources would you recommend? Online the sites seem very specialized, gotta go through sales reps, etc, which kind of worries me regarding the prices lol. Plus for Harmonic Drives I only found one vendor.

Side/related question: would buying from China work out alright or would I not get what I'm looking for (namely: good torque at <1 arcmin backlash)? E.g.
Another example.

--

I have little experience with this technology (precision eccentric gearing), but would definitely like to explore it and purchase test equipment to construct a basic arm. Thanks for any help, looking for a decent starting point.

EDIT -- I would like to use one of these special gearboxes with a NEMA stepper motor if possible (and if it saves cost) since we have a bunch of those lying around, heh.

EDIT2 -- Curious if this item would actually have some sort of strain wave gearing inside of it.

If so this seems very affordable and could provide decent precision on part of a robot arm.


问:
Calculating the efficiency of Mecanum wheels
I'm part of a FIRST Robotics team, and we're looking into using Mecanum wheels for our robot.

What are the advantages and disadvantages of using Mecanum wheel versus regular ones? From looking through Google, it looks like Mecanum wheels give more mobility but don't have as much traction. Are there any other advantages or disadvantages?

Compared to regular wheels, are Mecanum wheels less efficient or more efficient in any way? And if so, is there a quantifiable way to determine by how much?

Are there equations I can use to calculate efficiency (or inefficiency) and/or speed of moving forwards, sideways, or at arbitrary angles?

A picture of a robot with mecanum wheels:

答:
Efficiency isn't the right thing to compare due to various advantages and disadvantages of each type of wheel. Comparing the efficiency of the different types of wheels is like comparing apples and oranges.

However, comparing speed and force can give a good comparison of the different types of wheels. Here is a table that offers a quick and simple comparison (Note that this assumes fictionless bearings and equal traction!):

Trying to take into account slipage gets hairy. From the paper "Kinematic Analysis of Four-Wheel Mecanum Vehicle" which is at the top of this list of papers:

This problem, in general, has no solution, since it represents an
  overdetermined system of simultaneous linear equations. The  physical
  meaning of this is: if four arbitrary rotational  velocities are
  chosen for the four wheels, there is in general no  vehicle motion
  which does not involve some wheel "scrubbing"  (slipping) on the
  floor. However, a matrix [F] which generates a  "best fit" least
  squares solution can be found


问:
Is there a way to use a single dc motor output for two different loads?
Is there a way to use a single dc motor output for two different loads (by using gears, relays etc) ? Please see the illustration below:

To clarify the illustration, I get the dc motor power at "output 1" gear which is extended over an idler gear to output 2 gear. All three are in contact (though the picture doesn't quite show it). Load 1 and Load 2 are two separate gears connected to different loads (wheels etc) and initially not in contact with the bottom gears. On switching on the relays 1, 2 - the load bearing gears, move towards the output1 and output2 and mesh with them to drive Load 1, 2.

答: Well, You question is unclear, But as far as I understand You can drive two different load from a single motor by making a correct mechanical gear box assembly. You can rotate two wheels into two different directions with the use of proper gear system. </p>


问:
Choosing motor to buy after calculations
I am building a two wheeled robot which will have:

max speed of 10km/h and acceleration of 0.5m/s²

can climb 12° slopes

weighs at most 30 kg

wheel diameter is 50cm

By doing the calculations myself, and checking with many online automatic calculator I find that in the "worst" possible conditions I would need :

Around 9.5Nm of torque

Around 100Rpm for speed
Which results in approximately a 100W motor.

When I look for suitable motors online I come across a lot of sites recommending different motors depending on robot weight.

An example would be.

Where this kind of motor is recommended for up to 150lbs robots and it is a 30-50W motor (I believe they use 4 of them).

Is the power I'm looking for in my case too "overkill"?

Seeing as this is an indoor robot but which will need to be able to go up slopes to reach different areas, do I need to find a motor that corresponds exactly to my numbers or do I need to get something even more powerful since efficiency is never 100%?

答:
Since you don't know what assumptions they had in mind when they estimated the motor was good for a robot of a specific weight, I would not trust that. You have established your own requirements and calculations, which is awesome. Trust and build on that. Use the provided datasheets for the motors. The datasheets from Shayang Ye (the manufacturer of the gearmotor you linked) tend to require a bit extra conversion and work to use, but all the info you need is there.

The more operating conditions you can predict, the better you will be able to select the best motor the first time. Your 9.5*Nm*100*RPM is probably an estimate of the power to the environment and so you will need to estimate the power losses from the wheel-environment contact and the gearbox and other friction to arrive at the motor power you need. Losses of 30%-50% is what I would use for high level calculations like this. With a clean operating environment and high quality components losses might be as low as 10% but you are starting with low quality gearmotors so...

Electric motors operating at their maximums generate a lot of heat and can usually be operated at that maximum for a short amount of time.

High quality DC motor manufacturers usually show an estimate of what performance to expect if you want to guarantee no overheating. You can use their catalogs (Faulhaber, Maxon Motor are examples) to get an idea of how this will affect you. Look up motors of similar power or size to what you want and look at the graphs they provide. Expect that your low quality motor will heat a bit faster.

Your robot is big enough that you may find a larger motor to be useful. Search for brushless wheelchair motors for some more options a bit bigger but with similar cost/quality.


问:
Rotation matrix sign convention confusion.
In rotation matrix, Why do we rotate the first and third rotation in the opposite direction of the 2nd rotation, this is confusing.
Image is attached with this.

In this image we can note that for x and Z rotation non zero elements are same. But for Y rotation sign of sin(theta) changed.

why is so?

答:
I think that the main issue is that you're trying to read your rotation matrices from left to right. The sign changes seem random, but actually cycle in an ordinary way. Below follows a more elaborate explanation with some more background information.

Let's start with the question:

A) Why do minuses appear at all?

Followed by:

B) Why do minuses appear where they appear?

A)

From a mathematical point of view, it is not possible to construct a strictly positive rotation matrix. This can easily be deduced from the property that rotation matrices are skew-symmetric, i.e. $R=R^{-T}$. As such, it is not possible to define a rotation matrix without minuses or zeros appearing on non-diagonal elements. For example, it is not possible to define (a real number) $\theta$ (representing an angle) in any way to obtain the following matrix and call it a rotation matrix:

$$R\neq\left[\begin{matrix}\cos{\theta} & \sin{\theta} \\ \sin{\theta} & \cos{\theta} \end{matrix}\right]$$

(This matrix is 2D but the same applies to 3D)

A more intuitive explanation is that all three axes of the Cartesian coordinate system are defined to be orthogonal to each other, i.e. at 90 degrees. If mapping a horizontal coordinate component from Y to X requires a rotation of 90 degrees, it follows that mapping from X to Y (i.e. the cross-diagonal element on the rotation matrix) requires a rotation of -90 degrees. The difference between the two is 180 degrees, i.e. a change of sign.

B)

So, minus has to appear somewhere, but why are they appearing as they do? For instance, in a 2D X-Y coordinate system where X is pointing right and Y is pointing up, we could define rotation $\theta$ to be counter-clockwise (cc), or clockwise (c) leading to either of the following two rotation matrices respectively:

$$R_{cc}=\left[\begin{matrix}\cos{\theta} & -\sin{\theta} \\ \sin{\theta} & \cos{\theta} \end{matrix}\right]$$

$$R_{c}=\left[\begin{matrix}\cos{\theta} & \sin{\theta} \\ -\sin{\theta} & \cos{\theta} \end{matrix}\right]$$

As you may already know, we have (nearly) globally accepted to use the former. It is just a convention, defining axes to point to the right and up and the rotation to be counter-clockwise.

Now, let's move to 3D. We cannot simply speak of clockwise and counter-clockwise and right and up anymore, because we are not forced to observe the image from a specific direction. To fix this minor issue, we rewrite our conventions such that they are also applicable in 3D:

1) We use right-handed Cartesian coordinated systems:

2) We use right-handed rotations:

Now, if you look straight at the X-Y coordinate system along Z, we obtain the same coordinate system we had in 2D (Y pointing up, X pointing right). We find that Z is pointing towards you. Due to Z pointing towards you, the rotation will be counter-clockwise and we use the rotation matrix $R_{cc}$.

We can do the same for the Y-Z coordinate system (Z pointing up, Y pointing right), along X. Now X will be pointing towards you. Again, we use $R_{cc}$.

Next, we have the Z-X coordinate system (X pointing up, Z pointing right), along Y. We find exactly the same, i.e. Y pointing towards you. However, Z-X does not appear as obvious in the rotation matrix, because our (flat) matrix has finite width and height rather than being circular.

If you read your rotation matrix from left to right, what appears is the X-Z coordinate system instead of the Z-X coordinate system, also along Y, but now we see that Y is pointing away from you now. This changes the direction of rotation. Hence, you see $R_c$ appearing instead of $R_{cc}$.

Analysing X-Y, Y-Z and Z-X makes more sense than X-Y, Y-Z and X-Z. Try to read your rotation matrix in a more cyclic way, rather than from left to right, if that makes any sense... Try to think of X, Y and Z as independent entities, rather than Y being greater than X and Z being greater than Y, and thus greater than X. Perhaps replace them for apple, orange and banana instead.


答:
The convention of these rotation matrices follow the same positive direction of rotation as the cross product in a right handed coordinate system.

So a 90° rotation around the x-axis maps the y-axis to the positive z-axis and the z-axis to the negative y-axis; a 90° rotation around the y-axis maps the z-axis to the positive x-axis and the x-axis to the negative z-axis; a 90° rotation around the z-axis maps the x-axis to the positive y-axis and the y-axis to the negative x-axis.

Title: Rotation matrix sign convention confusion.

Body:
In rotation matrix, Why do we rotate the first and third rotation in the opposite direction of the 2nd rotation, this is confusing.
Image is attached with this.

In this image we can note that for x and Z rotation non zero elements are same. But for Y rotation sign of sin(theta) changed.

why is so?


答:
From my experience, you should try to find motor that is 1.5 to 2 times the calculated power. This is to account for additional losses mainly due to the friction and inefficiency in the power transmission mechanisms.

In some designs, even after you have factored in all the losses and you have found the right motor, there are other criteria such as space constraint and suitability of the power source that should be taken into account.

Title: Choosing motor to buy after calculations

Body:
I am building a two wheeled robot which will have:

max speed of 10km/h and acceleration of 0.5m/s²

can climb 12° slopes

weighs at most 30 kg

wheel diameter is 50cm

By doing the calculations myself, and checking with many online automatic calculator I find that in the "worst" possible conditions I would need :

Around 9.5Nm of torque

Around 100Rpm for speed
Which results in approximately a 100W motor.

When I look for suitable motors online I come across a lot of sites recommending different motors depending on robot weight.

An example would be.

Where this kind of motor is recommended for up to 150lbs robots and it is a 30-50W motor (I believe they use 4 of them).

Is the power I'm looking for in my case too "overkill"?

Seeing as this is an indoor robot but which will need to be able to go up slopes to reach different areas, do I need to find a motor that corresponds exactly to my numbers or do I need to get something even more powerful since efficiency is never 100%?


问:
Drift in Integrating Angular Acceleration to Angular Velocity using two accelerometer data
I am trying to integrate Angular acceleration obtained from a set of accelerometers positioned specifically at opposite corners of a cube, based on "EcoIMU: A Dual Triaxial-Accelerometer Inertial Measurement Unit for Wearable Applications" paper.

I am getting the angular acceleration on each Axis

This signal is quite noisy .

Then after integrating angular acceleration to angular velocity using trapezoidal rule , I get signals which drifts heavily and randomly.

I understand that noise and also numerical integration is causing the effect. Other than low pass filtering the data, is there any other methods to reduce noise.

And the major factor for the drift is numerical integration, how can this be handled.

Please help me out with this.

答: My suggestion would be to work in a Kalman Filter. Using this, you can get a much more accurate picture of what the accelerometers are actually experiencing without the signal noise from drift. This, in turn, will offer you a much clearer resolution for your angular velocity integration data. Unfortunately, I'm very shaky with the math behind Kalman Filters so you're going to have to figure that part out yourself. :) Here is the wikipedia page if you want to look at that, and if you're not great with matrix math either, there are tons of tutorials out there specifically dealing with the matrix math in Kalman Filters which you can check out.</p>


问:
Optimal trajectory for manipulators using optimal control
I'm trying to implement direct-multiple shooting method to my problem.

```<code>Objective function: tf
constraints       : q<q_max
                    v<v_max (v=dq/dt)
                    a<a_max
                    tau<tau_max (tau=M(q)a+B(q,v)+G(q))
                    C(q)=r_0-|P-P_0|  (obstacle avoidance)

Initial condition q(0)=q_0 (q_0 is given)
                  q(t_f)=q_f (q_f is given) and
                  v(0)= 0
                  v(t_f)=0
</code>```

As I understand from the theory, I have to divide the variables as state variables and control variables.

```<code>State variables are: q and v
Control variable is: tau
In each time interval I'll generate cubic splines which are q(t)=a_0+a_1*t+a_2*t^2+a_3*t^3
</code>```

Could you help me how I will implement it? I don't understand what is the ODE here and how I should construct the algorithm?

Are there any example about it?

edit to make the equations clear I'll rewrite them here again:

based on the link

state variables:
x1(t) = (q1(t) , ··· ,qn(t))^T and x2(t) = (q˙1(t) , ··· ,q˙n(t))^T.  and derivatives of the state variables are equal to x˙(t) = f(x(t) ,u(t)) where f is
f(x(t), u(t)) = ((q˙1(t), . . . , q˙5(t))^T;
                  M(x(t))−1· (u(t) − N(x(t)))

I don't know how to insert cubic polynomials in that equation system and how to solve ODE Will it be like [T,X]=ode45('f', [0 t_f], [q_0 q_f])

答:
You have asked a complex question, and from your question it seems that there a lot of basic underlying concepts that you are not familiar with. Since you are new to ODEs, path planning and possibly robotics I would advise to take a stepwise approach:

Take a look at how s-curves trajectory planning is done for robotic manipulators. You will se how the trajectory equation looks like for positions, velocities, accelerations and possibly jerks. The way the trajectory is defined will surly explain what is the ODE when talking about trajectory planning. You can find explanations here and here here and second half of this document

Take a look at path planning with obstacle avoidance. Here you can learn how optimality criteria (cost function) are defined and used. Here and here and the first half of this document

Read about optimal control. Before solving complex problems with optimal control, solve simple examples and make sure you understand them. Introduction here

Combine all of the above. If you know how trajectory planning works, how path planning works and how optimal control works, you are in a position to combine them.


答:
Absolutely. Think of how your car works. The engine/motor drives two (or more) wheels at the same time. And the loads presented by the independent wheels are often of very different magnitudes. For instance when the car is turning or when one wheel is slipping.

What you need to split the power is a differential:

What is a Differential?

The differential is a device that splits the engine torque two ways,
allowing each output to spin at a different speed.

This would split the motor load equally. It would allow both outputs to spin at the same speed if their loads are equal. If one load increases or is greater, it will slow down without affecting the speed of the other load.

If the loads are nominally different and you need them to spin at the same speed or if the loads are equal and you need them to spin at different speeds, then you can just add speed change gears to one of the outputs.

Where your output speed would equal your input speed times the difference in the numbers of teeth on the gears:

$$S_2 = S_1 \times \dfrac{T_1}{T_2}$$

Edit to answer comment on meshing gears:

Your intuition isn't that far off. Using a solenoid to engage and disengage a load is how part time four-wheel drive works. The solenoid engages and disengages the locking hubs to connect and disconnect the load. But simpler designs will cause a sudden increase in torque demand resulting in some jerk if the motor can't compensate for it.

You would be better off using a clutch to gradually apply the load:

Title: Is there a way to use a single dc motor output for two different loads?

Body:
Is there a way to use a single dc motor output for two different loads (by using gears, relays etc) ? Please see the illustration below:

To clarify the illustration, I get the dc motor power at "output 1" gear which is extended over an idler gear to output 2 gear. All three are in contact (though the picture doesn't quite show it). Load 1 and Load 2 are two separate gears connected to different loads (wheels etc) and initially not in contact with the bottom gears. On switching on the relays 1, 2 - the load bearing gears, move towards the output1 and output2 and mesh with them to drive Load 1, 2.


问:
ROS : Performing 2-D Pedestrian Dead Reckoning on an AR Drone and displaying location on a floorplan
I'm trying to find a way where I can estimate the location of my drone on a floorplan. Note that right now, I will just be moving the drone around manually and not flying it.

I read up on PDR and what I want to do is this:
Provide an initial location of my drone on the floorplan, and as I move the drone around, using information from the IMU/accelerometers, I want to update the position of my drone on the floorplan.

I've worked with ROS a bit and I want to know if there are packages in ROS that could do this. For now, I'm looking for rough estimates and not perfect solutions.

Thanks!

答:
using information from the IMU/accelerometers

These sensors will accumulate error and will not provide a good estimate of the position of the drone after some time.

What you need is some absolute reference point. You need to make some kind of connection between the sensor data and the surrounding area that you are trying to localise yourself in. Check out slam, which is the general term used for this kind of stuff. If you know the environment and already have a map, the task simplifies to localization, but a few of the things from slam might still apply.


问:
What exactly is $\omega_k$ in the stage cost of moving horizon estimation?
In (nonlinear) moving horizon estimation the aim is to estimate an unknown state sequence $\{x_k\}_{k=0}^T$ over a moving horizon N using measurements $y_k$ up to time $T$ and a system model as constraint. All the papers I've seen so far 1,2,3 the following cost function is used:

$$
\phi = \min_{z,\{\omega_k\}_{k = T-N}^{T-1}} \sum_{k = T-N}^{T-1} \underbrace{\omega_k^TQ^{-1}\omega_k + \nu_k^TR^{-1}\nu_k}_{\text{stage cost } L_k(\omega,\nu)} + \underbrace{\mathcal{\hat{Z}}_{T-N}(z)}_{\text{approximated arrival cost}}
$$

The noise sequence $\{\omega_k\}_{k = T-N}^{T-1}$ should be optimized/minimized in order to solve for the unknown state sequence using the prediction model:

$$
x_{k+1} = f(x_k,\omega_k)
$$

whereas the measurement model is defined as

$$
y_k = h(x_k) + \nu_k
$$

with additive noise $\nu$.

The question is what exactly is $\omega_k$ in the stage cost?

In the papers $\nu$ is defined to be

$$
\nu_k = y_k - h(x_k)
$$

However, $\omega_k$ remains undefined.
If I can assume additive noise $\omega$ in the prediction model, I think $\omega_k$ is something like the follwoing:

$$
\omega_k = x_{k+1} - f(x_k)
$$

If this should be correct, then my next Problem is that I don't know the states $x_k$, $x_{k+1}$ (they should be estimated).

EDIT

Is it possible that my guess for $\omega_k = x_{k+1} - f(x_k)$ is "wrong" and it is enough to just consider:

the measurement $\nu_k = y_k - h(x_k)$ in the cost function $\phi$

the prediction model as constraint?

And let the optimization do the "rest" in finding a possible solution of a noise sequence $\{\omega_k\}_{k = T-N}^{T-1}$? In this case which Matlab solver would you suggest? I thought of using lsqnonlin since my problem is a sum of squares. Is it possible to use lsqnonlin with the prediction model as constraint?

1 Fast Moving Horizon Estimation of nonlinear processes via Carleman linearization

2 Constrained state estimation for nonlinear discrete-time systems: stability and moving horizon approximations

3 Introduction to Nonlinear Model Predictive Control and Moving Horizon
Estimation

答:
Before i answer your question directly let me first clarify some semantics. The problem which is described here is called "State Estimation" in general with the complement of "Moving Horizon". It can be dated back to Norbert Wiener's "control theory" in the 1940s. The goal of Wiener was to use external sensor information for continuous update a modell. For example, for tracking airplanes. He invented a linear filter which is a stochastic concept for dealing with uncertainty.

The reason why I give this short lecture in history of state-esitimation is because the concept of Norbert Wiener is buggy. It never worked, there is no possibility to determine the stage-cost with a stochastic model. The better concept which was invented after the work of Wiener is to use Action Grammars for State-Estimation. Most work on this topic was done at the university Maryland and by Neil T. Dantam who published a lot. A short introduction paper is Robot Contact Task State Estimation via Position-based Action Grammars


问:
Utilizing the inertial sensors in an AR Drone
I'm trying to figure out how to use the inertial sensors in an AR Drone to perform a rough version of dead reckoning. I want to move the drone around a room (without flying it) and using the velocity and orientation data from the drone to plot the trajectory that I have moved it so far.

I know that inertial odometry data is prone to heavy drift with continuous use, but for a short term exploration, I am ok with that.

I'm running the ardrone_autonomy package on ROS and I am using the odometry data from the drone to plot my trajectory on Rviz. However, Rviz only shows me the orientation of my drone and does not update movement whatsoever.

This is how my Rviz looks:

As you can see, even if I move the drone around the entire room, the position on the map does not get updated, but the orientation does.

Can anyone tell me what I am doing wrong here?

答: That's because your fixed frame is set to /odom (Essentially, you're setting your global frame to your local frame, so relative to the vehicle itself, the vehicle never moves!). The solution would be to set it to /map or /world, depending on what the name of the frame is that the package provides. The list can be seen in the dropdown menu of fixed frames. You also seem to have an issue with transforms between odom and map, so I am guessing you would need some sort of a static transform between odom and some other local frame such as base_link. </p>