问:
Does the mAh of a battery mean longer power or more power?
If a Lipo battery has more mAh will it be slower to run out of energy or will it have larger power output?

Thanks in Advance

答:
The battery capacity specification (eg X mAh) tells you that your battery can run for 1 hour providing X milliamps until it is depleted. This doesn't always scale with time, for example you probably won't run for 1/2 hour if you draw 2*X milliamps, but this is another discussion.

To answer your question, a greater mAh will allow you to use your battery for longer before it depletes, in terms of current draw.

However, for the same battery model, the C-rating ($C$)(the maximum current you can safely, constantly draw from the battery) stays constant. Thus, since it is defined as $I_{max} = C \cdot X$, higher C-ratings will also allow you to draw higher instantaneous currents, hence more power.


问:
Arduino project: Turning with a fixed front wheel axis
I am working on an Arduino robot project. This project requires a base with 4 wheels where the back wheels are attached to two DC motors that can be controlled independently of each other. I am thinking that the robot will turn by giving power to just one of the motors but I am having trouble with how the front axis should look like. Would it be possible to have a solid front axis with 2 wheels and still possible for the robot to turn or would the friction be too great?</p>

答:
If you really need to have four wheels, I would suggest you either motorize them all or only two, but diagonal. The first way will work like this: if you want to turn left lets say, the two left wheels will go backwards and the two on the right will go forward. The second way in detail is this: you will motorize either front-left and back-right wheels, or back-left and front-right wheels and they must work as in the first way. Note that both ways will be better working with some good servos, because they run slower wich makes turning easier and produce the same amount of power in any case. This will be useful in ecountering frictions.

Still i would strongly recommend you only used two front wheels and a swivel caster wheel at the back. In any other way, you will have to find and use other methods of movement, as Chuck suggested. Try tearing apart a rc car to get some ideas.

ContentLicense: CC BY-SA 3.0


答:
Neither, it means more energy and it implies more power.

Think of energy as the thing you "spend" to do work, and power is how much work you get done in a particular period of time.

Typically a battery is rated for power with something called a "C" rating, or how much power it would take to drain the battery in one hour.

Since output power of a battery is voltage times current, the C rating can be calculated as nominal voltage times the amp-hour rating, divided by the nominal voltage times an hour.

The nominal voltage cancels itself, and you're just left with the "amp" portion of the battery's amp-hour rating.

This means a 5000mAh battery has a 1C rating of 5000mA, but the output power of the battery is that times nominal voltage, so a 5000mAh battery pack rated for 1C would have less power available than a 2500mAh pack rated for 10C because the 5Ah pack's available output power is limited to (voltage) times 5A where the 2.5Ah pack's available output power is limited to (voltage) times 25A. The smaller pack, with the higher C rating, is capable of delivering 5 times the power in this example.

Regarding run times, that depends on the C rating for the battery.  The higher it is, the more power you are (safely) able to draw at once, which means that you can get more power from a high C battery but, because power is how quickly you're spending energy, that means you'll drain the battery faster.

Ultimately, though, assuming the batteries have the same C rating, the larger capacity battery will have more power available because the C rating is driven by battery capacity.

Given the same applied load (meaning you don't actually use all that available power), the battery with the larger capacity will last longer because you are now drawing power at a lower C value.

I understand C values can be confusing, so if you want some examples just let me know!

:EDIT:

I have mentioned several times now the phrase "available power" because of what I worry is a misconception about batteries and electricity in general. Just because a battery can deliver 25A doesn't mean the battery will deliver 25A. The cold cranking amperage rating (CCA) on your car battery is in the hundreds of amps, but if all you're doing is listening to the radio with your car off, you're drawing a negligible amount of power.

This is all because of Ohm's Law, which says that the current through a device is equal to the applied voltage, relative to the resistance in that device. That is, $I = \frac{V}{R}$ (more commonly expressed as $V=IR$).

This means that if you don't change the electrical load - you keep the same motors running at the same speed - then the effective resistance of the load doesn't change. This in turn means that, if you don't change the terminal voltage of the battery, the current supplied to the load doesn't change.

If the voltage is constant, and the current is constant, then the applied power is constant, even if the available power changes. When your phone is in your hand, the battery inside the phone is powering it. When you plug your phone in, you might be connecting it electrically to a turbine the size of a strip mall. The change in available power doesn't mean you automatically consume all of the available power.

By this, I mean that, as long as your current battery is capable of supplying the load (your voltage bus doesn't brown out), then switching to a larger capacity battery will not improve your performance at all, even though it may have more available power. Electrical devices "take what they need" and nothing more.

Title: Does the mAh of a battery mean longer power or more power?

Body:
If a Lipo battery has more mAh will it be slower to run out of energy or will it have larger power output?

Thanks in Advance


答:
This answer is complimentary to the other answers, so make sure you read them as well.

Think of the $m^2$ unit. Your question is similar to this: if a room is $100m^2$, does that mean it has a greater length than its width or a greater width than its length?

Theoretically speaking, as long as the width multiplied by height is $100m^2$, then those values could be anything. In practice, there could be limitations, such as high distances not fitting on earth, or the curvature of earth causing a different area than the multiple of those values, or very tiny distances shorter than atoms not buildable by man.

You could think of similar units, such as $Nm$ or $Kg\frac{m}{s}$.

The $mAh$ unit is similar. Theoretically speaking, it means that with a battery with $E mAh$ energy, if you draw $XmA$ current, then battery will run out of energy in $Yh$ ($Y$ hours) time where $X*Y=E$. So if you take a small current, it would run a long time, and if you take a large current, it would deplete soon.

In practice however, there are limitations.  For example, if you draw too much current from a battery, the battery may burn, or some other chemical phenomenon could change its nature.  If you draw too little current, the battery may not last as long as expected since it may leak energy on its own (think of an unused battery that drains over time). So your calculation of $X*Y$ may not always match $E$, but if you are within the battery specs, it should get quite close.

So back to your original question:

If a Lipo battery has more mAh will it be slower to run out of energy or will it have larger power output?

If battery A has a higher $mAh$ than battery B, it means that:

If you draw the same current from both, battery A should last longer,

If you plan on depleting the battery in a fixed time, battery A would be able to give you more current in that time.

This was a basic explanation of how $mAh$, as a physical unit, works. Please read the other answers for explanations on how real-world batteries behave.


问:
Create 2: Wheel interface board replacement
http://www.irobotweb.com/~/media/MainSite/PDFs/About/STEM/Create/Create_2_Wheel_Hack.pdf?la=en

Scroll to page 3.

I'm trying to interface the Roomba's preloaded navigation system with a pair of motors not attached to the roomba itself- however, to do this I need an interface board of the same dimensions as the one pictured in the above document. It has 0.050" (1.27) contact centers, which don't seem to be commercially available. Can anyone provide any help locating PCBs of this size?

答:
Here are a few ideas:

Buy 0.050" spacing prototyping board. For example, here are some possible boards that could work on Digi-Key.

Use a PCB prototyping service and fabricate the board you're looking for; this would have the advantage that you could add other circuits to the panel that you may need for your project.

Remove the boards from the wheel modules and use those. iRobot sells new ones on their website; you might also be able to get them from broken robots on eBay, or perhaps someone at iRobot could help if you e-mail them.

Hope this helps!

Please note that I am an iRobot employee, but the postings on this site are my own and don't necessarily represent iRobot's positions, strategies, or opinions.

ContentLicense: CC BY-SA 4.0


问:
Orienting rectangular plastic bricks
As part of a sorting machine, I need to orient a pile of plastic brick-shaped objects (which are all identical in size - about 3cm x 2cm x 1.5cm) so that they always end up with the white side facing up:

These will then be fed into a bowl feeder type of machine for further re-orienting.

How can I accomplish this, preferably without optical sensors? I was thinking about cutting into the bricks and putting magnets inside, but is there a more elegant solution?

答:
Its a bit difficult to give you an exact answer because its quite an open question.

You are sorting the bricks based on an optical characteristics so I can't see any way of doing it other than by using an optical sensor.  If you start sorting them by magnetic properties then you aren't sorting them by their colour anymore.  So what is the reason you don't want to use an optical sensor?

Using one of the colour detector sensors is probably overkill if you only want black and white.

Since black and white are quite different you should be able to use a system that compared the reflectiveness, unless they are high shine.  Could you fire a light beam (laser) off the bricks, would you get different amount amounts of energy absorbed and if you can detect the difference then.

Temperature could be another option, the black side should get hotter faster.

Title: Orienting rectangular plastic bricks


问:
Erratic motor behavior. Is it due to the faulty remote control or Grounding or something else?
I am using arduino mega to run 4 motors via 4 motor controllers. I am using a ps2 controller as the remote control. When the joystick is at rest, the motor should stop.

The problem is the motor still moves randomly when the joystick is at rest. Sometimes, the joystick can only produce forward motion on the motor but not backward. Is this the grounding issue or the PS2 remote control issue ir others.. Does the GND from the arduino board have to be connected to the GND from the external battery?

How can I troubleshoot this?

Thanks.

答:
In most cases, ALL of your ground reference and power return pins and wires should be tied together, preferably with a star configuration to avoid ground loops.

In a star configuration, the ground (return) wires from all your devices are connected to a single, physical point in your circuit. It is best that this point is close to your battery, preferably a power distribution board (board with multiple parallel power ports) connected at the battery plug.

Devices that commonly share ground are microcontrollers, batteries, RC receivers and servo motors.


问:
Are joint state vectors limited?
Are joint-state vectors $q$, which define the position and orientation of a set of joints, limited somehow?

I know they are used for the rotation part of the transformation matrix => therefore I would think they were limited within 0 and 2$\pi$

答:
For generalized joint parameters, there are no explicit limits on the value of $q$, regardless of the joint type.

This is done because more complex joints can be created by a group of relatively simple joints, so it's best to have a library of joints that use the generalized parameter with no bounds.

Consider a rack and pinion. The pinion might rotate an angle $q$ radians, but the rack then translates a distance of $rq$, where r is the effective diameter of the pinion gear. In this case, assuming $0 <= q < 2\pi$ means that the rack can only translate a distance of $2\pi r$.

Screws are similar, where the rotation may be $q$, but the axial translation is based on the pitch and total degree of rotation, $h = qp$, where $p$ is the pitch.

If you would like to evaluate a joint angle as though it were bounded, I would suggest creating a virtual sensor that taps into the joint parameter and performs the bounding operation, but I would definitely leave the actual joint parameter alone.

Title: Are joint state vectors limited?


答:
Additionally to what Chuck said, from a purely mathematical point of view, the rotation matrix is defined as:
$$R(\theta) = \left[
\begin{array}[cc] \\
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta) \\
\end{array}
\right]
$$

Thus, $R(\theta) = R(\theta+2\pi) $, thus you do not need to wrap the angle argument.

Title: Are joint state vectors limited?

Body:
Are joint-state vectors $q$, which define the position and orientation of a set of joints, limited somehow?

I know they are used for the rotation part of the transformation matrix => therefore I would think they were limited within 0 and 2$\pi$


答:
If you have any old PCI Bus cards on hand, eg an old modem, with a jeweler's saw you can trim off a bit of the card edge connector for use as an interim connector.  Here's a drawing (part of a picture from PC PCI boards at multi-circuit-boards.eu) –

The important detail in that drawing is that the card edge connector fingers are spaced 1.27 mm, or 0.050", apart.   The smaller picture shows a small section of a PCI board, similar to what you can cut out from an old modem.  If you don't have a jeweler's saw (which is like a small coping saw, but with a fine-tooth blade, eg 50 TPI) use whatever means you like to cut a piece out, then smooth its edges with sandpaper or a file.

Title: Create 2: Wheel interface board replacement

Body:
http://www.irobotweb.com/~/media/MainSite/PDFs/About/STEM/Create/Create_2_Wheel_Hack.pdf?la=en

Scroll to page 3.

I'm trying to interface the Roomba's preloaded navigation system with a pair of motors not attached to the roomba itself- however, to do this I need an interface board of the same dimensions as the one pictured in the above document. It has 0.050" (1.27) contact centers, which don't seem to be commercially available. Can anyone provide any help locating PCBs of this size?


问:
How to make a stepper motor rotate and come to a position of certain degrees (say for 90 degrees) from any initial position?
I tried this code and it worked:

```<code>void loop()
{
    int y = 104;
    int x2 = vertical2.currentPosition();
    int z2 = y-x2;
    int x1 = horizontal2.currentPosition();
    int z1 = y-x1;

    horizontal2.moveTo(z1);
    horizontal2.run();

    vertical2.moveTo(z2);
    vertical2.run();
}
</code>```

However, the problem is that when the above code was placed inside a loop such as if loop, it was not working. Can anyone help me solve this problem? I am using accelStepper library for the code above.

```<code>void loop()
{
    int dummy=1;
    if(dummy==1)
    {
        int y = 104;
        int x2 = vertical2.currentPosition();
        int z2 = y-x2;
        int x1 = horizontal2.currentPosition();
        int z1 = y-x1;

        horizontal2.moveTo(z1);
        horizontal2.run();

        vertical2.moveTo(z2);
        vertical2.run();
    }
}
</code>```

答:
I'm guessing this is Arduino code, you might want to move it to that forum.

If this is Arduino code then I think the problem you have is you eyes are too slow.  At the end of the loop function it starts the loop function again, so it appears to do nothing, because it's already in the right place.

Hope that is clear enough and helps you.


问:
RC car circuit: what does it do?
I have just disassembled a RC car (a BBR 1:18 Scale Ferrari Enzo from 2005). Attached to the stepper motor that controls the steering of the car was a small circuit board with a cog wheel attached to it. I am trying to figure out what this circuit does. My idea is that it is responsible of keeping track of the wheels position but I am not certain. Here is a picture of it:

As you can see there are 5 wires coming out of it and I know that the green one is GND. Does anyone have an idea of what its function might be?

答:
At a guess this is either a Hall Effect, or Optical, speed and direction measurement device. The five wires will be GND, and outputs of Sensor1 and Sensor 2, and the other two would be the power supply to the Hall Effect/Optical Sensor (with there being a separate Vcc or GND for the power).

This is a basic schematic for a Hall Effect based device

This is a basic schematic for an optical device:

Two sensors are required, as using only one sensor will provide just speed data; adding a second offset sensor will also provide the direction.

I could be wrong though.

Title: RC car circuit: what does it do?


问:
Exchange air and maintain thermal insulation
My application is composting with worms outdoors inside an a styrofoam cooler.  I use a heat lamp and a thermo-electric cooler to maintain the temperature in the bin when the temperature outside is out of bounds for healthy worms.  When the temperature outside is in bounds, I'd like to exchange the air in the bin with fresh air from outside, but I don't want to permanently compromise the insulating properties of my bin with lots of air holes.  So I'm looking for actuator solutions that would allow me to open/close a window of sorts.  I'm considering a solenoid air valve but I don't necessarily need/want an air compressor - a simple fan is sufficient to circulate the air. Any suggestions?

答:
This is no question of robotics... Keep it simple (:

Google for "Louver Bath Vent": https://www.google.de/search?q=Louver+Bath+Vent

These kinds of ducts open by the air pressure generated from a ventilator.


问:
DC Motor to open a door
I want to open a door using a DC motor. I've estimated that the required power in the worst case would be around 35-40W (considering a ~80% efficiency). The whole is controlled by a Particle Photon.

I was thinking to use a L298N to control the output of current to the motor. However, when I looked for powerful enough motors, they would all consume too much current when stalling (> 4A part of the L298N datasheet).

Do you have ideas of how to overcome this? Maybe there's another dual-bridge that can handle more current, maybe there exists a DC motor that is ok for a L298N, or maybe I need to have simultaneous DC motors?

Edit: this part should be a question by itself. I'll keep it here so that future visitors know what the sub-question was about, but please ignore it from now on if answering.

As a sub-question, would it be better to use a brushed or a brushless DC motor?

答:
While there are other H-bridges that handle higher current and it might be cost-effective to just buy a higher-amperage pre-packaged ESC (electronic speed controller), you might also consider using higher-voltage motors (1, 2).  Adjust the voltage up or down as the H-bridge amperage limit allows.

Also consider using a slip clutch between the motor and the door operator.  It would allow the motor to keep running, instead of stalling, if door motion is blocked.  For trying the idea out, you could salvage the clutch or torque-control parts from an old battery-operated screwdriver.

Edit:

Regarding use of a brushed motor vs a brushless motor, I don't see this as an important issue unless you are going to build a significant number of door-openers, rather than a one-off.  But generally for a given amount of motor power, I'd expect lower cost, higher weight, and shorter life from brushed motors than from brushless motors.

A brushless motor would require use of an ESC (3), while a typical brushed DC motor can just be switched on and off.  Both types of motors can be controlled by PWM signals.

If you use a gear motor, then gear train wear and tear (which doesn't a priori depend on motor type, but may depend on motor speed) may be more of a limiting factor than is motor life.

Title: DC Motor to open a door


问:
Path following with precise positioning system (RTK)
Is there any general problem in using precise positioning (centimeter-accurate GNSS RTK system meant) for autonomous car guidance given I have a predefined path the car should follow? I mean, autonomous cars were the topic #1 at CES 2016 yet no such simple system seems to have been introduced to date... Of course the "path planning" is only a part of the "autonomous package" and other problems need to be solved (collision prevention etc.) but I really wonder whether something simple like RTK guidance could be used.

An RTK system relies on very little amount of live correction data (about 1 kB/s) and mobile networks are really ubiquitous today so I can not really see a technical problem in such solution given there are enough RTK base stations around.

EDIT:

This question is only about using precise positioning to follow a predefined track in obstacle-free environment. I am not asking about other systems that need to be implemented in an autonomous car like collision prevention etc. (such systems may employ LIDAR or a stereo camera). Surely a collision prevention is a must for an autonomous system but I consider a theoretical case only.

An updated question may be: Is precise satellite positioning accurate enough to guide/navigate a full-scale passenger car in an obstacle-free outdoor environment in the speed of about 100 km/h given I have a precise-enough path prerecorded that is to follow?

Some answers below already say yes, this is a solved problem. It would be nice to have the answers elaborated in more detail regarding the existing solutions (accuracy, possible problems etc.). One of the solutions may probably be the open source APM autopilot which work for rovers too (example by Emlid) but that does not seem to use RTK so the accuracy may be rather low.

答:
Precise vehicle location is not a very useful piece of data in autonomous driving so I would not expect to see many products focusing on it.

Path planning and following for cars is a solved problem. If you have a static environment where nothing changes, any good position sensing will let you control a vehicle to follow a path. However, there are very few situations where the environment is static. Cars share the road with children, construction, animals, and very stupid other drivers.

The problem with autonomous driving is not the navigation (getting from point A to point B) part. The problem is how to "understand" a dynamic environment and take the "best" action.


答:
Unless you want to put this product at the market (which I doubt), then I wouldn't hope for an RTK-GPS pair to solve your problem.

It could help you, in the extreme case of a dense road network, if a simple GPS receiver got such a bad reading that it would place in in the next block. But it is unlikely that you will perform in such an environment.

Instead, as everybody else mentioned, you definitely need to encode some collision avoidance algorithm, since the uncertainties (even in a static environment) are always great. You cannot rely on your system to run "blind-folded". You will need to give it eyes somehow.

But then, if you do that, you don't really need an RTK-GPS receiver. A simple one would suffice for most proof-of-concept work. However, if you really got the cash, get a cheap pair for about $1000 (something like Piksi) and make your life (only a little bit) easier.

Title: Path following with precise positioning system (RTK)

Body:
Is there any general problem in using precise positioning (centimeter-accurate GNSS RTK system meant) for autonomous car guidance given I have a predefined path the car should follow? I mean, autonomous cars were the topic #1 at CES 2016 yet no such simple system seems to have been introduced to date... Of course the "path planning" is only a part of the "autonomous package" and other problems need to be solved (collision prevention etc.) but I really wonder whether something simple like RTK guidance could be used.

An RTK system relies on very little amount of live correction data (about 1 kB/s) and mobile networks are really ubiquitous today so I can not really see a technical problem in such solution given there are enough RTK base stations around.

EDIT:

This question is only about using precise positioning to follow a predefined track in obstacle-free environment. I am not asking about other systems that need to be implemented in an autonomous car like collision prevention etc. (such systems may employ LIDAR or a stereo camera). Surely a collision prevention is a must for an autonomous system but I consider a theoretical case only.

An updated question may be: Is precise satellite positioning accurate enough to guide/navigate a full-scale passenger car in an obstacle-free outdoor environment in the speed of about 100 km/h given I have a precise-enough path prerecorded that is to follow?

Some answers below already say yes, this is a solved problem. It would be nice to have the answers elaborated in more detail regarding the existing solutions (accuracy, possible problems etc.). One of the solutions may probably be the open source APM autopilot which work for rovers too (example by Emlid) but that does not seem to use RTK so the accuracy may be rather low.


问:
Quadcopter Charging
Our thesis is about Multicopter using two batteries wherein the first battery is used and when the power goes out, a switch is placed use to charge the first battery while the second battery is powering the multicopter, the process repeats again and again until all the power of the battery is drained. Is the process possible to achieved?

Edit 1:
Just to clear everything up again. The thesis is about a Quadcopter that uses two batteries as its power source. These two batteries are attached to a "switching circuit system" that will allow one battery to be drained then the quadcopter will be transferred to the other battery. The solar panels serve as the "charger" of whatever battery is in its standby mode (the discharged battery). So while one battery is being used by the quadcopter, one will be connected to a solar panel which will be charging that battery. Once the other battery is drained, the quadcopter will switch to the charged battery. This will continue to go on until both batteries are drained. Is this achievable?

答:
I think it would be feasible.

There are multiple examples of power distribution boards which allow for dual batteries.

If you use such a device, you can leave the multiple input managment to it, while you use a power switch to isolate each battery for charging.

Provided that you use an adequately sized (for your required ampacity) solid-state switch, I would say that your project is realistic.

Title: Quadcopter Charging


答:
The best way to manage power redundancy for autonomous systems is a really interesting topic.

There are two classes of power needed. Flight and processing. Often the power required for flight is much higher than what's needed for processing.

Issue number 1 is that as soon as you introduce redundancy (2 batteries instead of 1) you incur a penalty of extra volume and weight. 1 big battery will hold more energy than two batteries that fill the same mass and volume.

Issue number 2 is that every stage of electronics you add, every DC-DC converter, every MOSFET, will waste some of your power to heat. So it's very possible that the losses from the extra electronics will be too high.

So you have to have a really good reason for using more than one battery. Especially in a flight system where every gram affects performance.

One reason is to keep the processing system alive to avoid the time cost of startup and shutdown, or provide emergency recovery communictations. In this case, using a big battery for flight and a small battery for processing might be advantagous. Make the small battery only just big enough for the shutdown/emergency time and power the processor with the big battery during normal operations.

Another reason would be to allow the vehicle to do an autonomous mechanical change of batteries. Two batteries of the same size makes it cheaper to build and operate a system like this(assuming lots of aircraft and lots of batteries).

Based on my current understanding of your system, which is a battery+solar panel power system with the goal of maximizing a single flight (rather than landing and charging on the ground), it's possible to do what you want to do but more efficient to put the energy from the solar panels directly into the motors and use one big battery.

Title: Quadcopter Charging

Body:
Our thesis is about Multicopter using two batteries wherein the first battery is used and when the power goes out, a switch is placed use to charge the first battery while the second battery is powering the multicopter, the process repeats again and again until all the power of the battery is drained. Is the process possible to achieved?

Edit 1:
Just to clear everything up again. The thesis is about a Quadcopter that uses two batteries as its power source. These two batteries are attached to a "switching circuit system" that will allow one battery to be drained then the quadcopter will be transferred to the other battery. The solar panels serve as the "charger" of whatever battery is in its standby mode (the discharged battery). So while one battery is being used by the quadcopter, one will be connected to a solar panel which will be charging that battery. Once the other battery is drained, the quadcopter will switch to the charged battery. This will continue to go on until both batteries are drained. Is this achievable?


问:
Tracking objects from camera; PID controlling; Parrot AR Drone 2
I am working on a project where I should perform object tracking using the camera of Parrot AR Drone 2.0. So the main idea is, a drone should be able to identify a specified colour and then follow it by keeping some distance.

I am using the cvdrone API to establish communication with the drone. This API provides function:

```<code>ARDrone::move3D(double vx, double vy, double vz, double vr)
</code>```

which moves the AR.Drone in 3D space and where

vx: X velocity [m/s]

vy: Y velocity [m/s]

vz: Z velocity [m/s]

vr: Rotational speed [rad/s]

I have written an application which does simple image processing on the images obtained from the camera of the drone using OpenCV and finds needed contours of the object to be tracked. See the example below:

Now the part I am struggling is finding the technique using which I should find the velocities to be sent to the move3D function. I have read that common way of doing controlling is by using PID controlling. However, I have read about that and could not get how it could be related to this problem.

To summarise, my question is how to move a robot towards an object detected in its camera? How to find coordinates of certain objects from the camera?

答:
On the condition that you don't care about the position of the quadrotor regarding your target, but instead only of the absolute distance, I would say that for starters, you can extract the distance information from your OpenCV algorithm.

Have a target with a clear contour (eg a coloured ball) and find its relative position from the center of the camera frame, as well as the size of the contour. You don't need features to extract your relative orientation to the object, just know where you should turn to and how far it is.
The size of the contour will need to be calibrated so that you can extract distance information from it (the farthest you are, the smaller the object).
The position of the target from the center of the camera frame will tell you where you need to point your quadrotor.

After that, it's a matter of finding a control law for your quadrotor, which will minimize the offset of the target from the camera center, as well as keep it in the required size in the camera frame. This won't necessarily be easy, since there will be conflicting requirements. For example, you will want to bring the quadrotor closer to your target by pitching it down, but at the same time this will increase the targeting error.
An MPC controller might be suitable for balancing those weights.

In all, I would say that, as it is presented, this is a full-fledged thesis project.


问:
imu position without GPS or camera
I have a IMU that has 3-axis accelerator, 3-axis magnetometer, 3-axis gyroscope and row, yaw, pitch value. I want to get the location of the IMU coordinate(the beginning point is (0,0,0)) but I know just using double integration will has dead reckoning problem. And I found a lot of paper just talking about combining IMU with GPS or camera by using Kalman filter. Is it possible that I just use a IMU to get a slightly precise position data? Because in the future work I will use multiple IMUs bounded on human arms to increase the accuracy. </p>

答:
Of course, it is possible. You need to go for a sensor fusion algorithm, that could be Kalman Filter or Complementary Filter.

I personally found very useful the procedure described at the following link, in order to have a total 3D estimation, without suffering any gimbal lock or other problems.

EDIT: I am reading only now that you're asking for position estimation, and not orientation estimation. My answer refers to the latter. For a precise position estimation unfortunately you would need other kind of sensors (if your robot has wheels (not clear from the question), you could use encoders instead of GPS).

Title: imu position without GPS or camera


答:
No, it is not possible to eliminate the cumulative position error caused by sensor noise and bias without using an additional sensor which can report any kind of position measurement.

Even the best sensors and filtering will not be able to eliminate in a closed-loop fashion the position error.

Title: imu position without GPS or camera

Body: I have a IMU that has 3-axis accelerator, 3-axis magnetometer, 3-axis gyroscope and row, yaw, pitch value. I want to get the location of the IMU coordinate(the beginning point is (0,0,0)) but I know just using double integration will has dead reckoning problem. And I found a lot of paper just talking about combining IMU with GPS or camera by using Kalman filter. Is it possible that I just use a IMU to get a slightly precise position data? Because in the future work I will use multiple IMUs bounded on human arms to increase the accuracy. </p>


问:
Would is be possible to connect a HiTechnic prototype board to an Arduino?
Does anyone know if this is possible? It's just an i2c device right? I mean you would have to cut the cable and make it so you could plug into the pins on the Arduino but you should just be able to use the wire library and say something like.

```<code>Wire.beginTransmission(0x10);
</code>```

the NXT hardware developers kit tells you what pins are which http://mindstorms.lego.com/en-us/support/files/default.aspx

Thanks

EDIT. Turns out this is very possible. The main problem was that HiTechnic says the address is 0x10 and it is actually 0x08 but here is a short sketch that reads and prints some into about the device, i.e. the manufacturer and version.

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

#define ADDRESS 0x08

void setup()
{
  Wire.begin();
  Serial.begin(9600);
}

void loop()
{
  readCharData(0, 7);
  Serial.println();
  readCharData(8, 8);
  Serial.println();
  readCharData(16, 8);
  Serial.println();

  Serial.println("-----------------------------");

  delay(1000);
}

void readCharData(int startAddress, int bytesToRead)
{
  Wire.beginTransmission(ADDRESS);
  Wire.write(startAddress);
  Wire.endTransmission();

  Wire.requestFrom(ADDRESS, bytesToRead);

  while(Wire.available())
  {
     char c = Wire.read();
     Serial.print(c);
  }
}
</code>```

答: According to the HiTechnic page for the prototype board it communicates with the NXT brick. As such it is possible for the Arduino to communicate with it. The one caveat would be whether they have correctly implement I2C. If they haven't then you likely could still use it but it would take additional work.</p>


问:
How can I detect ground collision, for an hexapod robot?
I'm planning to build a small (probably around 30 centimeters in diameter, at rest) hexapod robot, but, currently, it would only be able to walk on even ground. To improve this, I would have to, somehow, detect when each leg collides with the ground.

Ideally, I would be able to know how much weight each leg is supporting, so that I could both balance the weight and adapt to moving (up or down) terrain (so, if you put a finger below one leg and lifted it, the leg would go up); however, if that's not possible, a simple binary signal would do.

Is there a simple and compact method to do this?

答: You could put a strain gage on each leg. Used in a Wheatstone bridge configuration, it outputs a voltage proportional to the force in the leg. This could accomplish everything you want, and assuming you have relatively low accuracy requirements, the circuit is an op-amp and some resistors to give an analog input to a microcontroller or ADC.</p>


答:
A standard approach (using opencv solvePnP) is using at least 4 points in the image that define landmarks of a known geometry.
You can then get the pose of the camera relative to the object.

For example if you had a blue rectangle of which you could detect the corners in the image, and you knew the dimensions of this rectangle, you could work out the relative pose.
You must have some way to identify which corner is which (say you had them each painted different colours just in the corners).

The relative position between your robot would be a (rotated) error, which you could feed into a PID.

See also: https://stackoverflow.com/questions/16265714/camera-pose-estimation-opencv-pnp

Title: Tracking objects from camera; PID controlling; Parrot AR Drone 2

Body:
I am working on a project where I should perform object tracking using the camera of Parrot AR Drone 2.0. So the main idea is, a drone should be able to identify a specified colour and then follow it by keeping some distance.

I am using the cvdrone API to establish communication with the drone. This API provides function:

```<code>ARDrone::move3D(double vx, double vy, double vz, double vr)
</code>```

which moves the AR.Drone in 3D space and where

vx: X velocity [m/s]

vy: Y velocity [m/s]

vz: Z velocity [m/s]

vr: Rotational speed [rad/s]

I have written an application which does simple image processing on the images obtained from the camera of the drone using OpenCV and finds needed contours of the object to be tracked. See the example below:

Now the part I am struggling is finding the technique using which I should find the velocities to be sent to the move3D function. I have read that common way of doing controlling is by using PID controlling. However, I have read about that and could not get how it could be related to this problem.

To summarise, my question is how to move a robot towards an object detected in its camera? How to find coordinates of certain objects from the camera?


答:
The answer to this question greatly depends on your acceptable error, and budget.

As the other two answers have stated, it is practically impossible to dead-reckon the position without directly observing the position with another sensor; this is however based on assumptions about your acceptable error and IMU selection.

If your acceptable error is large enough, and the time period of which you need operation is small enough, you could possibly estimate the bias of the MEMS sensors as an average measurements during a "calibration" period.

e.g. Don't move the IMU for 5 seconds, record the average accelerations and angular rates, and use that as the bias over the operating period of the next 5 seconds. Do the double-integration for the accelerometer and angular integration (I'd suggest Quaternion integration) for the gyro, but subtract each sensors calculated bias.
I must stress that this will only work for a few seconds for most cheap MEMS IMUs.

Alternatively, if you use an incredibly expensive IMU (e.g. naval IMU, up to $2m, 35 kg) you could probably dead-reckon to within acceptable errors for a substantial time period.

Title: imu position without GPS or camera


问:
Tf frame origin is offset from the actual base_link
I have built my differential drive mobile robot in solidworks and converted that to URDF file using soliworks2urdf converter. I successfully launched and robot and simulated with tele-operation node. Since i am intended to use navigation stack in i viewed the transform of the robot in rviz which resulted as below.

As you can see the base plate is the one which supports the wheels and castors but the tf of base plate is shown away from the actual link and even odom is away from the model. Where have i gone wrong and how to fix this. Refer the URDF of model below.

```<code>    <?xml   version="1.0"?>
<robot
  name="JMbot">
  <link
    name="Base_plate">
    <inertial>
      <origin
        xyz="-0.3317 0.71959 -0.39019"
        rpy="0 0 0" />
      <mass
        value="0.55378" />
      <inertia
        ixx="0.0061249"
        ixy="0.00016086"
        ixz="-8.6651E-18"
        iyy="0.0041631"
        iyz="-1.4656E-17"
        izz="0.010283" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Base_plate.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.74902 0.74902 0.74902 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Base_plate.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="Wheel_R">
    <inertial>
      <origin
        xyz="0.010951 1.1102E-16 -1.1102E-16"
        rpy="0 0 0" />
      <mass
        value="0.45064" />
      <inertia
        ixx="0.00091608"
        ixy="-1.2355E-19"
        ixz="1.0715E-18"
        iyy="0.00053395"
        iyz="-6.7763E-20"
        izz="0.00053395" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Wheel_R.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.74902 0.74902 0.74902 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Wheel_R.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Wheel_R"
    type="continuous">
    <origin
      xyz="-0.14688 0.40756 -0.73464"
      rpy="-2.7127 -0.081268 -3.1416" />
    <parent
      link="Base_plate" />
    <child
      link="Wheel_R" />
    <axis
      xyz="1 0 0" />
  </joint>
  <link
    name="Wheel_L">
    <inertial>
      <origin
        xyz="-0.039049 2.2204E-16 2.498E-15"
        rpy="0 0 0" />
      <mass
        value="0.45064" />
      <inertia
        ixx="0.00091608"
        ixy="-9.6693E-19"
        ixz="-1.7816E-18"
        iyy="0.00053395"
        iyz="1.3553E-19"
        izz="0.00053395" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Wheel_L.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.74902 0.74902 0.74902 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Wheel_L.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Wheel_L"
    type="continuous">
    <origin
      xyz="-0.46668 0.40756 -0.70859"
      rpy="2.512 0.081268 3.4272E-15" />
    <parent
      link="Base_plate" />
    <child
      link="Wheel_L" />
    <axis
      xyz="-1 0 0" />
  </joint>
  <link
    name="Castor_F">
    <inertial>
      <origin
        xyz="2.2204E-16 0 0.031164"
        rpy="0 0 0" />
      <mass
        value="0.056555" />
      <inertia
        ixx="2.4476E-05"
        ixy="-2.8588E-35"
        ixz="1.0281E-20"
        iyy="2.4476E-05"
        iyz="-1.2617E-20"
        izz="7.4341E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Castor_F.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Castor_F.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Castor_F"
    type="continuous">
    <origin
      xyz="-0.31952 0.39256 -0.57008"
      rpy="-1.5708 1.1481 -1.3614E-16" />
    <parent
      link="Base_plate" />
    <child
      link="Castor_F" />
    <axis
      xyz="0 0 1" />
  </joint>
  <link
    name="Castor_R">
    <inertial>
      <origin
        xyz="-1.1102E-16 0 0.031164"
        rpy="0 0 0" />
      <mass
        value="0.056555" />
      <inertia
        ixx="2.4476E-05"
        ixy="0"
        ixz="-3.9352E-20"
        iyy="2.4476E-05"
        iyz="-1.951E-20"
        izz="7.4341E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Castor_R.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jmbot_description/meshes/Castor_R.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Castor_R"
    type="continuous">
    <origin
      xyz="-0.34387 0.39256 -0.86909"
      rpy="1.5708 -0.93144 3.1416" />
    <parent
      link="Base_plate" />
    <child
      link="Castor_R" />
    <axis
      xyz="0 0 1" />
  </joint>

<gazebo>
<plugin name="differential_drive_controller"
    filename="libgazebo_ros_diff_drive.so">
    <leftJoint>Wheel_L</leftJoint>
    <rightJoint>Wheel_R</rightJoint>
    <robotBaseFrame>Base_plate</robotBaseFrame>
    <wheelSeparation>0.235</wheelSeparation>
    <wheelDiameter>0.12</wheelDiameter>
    <publishWheelJointState>true</publishWheelJointState>
    </plugin>
<plugin name="joint_state_publisher"
    filename="libgazebo_ros_joint_state_publisher.so">
    <jointName>Castor_F, Castor_R</jointName>
    </plugin>

</gazebo>

</robot>
</code>```

答:
It looks like most of your parts have no rotation, but some of them do, so I'm going to guess that you didn't mate your assembly to the origin planes in Solidworks.

First, on your base plate, open the Solidworks part file and check that the origin planes run through what you want the origin of the part to be. If they don't and it's a pain to re-draw the part, then go to the "Reference Feature" button and then "Plane" and draw what you want the origin planes to be. SAVE THE PART.

Open your assembly, and check if it says "underdefined" at the bottom. Solidworks (annoyingly) puts the first part down fixed, but not mated, to a random position in the assembly space.

So, in the parts tree, right click the top part (should have (f) after the name, indicating it's fixed), and click "float". You may have to expand the option list to see this.

Now go to Mates, then expand the part list for your base plate, then mate the origin (or reference) planes of your base plate to the origin planes of your assembly space.

You may also need to mate the wheels to prevent them from rotating in order to get the "fully defined" message at the bottom.

I'm on my phone at the moment; I'll add some figures after I get to work.

:EDIT:

Here are some pictures OP provided. I've marked up what I believe to be the error. I think that the URDF Global Origin is set to be the same as the Solidworks assembly origin. In this case, for the robot, the robot (global) origin should be the origin of the Base Plate, but I am betting that the Base Plate is not mated to the assembly origin, so this is causing the discrepancy in the simulation visualization.

:EDIT 2:

Here's a picture walk-through of mating a part to the assembly origin. If you need anything clarified, please let me know in a comment, but if you have a new question about something then please just make a new question (they're free!)


问:
Measuring speed of movement in Webots
I have been experimenting with different fitness functions for my Webots robot simulation (in short: I'm using genetic algorithm to evolve interesting behaviour).

The idea I have now is to reward/punish Aibo based on its speed of movement. The movement is performed by setting new joint position, and currently it results in jerky random movements. I have been looking at the nodes available in Webots, but apart from GPS node (which is not available in Aibo) I couldn't find anything relevant.

What I want to achieve is to measure the distance from previous location to current location after each movement.  How can I do this?

答:
I went to the source (Cyberbotics) and got these 2 solutions:

Aibo has no GPS. And it's not straight forward to add it, because its node hierachy is hidden behind the prototype mechanism. The definition of the Aibo if however open-source:
$WEBOTS/resources/projects/robots/aibo/protos/Aibo_ERS7.proto
GPS can be added to the project (into the protos path) and modified as we wish.
Adding GPS is as simple as adding a GPS node inside the direct children of the Robot node.

A supervisor allows to query the scene tree. This includes getting the position of the Aibo.
This solution is clearer. The following example shows a supervisor retrieving information from the scene tree:
$WEBOTS/projects/samples/devices/worlds/supervisor.wbt

Title: Measuring speed of movement in Webots


答:
Would the answer not just be a make-before-break DPDT relay/toggle controlled by whatever (microcontroller, flight controller, etc.) is monitoring battery voltage? If battery voltage is less than preset limit then toggle. If battery voltage is still less than preset limit then power down.

Use make-before-break (MBB) to ensure there's no gap in voltage supply, and DPDT lets you switch two circuits (charging circuit and load circuit). There would be a moment where both batteries are connected, but I don't know that the momentary connection would have any adverse effects.

Title: Quadcopter Charging


问:
How can this mobile robot rotate so perfectly?
Please have a look at this youtube video.

When this mobile robot operates, the rack (which is said to weight up to 450 kg) can have its Center Of Mass (COM) distributed at any location. For example, this COM can be located 5 or 10 cm off from the center of the robot. Because of this, when the robot revolves, the center of rotation will not be at the center of the robot anymore. However as you see in the video, it can still rotate many circles perfectly around its up-right axis.

So what do you think about this? Is this possible by mechanical design only? Or did they use some kind of advanced feedback control system to counter the effect of the off-center COM?

答:
The youtube video High-Speed Robots Part 1: Meet BettyBot in "Human Exclusion Zone" Warehouses seems to me to better show and explain how the Kiva robots work when moving racks around the warehouse.

Although the video isn't clear enough to say for sure, the bot appears to remain centered beneath the rack, without using an x-y positioning mechanism to compensate for an off-center center of mass axis.  It would be possible to use such a mechanism since the robot doesn't need to rotate 360° after it hooks up; it could get by with turning ±180°.

It looks like the bot's initial spin underneath a rack raises a round connector up from the bot to an attach point on the bottom of the rack.  After that, the bot and the rack are mechanically coupled.  That will make it less significant if the the rack's COM axis is a few cm off-center relative to the attach point.

If COM axis being off-center were still a problem, and no x-y positioning mechanism is used, they could have mechanisms to move weights around or pump water from vertical tubes on one side of a rack to the other side, etc.


答:
If I understand correctly, you are referring to when the robot spins and the rack remains stationary (dynamic motions involving the rack mass seem to be slow as you would expect with such a high COM).

In this case only the kinematics are important. It's important that the rotational axis of the wheels and the rotational axis of the rack-support are colocated. The location of the COM of the robot part of the system is unimportant as long as friction maintains the kinematics.

Title: How can this mobile robot rotate so perfectly?

Body:
Please have a look at this youtube video.

When this mobile robot operates, the rack (which is said to weight up to 450 kg) can have its Center Of Mass (COM) distributed at any location. For example, this COM can be located 5 or 10 cm off from the center of the robot. Because of this, when the robot revolves, the center of rotation will not be at the center of the robot anymore. However as you see in the video, it can still rotate many circles perfectly around its up-right axis.

So what do you think about this? Is this possible by mechanical design only? Or did they use some kind of advanced feedback control system to counter the effect of the off-center COM?


答:
IEEE has a writeup with the general answer about 4/5's down the article.

Your concern about friction and slippage coming from COG offsets (Center of Gravity; COM) is a very good notion.  A simple & potentially incorrect solution is to make the robot's wheelbase as wide as possible and to make the ball screw lift slowly.  A very rigorous approach would be to account for torque and inertia, building a physical model and using Euler's equation (general rigid body dynamics equation).


答: Per the schematics of the UltraSonic Sensor the P1.3/SCL is DIGIAI0 or J1.5 and P3.0/SDA is DIGIAI1 or J1.6. And the developer Kit Manual states it is I2C as per philips original standard, detailing all the memory address's of the ESC015 chip and with all the recommended interfacing circuitry. The only note that I see is that they state the I2C's SCL is 9600. Kind of slow. But all very do-able for an Arduino. check out http://www.openelectrons.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=7 as they have a shield to directly connect and libraries for the Arduino.</p>

Title: Would is be possible to connect a HiTechnic prototype board to an Arduino?

Body:
Does anyone know if this is possible? It's just an i2c device right? I mean you would have to cut the cable and make it so you could plug into the pins on the Arduino but you should just be able to use the wire library and say something like.

```<code>Wire.beginTransmission(0x10);
</code>```

the NXT hardware developers kit tells you what pins are which http://mindstorms.lego.com/en-us/support/files/default.aspx

Thanks

EDIT. Turns out this is very possible. The main problem was that HiTechnic says the address is 0x10 and it is actually 0x08 but here is a short sketch that reads and prints some into about the device, i.e. the manufacturer and version.

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

#define ADDRESS 0x08

void setup()
{
  Wire.begin();
  Serial.begin(9600);
}

void loop()
{
  readCharData(0, 7);
  Serial.println();
  readCharData(8, 8);
  Serial.println();
  readCharData(16, 8);
  Serial.println();

  Serial.println("-----------------------------");

  delay(1000);
}

void readCharData(int startAddress, int bytesToRead)
{
  Wire.beginTransmission(ADDRESS);
  Wire.write(startAddress);
  Wire.endTransmission();

  Wire.requestFrom(ADDRESS, bytesToRead);

  while(Wire.available())
  {
     char c = Wire.read();
     Serial.print(c);
  }
}
</code>```


问:
Can i use DC Brushed motors for building a drone?
I want to make a drone. But my budget is very low. Brushless motors are very expensive. I want use the Brushed CHEAP ones. can i us them ?</p>

答:
Most cheap small multirotors use use brushed motors.

Some examples:

http://www.banggood.com/Cheerson-CX10-CX10-Mini-24G-4CH-6-Axis-LED-RC-Quadcopter-RTF-p-926614.html

http://www.banggood.com/Eachine-H8-Mini-Headless-Mode-2_4G-4CH-6-Axis-RC-Quadcopter-RTF-p-975808.html

The drawback with brushed motors is that they are much less efficient and can produce less torque. Thus, they have to run at a much higher RPM in order to produce sufficient power.
I think you will find that it will be harder to manage crisp control of your multirotor with brushed motors.


问:
Dynamic simulation of compliant elements in quadruped robot
I have a preliminary design for a legged robot that uses compliant elements in the legs and in parallel with the motors for energy recovery during impact as well as a pair of flywheels on the front and back that will oscillate back and forth to generate angular momentum. I'd like to create a dynamic simulation of this robot in order to be able to test a few control strategies before I build a real model. What simulation package should I be using and why?

I have heard good things about MSC Adams, namely that it is slow to learn, but has a lot of capability, including integration with matlab and simulink. I have also heard about the simmechanics toolbox in matlab, which would be nice to use since I already am decent with CAD and know the matlab language. I am not yet familiar with simulink, but have used Labview before.

答:
As I understand from your case is I think you need to do multibody dynamics (major part for any robot simulation) and some flexible body simulation in dynamics (for compliant parts)
You have learnt write about MSC Adams capabilites.
Follow this link:
http://www.mscsoftware.com/product/flexible-multibody-systems-adams
Your concept can be simulated with Adams View and Flex. The only downside for beginners is Adams's vastness.

MatLAB has very limited features for your case.


问:
How to find center of a disk using robotic arm
Hello I am new to the field of robotics but have some knowledge of raspberry pi, arduino, python.
I want to make Robotic arm which can be used to find the centre of any disk.
There may be disk of different diameter coming one after another on conveyor.
I need to make hole at the center of disk using robotic arm. How can I do this ?
What techniques and sensors I should use to implement the mechanical and electronic part.
(I don't want to use camera and openCV). Thanks in advance.

答:
In this case the precision is the most important factor.

industrial robots have typically a precision of 0.1 mm.  If you are building one without in depth machine design and manufacturing experience, it is expected that the precision for your robot arm will not be as good.

Instead of a robot arm I would recommend a portal type structure. Much easier to build from COTS components.

If the disks are round (enough) you can use a distance sensor (laser or ultra sound depending in the material/coating you are trying to measure) at the side of the conveyor belt. As soon as the disk passes the sensor you can see how the radius is changing, if you know the velocity of your conveyor belt you can calculate the radius and then the center of the disk. Will be a bit trick if the conveyor belt stops and moves in the middl of a measurement but passing the disk in front of the sensor and knowing the velocity of the conveyor gives you enough measurments to eliminate noise.

Just wait until the center is under your portal tool on the conveyor belt (the disance to the sensor is constant) then move the tool to the center and drill.


问:
Need the uav to perform a circle turn
I've got a project that will require my drone to perform a circle turn while the drone is always facing the tangent of the turning curve. Similiar to a car that is performing a frictionless banked turn.
Just wondering which method should i use to achieve it, the throttle control can be ignored since i already have a pid on height control.

Any suggestions would be appreciated.

答:
A possible approach would be to construct a virtual potential field, which is tangent to your desired circle and use it for reference (target) orientation (yaw angle).

There is an algorithm for a plane here: Beard, R., & McLain, T. (2012). Small unmanned aircraft: Theory and practice, Ch. 10.2

Title: Need the uav to perform a circle turn


答:
Check out this link.

It is about a Matlab Toolbox by Roy Featherstone, author of the book Rigid Body Dynamics Algorithms.

It can be used for robot with contacts, like in your case. I don't know if it can be extended to compliant elements.

Title: Dynamic simulation of compliant elements in quadruped robot

Body:
I have a preliminary design for a legged robot that uses compliant elements in the legs and in parallel with the motors for energy recovery during impact as well as a pair of flywheels on the front and back that will oscillate back and forth to generate angular momentum. I'd like to create a dynamic simulation of this robot in order to be able to test a few control strategies before I build a real model. What simulation package should I be using and why?

I have heard good things about MSC Adams, namely that it is slow to learn, but has a lot of capability, including integration with matlab and simulink. I have also heard about the simmechanics toolbox in matlab, which would be nice to use since I already am decent with CAD and know the matlab language. I am not yet familiar with simulink, but have used Labview before.


问:
Canny's Roadmap Algorithm
Where can I find a general implementation of Canny's Roadmap Algorithm(or Silhouette Method) for Robot Motion Planning?</p>

答:
Well, you probably can't. The reason is Canny's follows 3 basic steps.

Collect a bunch of points in the environment and connect all the points
that have a free path between them

Connect start and end to this graph

Do some kind of path planner on this graph, e.g., Dijkstra.

So, for different evironments, step 1 takes wildly different forms. In 2D, this might be a visibility graph. In 3D, there isn't really a good algorithm for constructing the graph so you might sample. In higher dimensions, it's even worse.

But, if you are comfortable implementing Dijkstra, then implementing 1 and 2 are pretty close in difficulty. You may have to do this homework assignment on your own.

Title: Canny's Roadmap Algorithm


问:
How do I simulate an assembly line?
I need to simulate a stream of vehicles, such as on an assembly line. Automatons are performing operations on the vehicles when they come within reach.  The automatons do not keep track of the individual vehicles, they simply collect data.

We need to choose a method of matching the data gathered by each automaton with the vehicle it belongs to.  For example, we could guess the identity of a vehicle using its timing when arriving in the operation range (sensors) of an automaton.

I have to check the possible problems we will face, so I would like a little (hopefully simple) video/simulation tool that I could play with.

vehicles could be symbolized has moving black squares

automatons/sensors could be static points or circles.

it should be possible to change the time interval between two vehicles, and their speed, and add some random delays.

What kind of software should I search for, or where should I look?

Should I consider to developing it from scratch?

答: As a child I had a copy of a software called "SPS Visu" where you could do such simulations. (I thought it was a game and sure ha a lot of fun with it :D) Maybe this is what you are looking for?</p>

Title: How do I simulate an assembly line?


问:
Figure out PID values from drone specs
I have all the specs from a quadcopter, everthing, would it be possible to figure out the pid from those specs?</p>

答:
Generally, no. You'd have to evaluate the system and do some system identification. The reason being that even though you know the specs, you don't know how the system will respond to perturbations or errors in manufacturing, etc.

Once you've done some system identification to figure out response curves, you can tune the parameters using the guide in the comment (or here).

Another method is to just fly it around a set point and observe its behavior, though I think that's not the best solution.

Title: Figure out PID values from drone specs


问:
Quadcopter PID Control: Is it possible to stabilize a quadcopter considering only angle measurements?
Good day,

I am a student currently working on an autonomous quadcopter project, specifically the stabilization part as of now. I am using a tuned propeller system and I also already considered the balancing of the quadcopter during component placements. I had been tuning the PID's of my quadcopter for the past 3 1/2 weeks now and the best I've achieved is a constant angle oscillation of the quadcopter by +-10 degrees with 0 degrees as the setpoint/desired angle. I also tried a conservative 7 degrees setpoint with the same results on the pitch axis.

As of now my PID code takes in the difference of the angle measurement from the complementary filter ( FilteredAngle=(0.98)*(FilteredAngle + GyroAngleVel*dt) + (0.02)*(AccelAngle) ) and the desired angle.

I have read somewhere that it is IMPOSSIBLE to stabilize the quadcopter utilizing only angle measurements, adding that the angular rate must be also taken into consideration. But I have read a lot of works using only a single pid loop with angle differences (Pitch Yaw and Roll) as the input.

In contrast to what was stated above, I have read a comment from this article (https://www.quora.com/What-is-rate-and-stabilize-PID-in-quadcopter-control) by Edouard Leurent that a Single PID control loop only angle errors and a Cascaded PID loop (Angle and Rate) that utilizes both angle errors and angular velocity errors are equivalent Mathematically.

If I were to continue using only the Single PID loop (Angle) method, I would only have to tune 3 parameters (Kp, Ki & Kd).

But if I were to change my code to utilize the Cascaded Loop (Angle and Angular Velocity),

Would I have to tune two sets of the 3 parameters (Kp, Ki & Kd for angle and Kp, Ki & Kd for the angular velocity)?

Would the cascaded PID control loop give better performance than the single PID control loop?

In the Cascaded Loop, is the set point for the angular velocity for stabilized flight also 0 in deg/sec? What if the quadcopter is not yet at its desired angle?

Thank you :)

答:
How are you managing to get any angle from the code you posted, filter = (0.98*gyro*dt + 0.02*accel)? Gyro output is in $\mbox{deg}/s$, where acceleration is $\mbox{deg}/s^2$. When you multiply gyro times time, you get an angle unit, $\mbox{deg}$, (not an angle, see below) but then you're adding that to an acceleration, which doesn't have the correct units.

Also, for the gyro portion, you're just getting to the correct units. Angular position is the integral of angular velocity, meaning that you have to sum those gyro*dt segments to accumulate an angle. Otherwise all gyro*dt gives you is the angle that you moved in the last time interval dt.

Can you check if your code matches what you wrote in the question and then update the question?

:EDIT:

My question wasn't about how you're calculating the accel values, but instead about how you're implementing the filter. In your update, the filter calculation is still incorrect.

Now, instead of getting your gyro output to angular position units, you've gone the other way and gotten to angular acceleration units. Worse, you're also now accumulating that acceleration, which doesn't make sense.

What you should have somewhere in the initialization portion of your code is:

```<code>gyro<AXIS>Position = 0;
accelerometer<AXIS>Position = 0;
accelerometer<AXIS>Velocity = 0;
</code>```

Then, in your loop, update the accelerometer-based angular velocity by numerical integration:

```<code>accelerometer<AXIS>Velocity = accelerometer<AXIS>Velocity + accel<AXIS>*dt;
</code>```

Next, numerically integrate the gyro angular velocity and the accelerometer-based angular velocity:

```<code>accelerometer<AXIS>Position = accelerometer<AXIS>Position + accelerometer<AXIS>Velocity*dt;
gyro<AXIS>Position = gyro<AXIS>Position + gyro<AXIS>*dt;
</code>```

Finally, you can fuse those two readings with your complementary filter:

```<code>blend = 0.98;
filter = blend*gyro<AXIS>Position + (1-blend)*accelerometer<AXIS>Position;
</code>```

Body:
How are you managing to get any angle from the code you posted, filter = (0.98*gyro*dt + 0.02*accel)? Gyro output is in $\mbox{deg}/s$, where acceleration is $\mbox{deg}/s^2$. When you multiply gyro times time, you get an angle unit, $\mbox{deg}$, (not an angle, see below) but then you're adding that to an acceleration, which doesn't have the correct units.

Also, for the gyro portion, you're just getting to the correct units. Angular position is the integral of angular velocity, meaning that you have to sum those gyro*dt segments to accumulate an angle. Otherwise all gyro*dt gives you is the angle that you moved in the last time interval dt.

Can you check if your code matches what you wrote in the question and then update the question?

:EDIT:

My question wasn't about how you're calculating the accel values, but instead about how you're implementing the filter. In your update, the filter calculation is still incorrect.

Now, instead of getting your gyro output to angular position units, you've gone the other way and gotten to angular acceleration units. Worse, you're also now accumulating that acceleration, which doesn't make sense.

What you should have somewhere in the initialization portion of your code is:

gyro<AXIS>Position = 0;
accelerometer<AXIS>Position = 0;
accelerometer<AXIS>Velocity = 0;

Then, in your loop, update the accelerometer-based angular velocity by numerical integration:

accelerometer<AXIS>Velocity = accelerometer<AXIS>Velocity + accel<AXIS>*dt;

Next, numerically integrate the gyro angular velocity and the accelerometer-based angular velocity:

accelerometer<AXIS>Position = accelerometer<AXIS>Position + accelerometer<AXIS>Velocity*dt;
gyro<AXIS>Position = gyro<AXIS>Position + gyro<AXIS>*dt;

Finally, you can fuse those two readings with your complementary filter:

blend = 0.98;
filter = blend*gyro<AXIS>Position + (1-blend)*accelerometer<AXIS>Position;


问:
What's the most accurate way to obtain a locational fix using GPS?
Obviously GPS is the most obvious and accessible technology for obtaining a locational "fix" for a robot at any particular time. However, while it's great sometimes, in other locations and situations it's not as accurate as I'd like, so I'm investigating whether there's a relatively easy way to improve on this accuracy (or not, if that turns out to be the case.)

I've considered the following options, but found limited information online:

Would using a much better antenna help, especially for low signal areas? I'm thinking yes to this, but if so how would I construct such an antenna and know that it's an improvement? Are there any good guides on how to do this? I could use a ready made antenna if they're not too expensive.

Would using multiple separate receivers in tandem help, or would they likely all be off by a similar amount, or would I not be able to extract a meaningful average with this approach?

What sort of characteristics should I look for when choosing a good GPS receiver to help accuracy?

Is there anything else I should consider which I've missed?

答:
As other posters have pointed out, using some form of differential GPS will give you large improvements in precision. We have used the Magelan mb500 commercial platform and it claims an accuracy of around 2-3 cm when in RTK fix mode. However, in areas of bad satellite coverage it would sometimes not even provide a solution at all, where cheap GPS receivers in a phone could. </p>

<p>There is an open source library called RTKLib which looks very promising for using cheap GPS equipment with a number of different methods for improving the precision. </p>

Body:
As other posters have pointed out, using some form of differential GPS will give you large improvements in precision. We have used the Magelan mb500 commercial platform and it claims an accuracy of around 2-3 cm when in RTK fix mode. However, in areas of bad satellite coverage it would sometimes not even provide a solution at all, where cheap GPS receivers in a phone could.

There is an open source library called RTKLib which looks very promising for using cheap GPS equipment with a number of different methods for improving the precision.


问:
Building Robotic arm joint
I am very new to robotic design and I need to determine what parts I will need to assemble an arm joint.  The joint will contain one timing belt pulley which a remote motor will be turning, a forearm that the pulley will be rotating and an upper-arm piece that will actually be two parallel arms that will grip the pulley on top and bottom in order to brace the pulley from off axis torque from the timing belt.

I am kind of at a lost as to how to mount all of these together.  I would like to mount the forearm directly to the pulley and then the two parallel arms (comprising the upper-arm) sandwich the top of the pulley and the lower part of the forearm.  This would be attached using a turn table.  Any ideas on how a shaft would mount to these?  Or how to attach the pulley to the arms themselves?

Any kind of direction or links would be greatly appreciated, I don't even know the names of the parts I would be looking for.

In this ASCII art model the dashed lines (-) are the arms.  The arm on the left is the forearm and the two arms on the right are the two parallel parts of the upper arm.  The stars are the belt and the bars (||) are the pulleys at the elbow |E| and shoulder |S|.

```<code>              -----------------
              |E|***********|S|
-----------------
              -----------------
</code>```

I am thinking of mounting the pulley to the left arm directly (a bushing?) and then maybe using turntables to mount the pulley to the top arm and another turn table to mount the left arm to the bottom arm.

Here is a picture of the design to help you visualize:

答:
This looks very much like a simplification of a traditional SCARA robot design.

It is a nice simple design in which the weight bearing axes are all nicely horizontal, which means these axes behave similarly irrespective of the load weight. The only downside of this design is that the some positions can only be accessed from a left handed configuration, some can only be accessed from a right handed configuration and some can be accessed from either (which can cause problems with the higher level control).

The normal nomenclature for these joints are that the upper arm is between the shoulder axis and the elbow, so that is what I will call these joints below.

If you want the elbow pulley to turn the lower arm then you need to use either a fixed shaft or drive shaft:

With a drive shaft you bolt the pulley and the lower arm to the shaft and set the shaft in bearings on the end of the upper arms. Torque is transmitted from the belt to the lower arm through the drive shaft.

This route is easier, since both pulley and arm are probably designed to do this.

With a fixed shaft you bolt the shaft rigidly between the upper arms, mount both the lower arm and the pulley on bearings, then fix the pulley to the lower arm directly.

This design could allow the upper arm to be much more rigid, which might be a concern if you are worried about the strength of your upper arm.

The shoulder joint has similar options, but is complicated by the fact that you not only need to transmit torque to the lower arm, but you also have to turn the upper arm too. Now you have several options:

Use the shoulder shaft as a drive shaft, fix it to both halves of the upper arm, and use the shaft rotation to drive the upper arm, then use a fixed shaft mechanism to drive the lower arm pulley (this extra joint will be freely rotating on the upper arm drive shaft).

This is probably the easiest option.

Use the shoulder shaft as a drive shaft, but fix it to the lower arm pulley, and use the shaft rotation to drive the lower arm, then use a fixed shaft mechanism to mount and drive the upper arm.

The problem with this option is that unless you add a fixed shaft shoulder mechanism for both halves of the upper arm, you may end up twisting the arm when you apply torque to one half but not the other, a problem which is even more likely if you opted for a drive shaft elbow mechanism.

Fix the shoulder shaft to the base, and use a fixed shaft mechanism to drive both upper and lower arms.

Again, this might give you a slightly stronger robot overall, but has the same problem with regard to driving both halves of the upper arm.

It is this extra complexity which is why a single heavier duty upper arm might be preferable to increasing the strength of the upper arm by doubling up two lighter arms which are allowed to move (slightly) independently of each other.

Another alternative to remove the need to transmit the elbow torque through the shoulder axis is to mount the lower arm motor on the upper arm. Thus you can treat upper and lower arms as mechanically independent systems, and your design decision for one won't have ramifications for the other.

Title: Building Robotic arm joint


问:
SLAM : Why is marginalization the same as schur's complement?
Consider the system
$$
\tag 1
H\delta x=-g
$$
 where $H$ and $g$ are the Hessian and gradient of some cost function $f$ of the form $f(x)=e(x)^Te(x)$. The function $e(x)=z-\hat{z}(x)$ is an error function, $z$ is an observation (measurement) and  $\hat{z}$ maps the estimated parameters to a measurement prediction.

This minimization is encountered in each iteration of many SLAM algorithms, e.g.one could think of $H$ as a bundle adjustment Hessian. Suppose $x=(x_1,x_2)^T$, and let $x_2$ be some variables that we seek to marginalize. Many authors claim that this marginalization is equivalent to solving a smaller liner system $M\delta x_1=-b$ where $M$ and $g$ are computed by applying Schur's complement to (1), i.e. if
$$H=
\begin{pmatrix}
H_{11} & H_{12}\\
H_{21} & H_{22}
\end{pmatrix}
$$
then
$$
M=H_{11}-H_{12}H_{22}^{-1}H_{21}
$$
and
$$
b=g_1-H_{12}H_{22}^{-1}g_2
$$

I fail to understand why that is equivalent to marginalization... I understand the concept of marginalization for a Gaussian, and I know that schur's complement appears in the marginalization if we use the canonical representation (using an information matrix), but I don't see the link with the linear system.

Edit: I understand how Schur's complement appears in the process of marginalizing or conditioning $p(a,b)$ with $a,b$ Gaussian variables, as in the link supplied by Josh Vander Hook. I had come to the same conclusions, but using the canonical notation: If we express the Gaussian $p(a,b)$ in canonical form, then $p(a)$ is gaussian and its information matrix is the Schur complement of the information matrix of $p(a,b)$, etc. Now the problem is that I don't understand how Schur's complement appears in marginalization in bundle adjustment (for reference, in these recent papers: c-klam (page 3 if you want to look) and in this (part titled marginalization). In these papers, a single bundle adjustment (BA) iteration is performed in a manner similar to what I initially described in the question. I feel like there is a simple connection between marginalizing a Gaussian and the marginalization in BA that I am missing. For example, one could say that optimizing $f$ (one iteration) is equivalent to drawing a random variable following a denstiy $$e^{-\frac{1}{2}(x-\mu)^T\Sigma^{-1}(x-\mu)}$$  where $\Sigma$ is the inverse of the Hessian $H$ of $f$, and $\mu$ is the true value for $x$ (or an approximation of that value), and that marginalizing this density is equivalent to using Schur's compelement in the bundle? I am really confused...

答:
See the walk-through

The Schur complement helps with the closed form derivation but isn't necessary. It's just a nice convenient property of Gaussians and the covariance matrices.

In these papers, a single bundle adjustment (BA) iteration is performed in a manner similar to what I initially described in the question.

The reason the marginal / schur complement appears over and over is that all of the objective functions, noise models, and (in some sense) optimization methods are the same.

All the problems attempt to find a vector $x$ which maximizes the likelihood of the observations $z=h(x)+\eta $ where $\eta$ is some Gaussian noise. $h(x)$ is often not linear, but we linearize it so that $h(x)\approx h(x)+H_x(a-x) $ where (sorry for abusing notation), $H$ is the Jacobian.

I feel like there is a simple connection between marginalizing a Gaussian and the marginalization in BA that I am missing.

Everyone and their mother assumes that the noise in the observation $z$ is Gaussian. If you construct the Gaussian noise terms, you'll find something like $e^{ (z-h(\hat{x}))^T\Sigma^{-1}(z-h(\hat{x}) )}$ (modulo the denominator).

However, this isn't the only formulation. We can also minimize the error (difference in observations and state estimate). A careful look reveals that maximizing the likelihood of the observations is equivalent to finding a vector $x$ which minimizes the error $\eta=z-h(x)$.

Thus, minimizing the mean squared error $(\eta^T\eta)$ is the same as finding $x$ which maximizes the likelihood of the observations $z$. Thus, minimizing mean squared error and maximizing Gaussian observation likelihood results in the same objective function.*

If we substitute our linear approximation, we need to minimize

$$J=(z-h(x)+H_x(a-x))^T(z-h(x)+H_x(a-x))$$

If you multiply that out, and minimize by taking the derivative, you get the solutions you showed above. This is the same across any ML estimation of a state vector given Gaussian noise.  The difference in various estimation methods is summarized as follows, as best as I know.

The EKF does only one optimization step, and uses only the last measurement and the current state approximation

Other methods, like IteratedEKF use many iterations of the solution, but only use the most recent measurement

If you can afford to use more than one measurement, you've arrived at a larger state (one copy of the state vector for each time step, and a stacked vector of observations). Doing this optimization over this larger state is what BA does, but is also known as Iterative Weighted Least Squares. More generally, these are batch estimators.

What's nice in the computer vision world, is that a huge state vector and observation vector have independent components (because a camera cannot see all parts of the world at all time). This structure is exploited to find what is classically known as Bundle Adjustment.

If you wish to discard the Gaussian noise assumption and evaluate a larger space of possible soutions, you can use sampling based methods. However, almost all sampling based methods I'm aware of sample $x$ (the state), and run one of the above estimators for each $x$ using the observations, then find the posterior probability that the sample you drew was correct.

For example, one could say that optimizing ff (one iteration) is equivalent to drawing a random variable following a density ...

Here you're a bit off. That's not correct that we're drawing samples, but it is correct that by trying to minimize error, we're actually maximizing likelihood of the Gaussian. This is how the error minimization objective of BA, the Gaussian noise model (and resulting appearance of a marginalization i.e., schur complement), and general slam frameworks are all related. They're the same, just found by different methods across different disciplines. Isn't research great?

*Kinda. In this derivation it does, but we do assume that the observation noise is Gaussian to arrive there. It's a difference in starting point, not path.


问:
Need help for a quadcopter PID
I'm trying to make a quadcopter with Arduino.
I already have the angles (roll pitch and yaw) thanks to an IMU. They are in degrees and filtered with a complementary filter.
I want to apply a PID algorithm for each axis but I dont know if the inputs should be angles (degrees) or angular velocities in degrees per second so as to calculate the errors with respect referencies.
Which will be the difference? Which will be the best way?

Finally, another question about a PID code: I have seen that many people don't include time in their codes. For example, their derivative term is kd×(last error-actual error) instead kd×(last error-actual error)/looptime and something similar with the integrative term. Which is the difference?

Thank you in advanced.

答:
I have seen three implementations of PID controllers for quadcopters.

Single PID control loop using only angle errors. (What I am currently using). I have heard people using this method with success. Example is this thread: ht tps://www . quora.com/What-is-rate-and-stabilize-PID-in-quadcopter-control.

Very intuitive since you are only assigning angle setpoints.

I have seen in my best tunings that there are still oscillations present which is about +-10degrees from the setpoint angle of zero. Though that is probably due to my lack of experience.

Cascaded PID control loop using angular velocity for the Rate PID block and angle errors for the Stab (Stabilization) PID block. This is the most common implementation I've seen upon reading but I have difficulties in trying to find a suitable setup for tuning the Rate PID block since you are setting angular velocities instead of angle. (Will the same string on one axis setup suffice?)

EDIT: It is possible to "tune" the rate loop in the cascaded controller by setting first the angular velocity setpoint to zero and setting the inner loop PID gains until the quadcopter resists any change in motion (The quadcopter should when physically placed at any angle should resist motion or maintain that angle). After that a P-gain in the outer PID loop that would be responsible in translating the required angular velocity command to the inner PID loop to attain the user set angle setpoint/target from the outer PID loop

I have read in https://controls.engin.umich.edu/wiki/index.php/CascadeControl that cascaded control loops are used for their more responsive nature.

The inner rate PID loop is for control in high frequencies while the outer loop is for lower frequencies

Additive PID control loop (What I'll be trying next)

I have seen this implementation in the work for my senior who was creating a stabilization control for her quadcopter.

She said that the Rate PID block is used to control sudden jerks while the quadcopter was hovering. She used only P and D.

However the quadcopter becomes unstable after 15 seconds of hovering due to tipping to one side possibly due to the lack of yaw control.

Regarding your question about PID controllers, you do need to take the loop time of your code into consideration. Here's a great read: http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/

Title: Need help for a quadcopter PID


问:
Real-time GY-85 IMU sensor interfacing with Simulink
How do I read real time values from the GY-85 IMU sensor at Simulink connected via Arduino? Also, I intend to interact with the Virtual Reality environment at Simulink using this GY-85 IMU sensor.
Is this possible?
How do I make MATLAB read real time values from this GY-85 IMU sensor connected to Arduino via I2C communication ?
Please help!</p>

答:
Interfacing with Simulink has sometimes been a pain, I've developed a method to simplify it by putting a middle-man app between the arduino and Simulink:

Read the IMU data from the Arduino and print it in comma delimited
ASCII

This Arduino library can help you with reading the IMU from the Arduino.

Your Arduino application would simply read from the IMU, and send the data over serial or TCP/IP.

Read the ASCII string, convert it to a known binary structure and publish it on a TCP/IP port.

An excellent utility to do this is 'csv-to-bin' and 'io-publish' from the comma library.

An example command-line would be "cat /dev/ttyACM0 | csv-to-bin 9f | io-publish tcp:9000", which would read from the serial device /dev/ttyACM0 (assuming you're on linux) then convert the comma-delimited string to a binary struct consisting of 9 floats, then publish it on TCP port 9000.

In Simulink, use the TCP read block with the binary structure you selected.

In your Simulink model you can use blocks from the Instruments Control Toolbox to read the data. You must set the data types and sizes in the structure being read.

The advantage of using ASCII in step 1 is that you don't have to worry about the binary representation of the data when reading from the IMU or Arduino, and you can then explicitly convert that data into your selected binary structure for reading with Simulink.


问:
How a 3d printer moves the header vertically in a MakerBot printer
I would like to know how the header in this MakerBot printer moves in the vertical up /down direction.  Is there a detailed explanation of it including the parts involved?

答: The printing head does not move in z. The table an the printed model are moving. </p>


问:
How do I create a portable solar panel lipo charger?
We're working on a quadcopter that will carry a solar panel on top that will continually charging the lipo battery of the quad. What's the smallest and easiest way to recreate a charger that will allow safe charging for the lipo battery?</p>

答:
I don't know of any application where the LiPo is charged and discharged at the same time. It might not be a good idea, due to the delicate charging cycle procedure that LiPos require.

Have you run a power consumption analysis with the given solar panel figures, to see if it is worth the effort? I suspect that the net power profit will be negative, due to the increased system weight and complexity.


答:
Make sure you understand Lithium Ion battery safety before proceeding.

Lithium Ion batteries have limits on charging current and charging voltage. The typical charging technique is to provide the maxiumum charging current until max charging voltage is reached, then provide the max charging voltage until current drops to zero.

If you can find a solar cell array with Isc less than the battery max charging current and Voc at the max charging current you might be able to hook the solar array directly to the battery.

Otherwise, a DC-DC converter between the array and the battery which will convert the array voltage to max charging voltage, with a max current that matches the max charging current of the battery. You'll loose 15% of your energy though.

If you don't have an electrical engineer (or student of EE) on your team, go find one.

Title: How do I create a portable solar panel lipo charger?

Body: We're working on a quadcopter that will carry a solar panel on top that will continually charging the lipo battery of the quad. What's the smallest and easiest way to recreate a charger that will allow safe charging for the lipo battery?</p>


问:
How to interpret the result of image rectification?
I've been trying to understand image rectification. Most of the time the result of image rectification is illustrated by the original image (i.e the image before rectification) and the rectified image, like this:

The original image:

The rectified image:

To me the original image makes more sense, and is more 'rectified' than the second one. I mean, why does the result of rectification looks like that? and how are we supposed to interpret it? what information does it contain?
An idea has just dawned on me : could it be that this bizarre shape of the rectified image is dependent on the method used for rectification, because  here polar rectification was used (around the epipole)?

答:
In Stereo Vision, image rectification is used to "warp" (remap the pixels using the translation, rotation, fundamental matrices computed from camera calibration) the image to remove distortions introduced in camera lenses and horizontally align pixels in the left and the right images to satisfy the epipolar constraint so that when stereo matching is performed, only a horizontal search in one row of the image is needed when finding the respective matches speeding up the process.

Your result is probably due to the camera calibration errors (Errors in obtaining the required mapping matrices (Intrinsic and Extrinsic Camera Parameters) ). Try to get the reprojection error as low as possible. In my case it took me a whole day or two to get the rectification right.

Try reading this: http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html


问:
How to find kinematics of differential drive caster robot?
I'm working on a little project where I have to do some simulations on a small robot.

I my case I'm using a differential-drive robot as one of the wheels of a bigger robot platform (which has two differential-drive casters), and I really do not understand how to find its kinematics in order to describe it in a model for finding the speed V_tot of the platform.

This is my robot and I know the following parameters

d is the distance between a joint where my robot is costrained

blue point is the joint where the robot is linked to the robot platform

L is distance between the wheels

r the radius of the wheel

the robot can spin around the blue point and with and THETA angle

As I know all this dimensions, I would like to apply two velocities V_left and V_right in order to move the robot.

Let's assume that V_left = - V_right how do I find analitically the ICR (Istantaneous Center of Rotation) in this costrained robot?

I mean that I cannot understand how to introduce d in the formula.

答:
Well, if it is truly a caster wheel with two differential drives, then I'd just assume that the castor is not a constraint at all!

It's a freely rotating wheel that should just follow the direction of motion induced by rotating the differential wheels. In that case, you can use this answer.


答:
If you assume pure kinematics (no slipping) your ICR must be where the two wheel axis cross, or for the degenerate case where they are colinear, then somewhere along the line.

If you use a dynamic approach, you'll need to estimate mass distribution and ground friction but you'll get a model that's easier to work with.

You'll get better answers if you draw the full diagram with both sub-units and the connecting link, if there is one.

Title: How to find kinematics of differential drive caster robot?

Body:
I'm working on a little project where I have to do some simulations on a small robot.

I my case I'm using a differential-drive robot as one of the wheels of a bigger robot platform (which has two differential-drive casters), and I really do not understand how to find its kinematics in order to describe it in a model for finding the speed V_tot of the platform.

This is my robot and I know the following parameters

d is the distance between a joint where my robot is costrained

blue point is the joint where the robot is linked to the robot platform

L is distance between the wheels

r the radius of the wheel

the robot can spin around the blue point and with and THETA angle

As I know all this dimensions, I would like to apply two velocities V_left and V_right in order to move the robot.

Let's assume that V_left = - V_right how do I find analitically the ICR (Istantaneous Center of Rotation) in this costrained robot?

I mean that I cannot understand how to introduce d in the formula.