答:
Let's assume you do a motor on the crank shaft rather than on the hub.

When you step on the pedal/crank it's approximately the mass of your body doing all the work.

$Torque(\tau)=Force*Distance$, $Force=mass*Acceleration$

$mass:=70Kg$, $Acceleration:=9.8\frac{m}{s^2}$, $Distance:=0.2m$

$\tau=70\times9.8\times0.2 \implies140Nm$ of torque for a motor to provide the same torque that you do.

$Power=Torque*Speed(in \frac{radians}{sec})$

Cranking the pedals a full turn each second is reasonable.

$1\frac{rotation}{sec}=\frac{2\pi\space radians}{sec}=\frac{6.28\space radians}{sec}$

So, $140Nm\times6.28\frac{radians}{sec}\implies 880Watts$

This is a peak, you would get tired very quickly pedalling this hard, (think about how long you can climb stairs at 2 per second). Average human power is closer to 100W.

So now you have some numbers. You don't need more than 140Nm peak torque, and around 900W power. (Laws usually restrict you to less than this power). Let's say that you just want some power assist. 30Nm and 50W of power might be ok.

I have no idea which motor you were looking at; here's one at random in the £30 range. Let's estimate the torque it will produce. The motor constant kv tells us a lot. Not only is it an estimate of the backemf (ie how many volts per rpm the motor generates when it's spinning), the inverse of the same consant is an estimate of how much torque per amp is produced.

$kv\implies \frac{Volts}{\frac{rotations}{min}}\implies\frac{Volts}{\frac{2\pi\space radians}{60sec}}\implies\frac{60}{2\pi}\frac{Volts}{\frac{radians}{sec}}\implies\frac{Volts}{\frac{radians}{sec}}=\frac{2\pi}{60}kv$

$\frac{Volts}{\frac{radians}{sec}}=\frac{1}{\frac{Nm}{Amp}}\implies\frac{Nm}{Amp}=\frac{1}{\frac{Volts}{\frac{radians}{sec}}}=\frac{60}{2\pi kv}$

That motor has a kv of 335$\frac{rpm}{V}$ so it's torque constant is about .028$\frac{Nm}{Amp}$ and it has a max current of 28A so it's maximum torque is 0.78$Nm$

So you would need around 40:1 gearing to get the torque into the range we want.

So even though the motor seems to have enough power, to amplify the torque to be useful, you will need gearing.

I agree with @user241585 it's much easier to use kits designed for bicycles to start with. A company I've been happy with and is relatively cheap is golden motor.

Title: Running a cycle on brushless outrunner motors?

Body:
Is it possible to convert a cycle into an electric bike by using brushless outrunner motors that usually are for RC planes, multicopter, helicopter, etc?

If it is possible, what specs do my motors need to be to provide enough power to bring my cycle to speed?

Will I need a gear system?


问:
Fit robot simulator to robot
I have odometry data $(x, y, angle)$ of a real two-wheeled robot, who received control commands $(forward speed, angular speed)$.

Now I want to code a motion model (in C++ (/ROS)) which should follow the same trajectory, given the same control commands.

Normally, the kinematics should look something like this:

$$
\begin{align}
v_{fwd} &= control_{fwd} \\
v_{ang} &= control_{ang} \\
x &= x_{old} + 0.5(control_{fwd} + v_{fwd,old}) * \cos(angle) * dt \\
y &= y_{old} + 0.5(control_{fwd} + v_{fwd,old}) * \sin(angle) * dt \\
angle &= angle_{old} + 0.5(control_{ang} + v_{ang,old}) * dt
\end{align}
$$

And I thought about just setting

$$
\begin{align}
v_{fwd} &= control_{fwd} + k_1 v_{fwd,old} + k_2 v_{fwd,old}^2 + k_3 v_{ang,old} + k_4 v_{ang,old}^2 \\
v_{ang} &= \text{ ...analog...} \\
x, y, angle &\text{ unchanged}
\end{align}
$$

and then just search the minimum of the squared distance of the computed trajetory to the real one - depending on the values of $k_i$. This would mean either a good optimization algorithm or just brute-forcing / randomly testing a lot of values.

Is this the way to go here? I tried the 2nd approach, but the results so far are not that good.

So, as you might guess now, I'm pretty new at this, so any help is appreciated.

答:
What are you trying to reach is called "system identification": for given raw data of a real system, a computersimulation has to build with the same behavior. The challange is hard, because the simulation is done on a computer and the computer needs a turing-like program. The program consists of loops, if-then-statements and variables. To automate the generation of such a program is not possible. Nevertheless there is research on this field which is called "model learning". Until now, this research is not good enough for a practical demonstration. The alternative to automatic system identification is to programm the simulation manually. The results are physics-engines like ODE which are used in Gazebo or box2D which is well suited for 2D simulation. It is possible to tune these simulators for fitting to real world by adjustig gravity parameter or damping-values.

A more advanced technique is to build a motion model from scratch. This can be done on a basis of a gui, where the objects are visable and a program which control these objects. A good starting point is the motion model of the Original Post which calculate new x/y value with help of the old value and a sin(angle) addition. The limit of this motion model is that no obstacle is detected. A tutorial for programming a better bouncing ball physics engine in pygame is give here.

ContentLicense: CC BY-SA 3.0

Title: Fit robot simulator to robot


问:
Controlling more than 12 Servos with the Arduino Servo library
I'm using Teensy hardware specifically.  I have a Teensy 2.0 and a Teensy 3.0, and from the documentation it seems like there are two 16 bit timers available, and each should be able to control 12 servos.  However, I've attached a logic analyzer and have confirmed that only the first 12 servos attached ever function.

Is there anything special I have to do with my sketch in order to convince the Servo library to allocate the second timer for servos attached beyond number 12?

This works:

```<code>#define NUM_SERVOS 12

Servo servos[NUM_SERVOS];

// teensy 2.0 pins
int pin_assignments[NUM_SERVOS] = {0, 1, 2, 3, 4, 5, 20, 19, 18, 17, 16, 15};

void setup() {
  for(int i = 0; i < NUM_SERVOS; i++) {
    servos[i].attach(pin_assignments[i]) ;
  }
}
</code>```

But this, below, only ever shows activity on the first twelve pins attached:

```<code>#define NUM_SERVOS 24

Servo servos[NUM_SERVOS];

// teensy 3.0 pins
int pin_assignments[NUM_SERVOS] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};

void setup() {
  for(int i = 0; i < NUM_SERVOS; i++) {
    servos[i].attach(pin_assignments[i]) ;
  }
}
</code>```

答:
I'm guessing you're using the arduino libraries (haven't used the Teensy), in which case, if you read through the documentation (http://arduino.cc/en/Reference/Servo), you'll see that the Arduino servo library

Supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega

You can manually bitbang the pwm signals for your servo if you don't have too many other time-critical things going on, or make/get a separate serial servo controller, or do any of a number of other things. This is good reading to understand what is going on:
http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM (I would click through to the original document for a visual view of the different timer modes).

p.s. what are you doing with 24 servos and one microcontroller? sounds exciting!


问:
Scale factor of a 3d robot model relative to the real measurements of a robot
I have some measurements of a real life robot, and a 3d model of that robot (lets say in Unity) and I want to know the scale factor, plus I dont want to find the 3d models measurements and then divide with the real world ones to find the scale factor, in order not to get more confused with more mathematics than I am already. So, is there a methodology or will I have to do it as I mentioned?</p>

答:
You will have to do it as mentioned. However, if the 3D model is accurate, there is only one number you have to find. Choose any dimension you can measure on both the real robot and the 3D model.

$Scale=\frac{RealDimension}{3Ddimension}$

Every matching real and 3D dimension will give you the same number for scale.

So once you calculate scale once, you can apply it everywhere.

If you know the Real dimension and want to calculate the 3D dimensions:

$3Ddimension=\frac{RealDimension}{Scale}$

If you know the 3D dimension and want to know the real one:

$RealDimension=Scale\times 3Ddimension$

This works for all dimensions. Note that angles don't change with scale. If something is 90 degrees at one scale, it will be 90 degrees at all other scales.

If you are measuring a mesh, then extremes are easier to measure than axis centers. For instance, in the following drawing, the 840mm dimension is probably the easiest to measure in your 3D model.


问:
Help finding robot tracks
I have a Robot with tracks. One of the tracks broke and I need to find a replacement, the tracks use the same plastic interconnects/pieces as this:

They were very popular years back. Does anyone know the brand/name?

答:
This image appears to be coming from here.

This "johnny robot gm track kit" is now sold as "Standard GM Track Kit":

Or at least it looks very similar.

Title: Help finding robot tracks


问:
Which kind of motors and how powerfull should they be for a robotic arm
I am building a robotic arm with these specifications:

1 meter long

approx. 1kg weight

it is made of 4 motors. (2 at the base. One for rotating the whole arm left and right and another one for rotating up down. 1 motor for rotating the second half of the arm, only up and down. 1 for the claw used for grabbing)

it must be able to lift at least 4kg + 1kg (it's own weight), and have a speed of 180 degrees in 2 seconds = 360 degrees in 1 second resulting 60rpm.

Which kind of motor would be best for the project (servo or stepper) and how much torque will it need? (Please also give me an explanation of how I can calculate the torque needed). Could you also give me an example or two of the motors I would need and/or a gearbox for them (models or links).

答:
This type of question "how much torque does my robot arm need" has been answered many times on this site:

Simple equation to calculate needed motor torque

Design and construction of universal robotic arm (5kg, 1m)

Getting started with robotic arm design

Choice of a motor for robotic arm

The equation for torque is pretty simple.  It is just force times moment arm length.  So the lift motor at the base of the arm will require: 4 kg * 1 m + 1 kg * 0.5 m = 4.5 kg m, or about 44 Nm.  The elbow motor will require 4 kg * 0.5 m + 0.5 kg * 0.25 m = 2.125 kg m, or about 21 Nm.


问:
Determining position from a 2D map and LIDAR
We need to determine the 2D position of my robot. To do so, we have a LIDAR at a known high, with an horizontal plane, which gives us the distance to the nearest point for each angular degree (so 360 points for one rotation). The environment is known, so I have a map of the position of every object that the LIDAR is susceptible to hit.

My question is, based on the scatter plot that the LIDAR is returning, how can we retrieve the position of my robot in the map ? We would need the x, y position in the map frame and also the theta angle from the map frame to my robot frame.

We have tried to match objects on map with groups of points based on their distance between each other and by identifying those objects and the way the LIDAR "sees" them to retrieve the robot position. But it is still unsuccessful.

To put it in a nutshell, we want to make SLAM without the mapping part. How is it possible, and with what kind of algorithms ?

A first step could be to stop the robot while acquiring data if it seems easier to process.

答: Your problem is called localization. A simple approach would be to use a point set registration algorithm such as ICP with a map represented as a point cloud, where the real-world position of every point is known. To localize, you would then run the point set registration algorithm to find the best match for the LIDAR scan you just acquired in the map. The algorithm will return a 2D transform that will give you the position and orientation of your robot (strictly speaking your lidar, assuming it is at the origin of your point cloud).</p>


问:
Is it a bad-design decision to implement high number of moving parts in an automation-robot?
I'm currently designing an autonomous robotic system to manipulate clothes using computer vision and complex moving hardware. My current design incorporates quite a number of moving parts. My biggest worry is a frame (140 x 80 x 40 cm) rotates from 0 to 90 degrees every time it manipulates a piece of cloth. Other than this the design involves various other moving parts to achieve successful manipulation of the cloth. It seems like the hardware is capable of achieving the task despite the high number of complex and moving parts.

So the question is, what are the design considerations I should take in designing an automated system. Should I think of a alternative design with less number of parts? Or proceed with the current design if it does the job>? Sorry I am in a position where I can't disclose much information about the project.

Thank you.

答:
Tough to say without knowing much about the project. More parts = more problems or potential points of failure. A simple design is typically better in that there are less things that can go wrong. If the precision you need can't be accomplished without the extra parts you may want to reconsider the design.

Can you accomplish the same thing a simpler way? Will the parts need to be calibrated? Will downtime for repairs be a significant obstacle to the adoption of your device? If you are planning to bring it to mass market, how difficult will it be for someone to repair it? Can the machine self correct in the case of calibration. For true autonomy the machine should be able to make these adjustments as needed and if you are using quality parts and the system is engineered well these things become less of an obstacle.

Only you can answer these things.


问:
How do space rovers survive at very low temperatures?
For example, if a rover has working temperature range of -70 to +120 Celsius, how does it survive and then restore itself if the temperature drops to -150 degrees for several months?</p>

答:
That is a very good question, and depends on the design. There are in general two ranges for components which are temperature sensitive. The operational range gives the temperature at which the component can be actively used. Within the survival range the component should generally take no harm but may not be actively used. Often what is even more demanding on the components than extreme temperatures is temperature cycling. Mars for example usually has a large amount of cycles, where as moon has the more extreme temperatures, but less cycling.

In principle there are two ways to handle low temperatures for space rovers

Heating your rover so that all the components that are temperature sensitive stay within the respective limits. You can use active heating by for example using energy from your battery. Depending on the battery and your insulation you may not hold out very long though. Radioactive heater units (RHU) are another alternative that can be very effective.

Increasing the temperature tolerance of your system is another option. This can be done by selection of tolerant components, or potentially extending the range of existing components. Usually the most temperature sensitive component is the battery. Insulation is also possible, but may only get you so far.

In general one could say that the thermal design is one of the most critical aspects for space probes, and will often decide about the feasibility of a mission.


答:
“Art is the elimination of the unnecessary.” - Pablo Picasso

Many designs can meet the requirements you set. To prove it works is one phase. To optimize is another. What optimize means depends on your priorities

When you understand your requirements then specs, you should consider many design philosophy points like simplicity, modularity, flexibility.

I would recommend The Art of Unix Philosophy as a set of koans, about what priorities you should consider. Even though it's software, it's same system modularity. Also, it's a free pdf.

Mechanical systems now fail on lifetimes versus electronics every couple of years.

Second, you can also consider how many COTS off the shelf parts versus designing your own. Why redesign a part if you can use one already? Can you reduce the number of parts by changing one into a common one with a second set of holes?  What about a common module? Lots of ways to make design better.

But before you design / redesign anything, ask yourself what is the value of the redesign? Should you do that now or wait till you understand your system better?

Any more advice let me know.

Title: Is it a bad-design decision to implement high number of moving parts in an automation-robot?

Body:
I'm currently designing an autonomous robotic system to manipulate clothes using computer vision and complex moving hardware. My current design incorporates quite a number of moving parts. My biggest worry is a frame (140 x 80 x 40 cm) rotates from 0 to 90 degrees every time it manipulates a piece of cloth. Other than this the design involves various other moving parts to achieve successful manipulation of the cloth. It seems like the hardware is capable of achieving the task despite the high number of complex and moving parts.

So the question is, what are the design considerations I should take in designing an automated system. Should I think of a alternative design with less number of parts? Or proceed with the current design if it does the job>? Sorry I am in a position where I can't disclose much information about the project.

Thank you.


问:
Covariance Check?
I have a localization data estimated and GPS_truth and generated [3x3] covariance matrix along with them.

What i would like to do is to see if the covariance is correct or not?

Can we check it by plotting the covariance?

答:
You can plot the 2 and 3 σ gates around the means to see if it visually and intuitively makes sense.

If you have access to the raw data before it was filtered, you can calculate the residuals and follow how to plot $\pm 3 \sigma$ of a landmark in EKF-SLAM

Title: Covariance Check?


答:
Simplicity is the greatest sophistication.

Keep the design simple to understand, implement, debug, and maintain. Do not have too many moving parts. First, start with a simple design and build more functionality on top of it.


问:
Shield IMU from magnetic interferences
I experienced some drifting when coming near to magnetic fields with my IMU, so I wondered if it is possible to completely shield the IMU from external influences. Would this be theoretically possible or does the IMU rely on external fields like the earth magnetic field? Are there maybe alternatives to IMUs that are less susceptible to magnetic interferences? I only need the rotational data of the sensor and don't use translational output.</p>

答:
Nope. Magnetometers measure the magnetic field. The field it's measuring is going to be the sum of fields from a variety of sources. The field you're interested in is the earth's. But it is not possible to separate the earth's nominal field from the field near an I-beam in your building.

You can calibrate the magnetometer to remove any biases that are being picked up from your vehicle. Also, I would recommend twisting all wires that carry lots of current that run near the mag.

If you aren't interested in heading, switching to an accelerometer would be a simple. You can measure gravity (+other accelerations) and pull out roll and pitch data. You could use a camera to track the environment though this may be overkill. If you are interested in keeping inertial heading and you want the solution to fit in a shoe box it's unlikely you'll be able to do better than a magnetometer.

Title: Shield IMU from magnetic interferences


答:
I am not allowed to comment, so I answer, but it is not really an answer.

Also try to put your magnetometer as far as you can from your electrical motors.

Title: Shield IMU from magnetic interferences

Body: I experienced some drifting when coming near to magnetic fields with my IMU, so I wondered if it is possible to completely shield the IMU from external influences. Would this be theoretically possible or does the IMU rely on external fields like the earth magnetic field? Are there maybe alternatives to IMUs that are less susceptible to magnetic interferences? I only need the rotational data of the sensor and don't use translational output.</p>


问:
How to make a simple Arduino Insect Robot?
I want to make a simple Arduino based programmable insect robot.

I want it to walk on legs and legs will be made of hard aluminum wire. It needs to have 4 legs. I am planning to use Arduino Nano for that. I just had few questions like:

How to arrange servos and wire to have motion?

I also want it to turn sideways?

Where can I read good theory on making insect like robots?

答:
Hardware

Ant like robots are called Hexapods (6 legs) and Quadruped (4 legs). Each leg has 2 servos as minimum, but most developer prefer 3 servos per leg. The problem is, that arduino boards have a limit how much servos they can drive. From hardware point-of-view it is important to hide the wires inside the robot so that the construction is clean and agile.

Software

Motion primtives are used to program the servos. Every motion primitive is mapped onto a key at the Playstation Controller. Pressing A means "move forward", pressing B means "move backwards". The predefined trajektories are created with the animation software Blender. One axis is the timescale, the other axis is the value of the servo. The combination of these diagrams results into a smooth motion of the insect robot.

Advanced control strategies are possible but are less used by amateurs. An example for a software for controlling complex tasks is PARADOCS It is not about a walking robot but about a quadcopter. A high-level planner based on a gantt chart is used to determine partial order plans.


问:
What are human-friendly terms for mobile-robot orientation and relative direction of non-robot objects?
Within robotics programming, orientation is primarily given in terms of x, y, & z coordinates, from some central location.  However x, y, z coordinates aren't convenient for rapid human understanding if there are many locations from which to select (e.g., {23, 34, 45}, {34, 23, 45}, {34, 32, 45}, {23, 43, 45} is not particularly human friendly, and is highly prone to human error).  Yet more common English orientation descriptors are frequently either too wordy or too imprecise for rapid selection (e.g.,  "front-facing camera on robot 1's right front shoulder" is too wordy; but "front"/ "forward" is too imprecise - is the camera on the leading edge or is it pointing forward?)

In the naval and aeronautical fields vehicle locations are generically talked about as fore, aft (or stern), port, and starboard. While, direction of movement that is relative to the vehicle is frequently given in reference to a clockface (e.g., forward of the the fore would be "at 12", rear of the aft would be "at 6", while right of starboard and left of port would be "at 3" and "at 9", respectively).  This language supports rapid human communication that is more precise than terms such as "front" and "forward".  Are there equivalent terms within mobile robotics?

答:
Typically, a coordinate frame is placed at the robot center.  The x-axis points forward, the y-axis points left, and the z-axis points up.  Then, we measure angles with respect to the x-axis. So, a 90 degree angle would mean along the y-axis, as shown,

So, "12" corresponds to 0 yaw, or straight forward. "9" corresponds to 90 degree yaw, or along the y-axis.  6 corresponds to 180 degree yaw, or straight back along the minus x-axis, etc.

You are asking "How do I describe an object relative to the robot", which is the same as "how do I describe the location of the object in the robot's coordinate frame" By necessity, we consider the both to be the same, so the "driver's side" wheel is the "front left". Front because it is +X, and left because it is +Y. The cans are in "front" of the robot because they have a +X coordinate. They are "below" the robot because they have a -Z coordinate.

It's the same as "Port", "Aft", "Starboard", because these are described with respect to the vehicle, not with respect to the observer. This is the basic definition of a Frame of Reference.


问:
What is the best way to plug in more than 3 stepper motors into a Arduino Uno board?
I'm developing a 5 axis robotic arm with stepper motors and I am getting around to ordering most of my parts. I plan on using 5 EasyDriver shields to drive all of my motors. I am also planning on using just a basic arduino uno board to go with it. So here are my questions:

Is there any alternative instead of buying a ton of Easy Drivers and connecting all of them to a single board?

And if there isn't, then how would the setup look to use more than 3 stepper motors? This is the most useful picture I found, however It only shows 3 and while I know I could plug in a 4th I am unsure whether I could plug in a 5th.

答:
Each EasyDriver takes two digital inputs - step and direction. These do not need any particular protocol so you can use any pin capable of digital output.

The Arduino uno has 14 digital outputs and 6 analogue inputs which also can be configured as digital outputs, so you could drive up to ten of the boards from an Arduino without any other hardware.

Just connect the two digital inputs for each board to two more digital pins of the Arduino, for example 8 and 9 for board four and 10 and 11 for board five. This leaves 0 and 1 clear for serial communications.


问:
How to create a model for temperature control?
I have a heated compartment, inside which, there is another object heated up by independent heater. I want to control temperatures of both chamber and the object. </p>

<p>I could achieve this by simple PID (or PI) controllers for both chamber and object, but I would like to try more thoughtful approach :) I have two temperature sensors, and two PWM outputs for heaters. How do I identify a model for an object I want to control?   </p>

答:
Classical modelling techniques like "PID control" are based on mathematical equations. That makes them difficult to implement. A better way for modelling heated compartment is to use object oriented design. An example for modelling a  printer with python uses variables which represents the internal state and methods for statechange of the physical system. Its a little bit like designing a computer game.

It the simulation works, a solver is needed. The solver uses sampling techniques (brute-force-search) for reaching a given goal of the system. For example: if the object inside the heater should stay within a temperature range of 150 and 180 degree, the solver generates random inputs to the systems until some of them results into the given output range. A good example of how a naive physics engine works is given in the computergame "The Sims" where an oven can be set on fire.


问:
Is it possible to interface android mobile as GSM and GPS module with arduino based robotic applications?
I want to built a robot and i need bunch of modules to track it like GSM/GPS Wifi and Camera
If i try to buy each of module separately it will cost me 300 dollar each aprox in Pakistan. On the other hand an android enable phone can be purchased on just 250$ having all of them. I was wondring if it is possible to interface android phones like (Huawaii or google nexus) with 8-bit microcontrollers or Arduino? The only port available with android phones are USB and Arduino supports USB. It is possible to some how attach both of them?</p>

答:
Yes, it is possible. You need the Android Accessory API and Android Accessory Development Kit. It is based off Arduino, and is open.

In general, if the phone + the ADK is cheaper than buying the components separately (I suspect it would be), then I'd buy the phone + ADK.

Your other option is to buy a phone, and a bluetooth shield for a microcontroller, then use the bluetooth connection to send data between the phone and microcontroller.


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

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

答:
Use a split USB cable.  Something like this should work.

https://shop.pimoroni.com/products/split-microb-usb-power-cable

You might need a breakout board to run your motors if your motor driver can't take a USB source directly for power.

Title: Power solution for Raspberry Pi robot


问:
How to get live audio from robot?
I am building a robot and I want to be able to hear sounds from it's environment (ideally from my laptop). What is the best way to get live audio from my robot's microphone to my computer?

I have looked into a few solutions for hosting live audio streams using packages such as darkice and icecast. I'm just wondering about better solutions for robotic applications.

Additional details:
- I have access to hardware such as Raspberry Pi, Arduino, etc.

答:
Look into soundwireserver. Its an easy way to setup an audio server on a Linux or windows  based system, and can be monitored from a laptop or an android phone. You need to consider processing overhead on a robot because of battery life, low processor speed etc. Its easy to setup and I know their android app works very well.

A raspberry pi should have no problem running it, and you don't need excessive hardware other than a mic input. There's a ton of different ways to do this, but from the info provided you want to setup an audio server on the robot, and this is an easy way to do that.

Title: How to get live audio from robot?


答: You can actually shield it with a magnetic shielding foils. You can try to search for them online. Also, try to position it as far away from ferrous metal like mild steel, any wires and motors which may cause interference.</p>

Title: Shield IMU from magnetic interferences


问:
Why don't cheap toy robotic arms move smoothly?
Why don't cheap toy robotic arms like this move smoothly?  Why can't it even move itself smoothly, (even without any load)?

In other words - what do real industrial robotic arms have, that cheap toys don't?

答:
Judging from the video, I suspect the reason this robot's motions appear jerky is mostly due to friction and backlash in the drivetrain. Manufacturing precise gears to transmit motor torque to the joints is very expensive and not something somebody is going to do for a hobbyist level robot. Of course if the joints are direct drive, then I've misinterpreted the video, but I suspect the drivetrain is the culprit here. </p>

<p>Improving the joint control might help things, but there are limits. Disturbances caused by these sorts of phenomena can sometimes be impossible to compensate for via more sophisticated control without adding additional sensors. The reason is that the encoders are almost always placed on the motor side of the transmission and artifacts like backlash are never seen by the motor encoder, making it impossible to correct via feedback. While some feed forward techniques might be able to compensate, they would not be robust to arbitrary payloads. </p>

Body:
Judging from the video, I suspect the reason this robot's motions appear jerky is mostly due to friction and backlash in the drivetrain. Manufacturing precise gears to transmit motor torque to the joints is very expensive and not something somebody is going to do for a hobbyist level robot. Of course if the joints are direct drive, then I've misinterpreted the video, but I suspect the drivetrain is the culprit here.

Improving the joint control might help things, but there are limits. Disturbances caused by these sorts of phenomena can sometimes be impossible to compensate for via more sophisticated control without adding additional sensors. The reason is that the encoders are almost always placed on the motor side of the transmission and artifacts like backlash are never seen by the motor encoder, making it impossible to correct via feedback. While some feed forward techniques might be able to compensate, they would not be robust to arbitrary payloads.


问:
3 Axis Gimbal Stabilization System can replace with 3 Axis Accelerometer
i have "TAROT ZYX-GS 3-Axis Gimbal Stabilization System ZYX13" sensor that gives me the value of Roll tilt and Pan.The 3 axis accelerometer give me the value of x y and z.so can we use the Gimbal stabiliztion system in place of accelerometer

答:
The 3-axis gimbal stabilization system internally combines a 3-axis gyroscope and 3-axis accelerometer. It outputs PWM signals necessary for maintaining an orientation.  The outputs are typically meant to drive RC servos.

This might be enough for your use-case, but it is dependent on the details.

But generally, a gimbal stabilization system is not the same as accelerometer. An accelerometer operates at a lower level and provides x/y/z acceleration components at the measured instant in time only.  This gimbal system is outputting the corrections that would be needed to hold an orientation.  You might be able to derive acceleration from that to some extent, but that is not what it is intended for.


问:
Quadrature encoder signal from dc motor is very noisy
I'm starting out with robotics, got my first DC gear motor with quadrature encoder (https://www.pololu.com/product/2824):

I ultimately plan to hook it up to a motor driver connected to a Tiva Launchpad. However, since I'm a noob, and curious, I am starting by just playing with it with my breadboard, oscilloscope, and voltage source. E.g., when I plug in the motor power lines into my (variable) voltage source the axis spins nicely as expected between 1 and 12 V.

The problems start when I try to check how the encoder works. To do this, first I plug a a 5V source into the encoder GND/Vcc, and then try to monitor the encoder output.

While the motor is running, I check the Yellow (encoder A output) cable (referencing it to the green (encoder GND) cable).  I made a video that shows a representative output from one of the lines (no USB on my old oscilloscope so I took a video of it using my phone).

As you would see at the video, the output doesn't look anything like the beautiful square waves you typically see in the documentation. Instead, it is an extremely degraded noisy sin wave (at the correct frequency for the encoder). The amplitude of the sin is not constant, but changes drastically over time. Strangely, sometimes it "locks in" and looks like the ideal square wave, for about a second or two, but then it gets all wonky again.

Both of the lines (encoder A and B output) act this way, and they act this way at the same time (e.g., they will both lock in and square up at the same time, for those brief glorious moments of clarity). Both of my motors are the same, so I don't think it's that I have a bad motor.

I have also checked using Vcc=12V, but it made no difference other than changing the amplitude of the output.

Note I already posted this question at reddit:
https://www.reddit.com/r/robotics/comments/502vjt/roboredditors_my_quadrature_encoder_output_is/

答:
I followed the link to your Reddit post and, after checking the datasheet for your motor, I agree with what some people are saying there, but I'll expand their answers and hopefully give you some insight into what I think is happening.

/u/zevryn said,

I hope this doesn't come off as mean since I'm not trying to be, but how good are you with the oscilloscope? I could see if the scope is configured wrong, it will not be displaying properly. If you have it set to trigger on one of the rising edges and have the sample frequency high enough to get multiple samples per square wave, they should all overlap and look nice and stable.

(Emphasis added)

/u/Ttimoffi said

I think u have to read it at a frequency specified on the encoder data sheet.

I think what is happening, that the others are commenting on, is that you are not sampling the output at a high enough frequency. You haven't commented as to what the motor speed is when you monitor the encoder output, but let's assume it's the full unloaded output speed of 200rpm.

The encoder is setup to output 3,200 counts per revolution of the output shaft. At 200rpm, that means you're getting $(200*3200) = 640,000 \mbox{ counts/min}$ which is equivalent to $10.6 \mbox{ kHz}$.

As explained in this video on aliasing, when you under-sample a signal you get false signals - signals that, as far as your instruments are concerned, are real but don't actually exist. They "appear" because of instrument inadequacies.

Finally, as explained in this video on oscilloscope sampling rates, the person says,

Note by the way also the trigger is not working. This is maybe your first clue if you're playing with your scope and you can't get it to trigger right, "What's going on here, why isn't it triggering correctly?" It's triggering on the aliased signal.

Your video is very blurry, so it's very hard to read what anything is set to on your scope, but it kinda looks like, at the bottom, it says, "<10Hz". Also, at the top, it looks like it says, "M Pos: 270.0ms". This all makes it seem like your scope is set way too slow to be able to see the signal correctly.

At 10.6 kHz, the signal period is (1/10666) = 0.000094 seconds, or 94$\mu$s. An oscilloscope setting of 100$\mu$s per division should get the actual signal when the motor is at full speed.

tl;dr - Set the scope to 100$\mu$s per division. You're reading an aliased signal, not the real signal, which is why it keeps jumping around like that.


答:
Conceptually everything was set up correctly, but a number of basic mistakes affected the signal. Here is the set-up which should be used to record the signal from one of the encoder outputs:

A set up like this should result in a a clean signal if your motor/encoder is not broken. Once it's up and running, seeing the signal is simple. It's as easy as checking the square wave coming off of any common function generator: fiddle with your oscilloscope until it looks good (or just hit autoset and any good oscilloscope will do it for you, or read the excellent answer by Chuck for more help on that).

The underlying problems seem to stem from an accumulation of rust when it comes to dealing with real, wire and breadboard, electronics projects:

The top/bottom breadboard power rails are typically separated, so you cannot assume continuity between them. Always keep a multimeter handy and do simple continuity tests before doing deeper troubleshooting. When stuff's busted, never assume continuity. Test for continuity.

Be careful not to confuse motor ground with encoder ground, motor ground is likely to be electrically very noisy,m which will corrupt your encoder signal.

Title: Quadrature encoder signal from dc motor is very noisy

Body:
I'm starting out with robotics, got my first DC gear motor with quadrature encoder (https://www.pololu.com/product/2824):

I ultimately plan to hook it up to a motor driver connected to a Tiva Launchpad. However, since I'm a noob, and curious, I am starting by just playing with it with my breadboard, oscilloscope, and voltage source. E.g., when I plug in the motor power lines into my (variable) voltage source the axis spins nicely as expected between 1 and 12 V.

The problems start when I try to check how the encoder works. To do this, first I plug a a 5V source into the encoder GND/Vcc, and then try to monitor the encoder output.

While the motor is running, I check the Yellow (encoder A output) cable (referencing it to the green (encoder GND) cable).  I made a video that shows a representative output from one of the lines (no USB on my old oscilloscope so I took a video of it using my phone).

As you would see at the video, the output doesn't look anything like the beautiful square waves you typically see in the documentation. Instead, it is an extremely degraded noisy sin wave (at the correct frequency for the encoder). The amplitude of the sin is not constant, but changes drastically over time. Strangely, sometimes it "locks in" and looks like the ideal square wave, for about a second or two, but then it gets all wonky again.

Both of the lines (encoder A and B output) act this way, and they act this way at the same time (e.g., they will both lock in and square up at the same time, for those brief glorious moments of clarity). Both of my motors are the same, so I don't think it's that I have a bad motor.

I have also checked using Vcc=12V, but it made no difference other than changing the amplitude of the output.

Note I already posted this question at reddit:
https://www.reddit.com/r/robotics/comments/502vjt/roboredditors_my_quadrature_encoder_output_is/

ContentLicense: CC BY-SA 4.0


问:
What types of motor should I use for a particular application?
I want to create an amateur wire looping machine with Arduino, that has similar functionality than this machine. I don't need the automatic wire feeding as for my purposes this part can be done manually. I just want to automate the wire loop creation process, assuming that I already have straight wires.

I'm new to the world of motors, robotics, etc., so please be as descriptive as possible :)

From the video, I can tell that there are two motors:

Makes the initial wire bending

Spins to create the loop

The wire that I will be working with is galvanized steel of 11 gauge (2.0 - 2.5 mm diameter).

So what type of motors would be recommended for this application, taking into account:

They need to be accurate in their positioning for repeat ability

They need to have enough torque (specially the one that creates the loop itself) to work with this type of material

They're as fast as (or close to) the ones in the video

This is not going to be an industrial grade machine that will be running all the time

Ideally, they need to be not that expensive.. I don't want to be bankrupt by the end of this project :)

If links can be included for recommended products, it would be great.

Thanks!

答:
Not enough info to go on to recommend a specific set of motors, but some info to steer you in the right direction. Without a schematic or set of plans to go on I can only suggest some ideas. So here it goes.

Figure out the required torque for bending and twisting the wire, as well as holding it in place while it twists. I would recommend servo motors, they are fast, strong, and can be dialed in pretty precisely using a microcontroller and a feedback loop.

Next consider the amount of weight the motors will be moving, include tooling and materials. Select your motors based on these calculations and add in 25% extra at a minimum just a margin of error in your calculations.

Is your system going to use DC or AC?

Look online for industrial servo motors. That should get you started. You have a lot of planning to do before you pick motors.


答:
The short answer, as the others already commented is no for external (buildings) or dynamic (moving magnet on your robot) influences.

One technique we used to account for the buildings is to estimate the building-induced bias in the position filter, based on the idea that the bias would change "slowly" w.r.t. the travel of the system (i.e. within meters, not centimeters).

Title: Shield IMU from magnetic interferences


问:
Understanding and correct drift when using BreezySLAM (aka tinySLAM / CoreSLAM)
I was looking for a Python implementation of SLAM and stumbled upon BreezySLAM which implements tinySLAM aka CoreSLAM.

My robot is equipped with the hokuyo urg-04lx-ug01.

I have odometry hence passing it to the updater:

```<code>self.slam.update(ls_array, (dxy_mm, dtheta_deg, dt));
</code>```

As I start moving the robot starts discovering room A and then room B & C already the map seems to have rotated. I come back to room A and return the initial pose end=start using the same path. Now I noticed room A has significantly rotated in relation to the other room. Consequently the map isn't correct at all, neither is the path travelled by the robot.

Wasn't the SLAM supposed to store and keep the boundaries for the first room it discovered?

Why this rotation may be happening?

How could I try to troubleshoot this issue with the data I have collected (odometry, calculated position, liDAR scans)?

Can I tune SLAM to do a better job for my robot?

SLAM is pretty new to me, so please bear with me, any pointers on literature that may clarify and moderate my expectations of what SLAM can do.

Extra

... and Here the best video I found to understand particle filter

答:
Till now this is the easiest SLAM implementation that I've found.
It works pretty well, however, there is a lot of room for improvement using the same principle used in the original code online.

"1- Wasn't the SLAM supposed to store and keep the boundaries for the first room it discovered?

2- Why this rotation may be happening?"

In the implementation you have I would say it failed match the new scan to the already constructed map (there are lots of reasons for this problem)

3- How could I try to troubleshoot this issue with the data I have collected (odometry, calculated position, liDAR scans)?

it depends what hardware you are using. If you are correctly acquiring the Hukuyo scans the algorithm should work even if you have some errors from odometry or IMU, unless, the errors are too large (eg instead of calculating 5cm using odometry you get  100, 200 or 500 for example)

IMU and odometry can help a lot however in the algorithm you are using you can just use the LIDAR, thus the priority is to check your LIDAR scans.

4-Can I tune SLAM to do a better job for my robot?

Of course, you can also rewrite it to include lots of optimizations adapted to the robotic platform you are using.

EDIT:

2- Why this rotation may be happening?"

Try to decrease the maximum rotation speed of your robot

I can't explain the whole algorithm in this post, and as I've previously said there are lots of other reasons, study the theory + read the code to understand what's going on, good luck


问:
What is the torque transmission efficiency using a bycicle chain/setup for robot?
For this robot the gear attached to the motor is linked to the gear attached to the wheels by a bicycle chain (I am using a bicycle wheel and transmission set as the parts for the robots movements).

How does using a bicycle chain affect the power transmission efficiency, how does this impact the torque?

答:
From a cyclists' perspective - a good modern bike chain transmission is very efficient - percentage efficiency is somewhere in the high 90s and has been for decades.

(From anecdotal evidence: endless debates in cycling over the years, about various inventors attempting to "improve" the design of the bike with belts/pulleys, conventional gears, even things like propshafts etc. Such alternative designs sometimes have useful features, but they haven't significantly improved overall on the strength, efficiency and light weight of the modern chain & sprocket.)

As far as application to robotics is concerned - it will help to make sure everything is mounted well, not in a flexible way so things cannot deflect under load, and the gears and chain are kept in a reasonably straight line. These are the way bike components are mounted too.


答:
I agree with @Andy 's answer, that chain efficiency is over 90%. I'll point out that your terminology is not quite right - using bicycle chain (or any other transmission) affects power transmission efficiency. It's a subtle but significant difference between what you said (torque transmission efficiency).

First, efficiency is defined as the ratio of output to input. With gearing, you could use a very inefficient transmission and still have a larger output torque than input torque. This would imply that your "torque transmission efficiency" is greater than one.

Second, in the case of zero/stall speed on the drive, the torque output should be nearly the same as the input torque.

Both of these cases are covered when you talk about power transmission efficiency.

Title: What is the torque transmission efficiency using a bycicle chain/setup for robot?

Body:
For this robot the gear attached to the motor is linked to the gear attached to the wheels by a bicycle chain (I am using a bicycle wheel and transmission set as the parts for the robots movements).

How does using a bicycle chain affect the power transmission efficiency, how does this impact the torque?


问:
Can mapping be done in real life applications without also solving the localization problem at the same time (i.e. SLAM)?
I know that Occupancy Grid Mapping requires the assumption that the robots' pose is always known when generating a map.  However, I also know that in reality, position and orientation usually treated as uncertain in practical applications.  Assuming that my target mapping environment is inside a home, is there a way I can overcome inherent robot pose uncertainty in a real world application of Occupancy Grid Mapping without resorting to implementing a SLAM?  That is, what is a low-cost way to increase the certainty about my pose?

Or is Occupancy Grid Mapping only useful in theory and not in practice?

Update:

It is clear to me, from the responses given, that occupancy grid mapping is just one possible way to represent a map, not a method in and of itself.  The heart of what I really want to know is:  Can mapping be done without also solving the localization problem at the same time (i.e. SLAM) in real life applications?

答:
As kamek said, you can do mapping without localization.

and it would be much easier if you have the locations and you just need to build a map.

note: dead reckoning alone is divergent even if you have very good models, however, its use in conjunction with other sensors is very helpful


问:
How do we make our robot work?
As a holiday project we are building a surveillance robot that is capable of transmitting live images using a webcam and is also capable of lifting small objects.

It uses a CC2500 module for communicating with the robot.  The interface is designed in Visual Basic 6 and it allows us to set the port of the computer to which the transreceiver is connected. It is connected via a USB to RS232 port (USB side is connected to the computer).

We tried the settings as shown below and we get an error that the config is unsuccessful. We have tried the same settings in 4 different computers so far and it did not work.

Circuit diagram for the robot:

It is designed using an Atmel 89S52.

Please tell us what settings to try to make it work

答:
I use TI chips (typically the Stellaris line) and I agree that you need to provide much more information.

That being said I think your problem lies in one of two areas (probably the second one):

1) Your device isn't emulating:
When you connect your device to the computer does it make the 'du-duh' sound? Alternatively press start, right-click 'Computer', go to 'Manage' and check in Devices manager if you are showing up as a COM port. If you are not, then your problem lies with a) your driver (although your device should still show up) or on your embedded side. I'd bet on the latter. This means this is not the website for your to figure it out on and fixing this is no small task. However if you've come this far, maybe you won't mind coming a little further. However from your screen shot it does look like it is emulating, so let's go to option number two.

2) You are throwing an exception when connecting:
I'm going to assume that you are using the .NET framework SerialPort class in VB (btw you should update to something newer than VB2006 or at least make sure your .NET framework is up to date if you haven't already). The SerialPort class is widely regarding as being incredibly poorly written and the method SerialPort.Open() actually performs about 8 things and if a single one of them fails then the whole method fails and you are up the creek. What I would do is download something like Termite and see if you can connect to the device that way. Most terminal programs ignore IO Exceptions (which is what I bet is happening in your VB program). By the way, did you write the VB program yourself? If so, do you have a try-catch around your SerialPort.Open() method? Because that is a good way to figure out if that is where your problem lies. If you cannot connect with Termite then I would download Eltima which is  port monitoring software. It runs in the background while you try to connect to a serial port and it will log what is happening and more importantly it will log errors.

Good luck and happy coding :)

TL;DR: get Eltima and find the error.

Title: How do we make our robot work?


问:
In EKF-SLAM, why do we even need odometry when there is a more reliable sensor?Also, are all SLAM algorithms feature-based?
In the book of SLAM for dummies, why do we even need the odometry when the robot would use the data retrieved from the laser scanner which is more accurate than odometry? Why not just rerly on the laser scanner and do away from the odometry? Is there any contribution by the odometry that the laser scanner does not have? Also, are all SLAM algorithms feature-based?</p>

答:
The EKF principles have been well explained in the other replies.

I would like to add that you can do SLAM without using Odometry, i.e only using a LIDAR for example.

"Also, are all SLAM algorithms feature-based?"

No not all of course


问:
Determining position from a 2D map and LIDAR
We need to determine the 2D position of my robot. To do so, we have a LIDAR at a known high, with an horizontal plane, which gives us the distance to the nearest point for each angular degree (so 360 points for one rotation). The environment is known, so I have a map of the position of every object that the LIDAR is susceptible to hit.

My question is, based on the scatter plot that the LIDAR is returning, how can we retrieve the position of my robot in the map ? We would need the x, y position in the map frame and also the theta angle from the map frame to my robot frame.

We have tried to match objects on map with groups of points based on their distance between each other and by identifying those objects and the way the LIDAR "sees" them to retrieve the robot position. But it is still unsuccessful.

To put it in a nutshell, we want to make SLAM without the mapping part. How is it possible, and with what kind of algorithms ?

A first step could be to stop the robot while acquiring data if it seems easier to process.

答:
1- Of course you don't have perfect matches

2- ICP is not used for localization, it is used to calculate the transformation  the robot's pose has undergone (T+R)

3- To localize your robot, you would have to use a particle filter as lucab has said


问:
Autonomous Navigation without Distance Sensors
I'm doing a project with the iRobot Create 2. I want it to be able to map out a room and navigate to a point for example. My problem is that the robot doesn't have any distance sensors. What it can do is detect if there is an obstacle ahead of it or not (0 or 1) and it can measure how far it has traveled in millimeters. Any good techniques out there or best to buy an IR sensor?</p>

答:
"I want it to be able to map out a room and navigate to a point for example."

to map the room you need to localize the robot (thus you have to implement SLAM algorithm), unless you have a mean of recuperating the position of the robot (localizing it)

Navigation is another problem, I suggest you start working on the SLAM problem to map the environment later on you could tackle the navigation problem

" My problem is that the robot doesn't have any distance sensors."

you don't necessarily need a distance sensor (LIDAR for example), you can use a web cam and implement a kind of SLAM known as monocular SLAM


问:
Denavit-Hartenberg convention
There are two different conventions that can determine DH parameters.   What is the difference between Craig's [1, Sec 3.4] convention and the Spong [2, Sec. 3.2] convention?
I know that both methods must have the same response.

[1]: Craig, John J. Introduction to robotics: mechanics and control. Addison-Wesley, 1989.

[2]: Spong, Mark W., Seth Hutchinson, and Mathukumalli Vidyasagar. Robot modeling and control. Wiley, 2006.

答:
This is Best Youtube video which gives thorough explanation of Denavit Hartenberg Algorithm and Parameters

Forward Kinematics: Denavit-Hartenberg Convention

Following is youtube channel by Prof. Yang Cao from University of British Columbia which covers all topics in Advanced Robotics. This is best place for learning robotics concepts for Robotics Engineering.

Robot Modeling and Control

Check it out.

Title: Denavit-Hartenberg convention


问:
Can I use a 3D gimbal system as a simplistic quadcopter IMU(3 axis accelerometer)?
i have 3d gimbal system and i want to use this sensor in place of IMU(3 axsis accelerometer) in Quadcopter </p>

答:
A gimbal system will not replace an accelerometer. I assume by gimbal system you mean something like a Gyroscope, i.e. a device that has a fixed orientation allowing you to measure your orientation relative to it.

A gyroscope can give you information on orientation and possibly angular velocity. An accelerometer gives you information on acceleration/gravity. Since the accelerometer can identify the direction of gravity using a couple simple assumptions, you can also use it to estimate your orientation.

Final answer: a gimbal/gyroscope can replace an accelerometer for the purposes of calculating the orientation of a device/quadcopter, a gimbal cannot replace the full functionality of an accelerometer.


答:
I'm actually in your exact situation, and have decided to do the following:

I got a power bank with two USB outputs. I intend to connect the first output directly into the raspberry Pi, and then connect the second output to a breadboard to power the motors.

```<code>              USB 1 -> Raspberry pi
             /
   Power Bank
             \
              USB 2 -> Breadboard -> Motors
</code>```

However, if my power bank just had one USB output, I would have connected it to the breadboard and powered the pi from there as well (through the 5V pin on the PI, I believe):

```<code>                                     Raspberry Pi
                                    /
    Power Bank -> USB -> Breadboard
                                    \
                                     Motors
</code>```

PS: Remember to connect the grounds

In order to connect the USB to the breadboard, I will either cut open an old USB cable and solder the power wires to the board from directly, or look online for something premade that does this neatly for me.

PPS: I haven't tested this yet, so do it at your own risk :)

Title: Power solution for Raspberry Pi robot

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

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

Body:
I'm actually in your exact situation, and have decided to do the following:

I got a power bank with two USB outputs. I intend to connect the first output directly into the raspberry Pi, and then connect the second output to a breadboard to power the motors.

              USB 1 -> Raspberry pi
             /
   Power Bank
             \
              USB 2 -> Breadboard -> Motors

However, if my power bank just had one USB output, I would have connected it to the breadboard and powered the pi from there as well (through the 5V pin on the PI, I believe):

                                     Raspberry Pi
                                    /
    Power Bank -> USB -> Breadboard
                                    \
                                     Motors

PS: Remember to connect the grounds

In order to connect the USB to the breadboard, I will either cut open an old USB cable and solder the power wires to the board from directly, or look online for something premade that does this neatly for me.

PPS: I haven't tested this yet, so do it at your own risk :)


问:
Is there any C++ library I could use to program a robotic manipulator involving forward and inverse kinematics?
I came across robotics library (RL), but quite unclear about its real purpose. Is it a FK/IK solver library or simply an graphical simulator?. RL has poor documentation, so its not clear how to use it. Im looking for some C++ library where there APIs to solve FK/IF analytically. Thank you.</p>

答:
I haven't used it personally (yet; it's only a matter of time), but I believe the Rigid Body Dynamics Library is what you're looking for - efficient forward and inverse kinematics.

I did a lot of work with the underlying math behind that library, and even wound up (creating my account here to) asking a couple questions about it, one of which was answered by the guy that wrote that library. I'll warn you - the math isn't for the faint of heart, but I believe that, like with a lot of things, you don't really need to understand all the underlying math to understand how to apply something.

Give it a shot, and feel free to ask if you have any questions!


答:
The best way to understand forward and inverse kinematics is to write a library for its own. A good starting point is to implement Cyclic Coordinate Descent.

So called "ready-to-run" librarys like OpenRave or OMPL have an extensive C++ tutorial section too but are notorius difficult to install. Most of them only run under linux, and are not even part of Ubuntu's package manager.

And a short informal note: C++ is not a high-level-language, especially not in scientific environment.

Title: Is there any C++ library I could use to program a robotic manipulator involving forward and inverse kinematics?

Body: I came across robotics library (RL), but quite unclear about its real purpose. Is it a FK/IK solver library or simply an graphical simulator?. RL has poor documentation, so its not clear how to use it. Im looking for some C++ library where there APIs to solve FK/IF analytically. Thank you.</p>


问:
Is the crazyflie control board considered a microcontroller
I am currently doing a project for school and we are told that we must use a micro controller that ends up controlling some external hardware, now i know the crazyflie is controlling the motors which counts as external hardware but is it a micro controller? My second question is i want to purchase the kit so i can assembly it myself however I saw that you can use an expansion board so you need not solder and also i plan on not buying a remote its possible to control the crazyflie via my iPhone correct? I would appreciate it if someone could answer my questions. Thank you in advance</p>

答:
The crazyflie comes ready to use with their iPhone and Android App, no extra components required. But the idea is that you can develop and make changes so if you wanted (depending on the precise outline of your project) you could use it for your project but program it yourself to do something in addition to the out of the box functionality, or add extra hardware like the LED component to perform some form of light show as you fly it, or automate some flight instructions.

It is worth noting that the source code for the app's are also available.


问:
Source to learn Kalman Fusion, explanatory code snippets
Currently I am reading a book of Mr. Thrun: Probabilistic Robotics. I find it really helpfull to understand concept of filters, however I would like to see some code in eg. Matlab. Is the book "Kalman Filter for Beginners: with MATLAB Examples" worth buying, or would you suggest some other source to learn the code snippets from?</p>

答:
I have read the book, and found it unnecessarily obtuse. Unfortunately, the code snippets will not be very helpful, since they will probably look exactly like the equations, while using a matrix library like Eigen, OpenCV, boost, or just Matlab.  To get a good understanding of a Kalman Filter, you should start with a review of multi-variate Gaussian random variables, then brush up on Taylor Series expansions, then realize we are just inventing a covariance matrix for the joint distribution of measurements and state.

For example, here's some code I wrote for a robotic rover which uses an EKF.

```<code>
void DifferentialKinematics::ekfMeasurement(Eigen::MatrixXd&X,Eigen::MatrixXd&Q,Eigen::MatrixXd&Z,Eigen::MatrixXd&R){
  Eigen::MatrixXd I=Eigen::MatrixXd::Identity(3,3);
  Eigen::MatrixXd ZP = Eigen::MatrixXd(Z);
  Eigen::MatrixXd XP = Eigen::MatrixXd(X);
  Eigen::MatrixXd z = Z-X;
  Eigen::MatrixXd S =Q+R;

  Eigen::MatrixXd K=Q*S.inverse();

  X = X + K*(z);
  Q = (I-K)*Q;
}
/**
 * Update given wheel speeds left, right.
 * Both are in/out
 */
void DifferentialKinematics::ekfPredict(float left, float right, Eigen::MatrixXd&pose, Eigen::MatrixXd&cv){
  float hth=pose(2)+getTheta(left,right)/2;
  float dd = std::fabs(getVel(left,right));
  updatePose(left,right,pose);

  //Form Jacobian
  Eigen::MatrixXd V=Eigen::MatrixXd::Zero(3,2);
  V(0,0)=(cos(hth)+(dd/width)*sin(hth))/2;
  V(0,1)=(cos(hth)-(dd/width)*sin(hth))/2;
  V(1,0)=(sin(hth)-(dd/width)*cos(hth))/2;
  V(1,1)=(sin(hth)+(dd/width)*cos(hth))/2;
  V(2,0)=(-1/width);
  V(2,1)=(1/width);

  Eigen::MatrixXd G;
  G=Eigen::MatrixXd::Identity(3,3);
  G(0,2)=-dd*sin(hth);
  G(1,2)=cos(hth)*dd;

  Eigen::MatrixXd M=Eigen::MatrixXd::Zero(2,2);
  M(0,0)=left &lt 0? -1*left*kl:left*kl;
  M(1,1)=right &lt 0? -1*right*kr:right*kr;

  Eigen::MatrixXd R=V*M*V.transpose();
  Eigen::MatrixXd r2 = G*cv*G.transpose()+R;
  cv = r2;
  return;
}
</code>
```

Body:
I have read the book, and found it unnecessarily obtuse. Unfortunately, the code snippets will not be very helpful, since they will probably look exactly like the equations, while using a matrix library like Eigen, OpenCV, boost, or just Matlab.  To get a good understanding of a Kalman Filter, you should start with a review of multi-variate Gaussian random variables, then brush up on Taylor Series expansions, then realize we are just inventing a covariance matrix for the joint distribution of measurements and state.

For example, here's some code I wrote for a robotic rover which uses an EKF.

void DifferentialKinematics::ekfMeasurement(Eigen::MatrixXd&X,Eigen::MatrixXd&Q,Eigen::MatrixXd&Z,Eigen::MatrixXd&R){
  Eigen::MatrixXd I=Eigen::MatrixXd::Identity(3,3);
  Eigen::MatrixXd ZP = Eigen::MatrixXd(Z);
  Eigen::MatrixXd XP = Eigen::MatrixXd(X);
  Eigen::MatrixXd z = Z-X;
  Eigen::MatrixXd S =Q+R;

  Eigen::MatrixXd K=Q*S.inverse();

  X = X + K*(z);
  Q = (I-K)*Q;
}
/**
 * Update given wheel speeds left, right.
 * Both are in/out
 */
void DifferentialKinematics::ekfPredict(float left, float right, Eigen::MatrixXd&pose, Eigen::MatrixXd&cv){
  float hth=pose(2)+getTheta(left,right)/2;
  float dd = std::fabs(getVel(left,right));
  updatePose(left,right,pose);

  //Form Jacobian
  Eigen::MatrixXd V=Eigen::MatrixXd::Zero(3,2);
  V(0,0)=(cos(hth)+(dd/width)*sin(hth))/2;
  V(0,1)=(cos(hth)-(dd/width)*sin(hth))/2;
  V(1,0)=(sin(hth)-(dd/width)*cos(hth))/2;
  V(1,1)=(sin(hth)+(dd/width)*cos(hth))/2;
  V(2,0)=(-1/width);
  V(2,1)=(1/width);

  Eigen::MatrixXd G;
  G=Eigen::MatrixXd::Identity(3,3);
  G(0,2)=-dd*sin(hth);
  G(1,2)=cos(hth)*dd;

  Eigen::MatrixXd M=Eigen::MatrixXd::Zero(2,2);
  M(0,0)=left &lt 0? -1*left*kl:left*kl;
  M(1,1)=right &lt 0? -1*right*kr:right*kr;

  Eigen::MatrixXd R=V*M*V.transpose();
  Eigen::MatrixXd r2 = G*cv*G.transpose()+R;
  cv = r2;
  return;
}


问:
Communication in SWARM robotics
Hey so I am trying to research into SWARM robotics, and trying to find helpful information or even articles/papers to read on the process of setting up communication protocols between different robots. For instance using a LAN connection, does each robot need to have a wireless adapter, and how would I begin setting up a network for say 5-10 smaller robots?

More generally could someone help me understand how devices connect and communicate across networks? I understand the basics of IP addressing, but I haven't researched into further complexities.

Any advice or direction is appreciated.

答: While there are some tricks specific to SWARM and other multi-robot systems communications, it sounds like you need more learning of the basics before any of that would be useful to you. It sounds like you are using 802.11 (or maybe Zigbee based on your other questions). For these, there are lots of good (non robotics) resources for learning basic networking out there if you look for them that will be more useful than any answer you get here. </p>

Title: Communication in SWARM robotics


问:
Overview - what skills are needed for sensor fusion?
I want to make a list of what knowledge is necessary for sensor fusion. Since it has a wide array of possible applications, it is not clear where to begin studying. Can we please verify add topics that are in-scope, and specify to what extent?:

Digital Signal Processing course

Probability Course

Machine Learning - course at Coursera from Stanford University

Programming robotic car - course at Udacity

Knowledge of Matlab and Simulink - tutorials on mathworks webpage and offline help.

Basic knowledge about integrals, matrices operations, differential equations.

答: You can skip all but 2,6,5, if you want to learn how sensor information is fused to form a consistent estimate of something. 5 is optional but helpful. The best course you can take is a Optimal Estimation / Filtering course, and a Probabilities and Stochastic Processes course. Try MIT Courseware for both of those.</p>


问:
Base for home robot of a bigger size
I am trying to build a robot. But a bigger robot than a Raspberry Pi connected to some tiny something as big as a can of black Coke. I am planning to build a robot of a size 1.2-1.5m. I already have chosen some torso, arms and so, but, the problem is the base (bigger wheels, able to cope with weight of 10kg minimum).

I was thinking about using iRobot Create 2 platform, but it is not that robust and cannot pass a bit higher doorsteps. I want it let it go outdoors eventually. Do you know of some product or similar project? Every base which is sold in shop is very small, which can be used on a table and not something which could serve as a good robust mechanism with wheels, servos and everything...

答:
Check this one: https://www.dfrobot.com/index.php?route=product/product&product_id=63

It's more expensive than iRobot, but is much more customizable.

Title: Base for home robot of a bigger size


问:
I can't get motors to turn with Raspberry pi
I want to turn some motors using my raspberry pi. I am able to turn an LED on and off using the 3.3V GPIO pin. For the motors, I tried using a L293D chip as per the instructions on this link.

What happened is that the very first time I set the circuit up for one motor, it worked perfectly. But then, I moved the pi a little and the motor has since refused to work. I even bought a new pi and still no luck with the circuit. I then bought a L298N board that fits smugly on top of the GPIO pins of the pi and followed the instructions on the this video

Still no luck, the motor just won't run with either pi. I am using four AA batteries to power the motor and a connecting the pi to a power supply from the wall. What could possibly be the problem here?

答:
The same thing happens to me. When i connect my motor it works for the first time and after that it stop working. </p>

<p>Finally i figured out my breadboard was faulty. It may not be your case but do one thing connect all the wire by hand by pressing your finger tip and see what happens. </p>

Body:
The same thing happens to me. When i connect my motor it works for the first time and after that it stop working.

Finally i figured out my breadboard was faulty. It may not be your case but do one thing connect all the wire by hand by pressing your finger tip and see what happens.


问:
What types of actuators do these industrial bots use?
I have a particular example robot that interests me:

http://www.scmp.com/tech/innovation/article/1829834/foxconns-foxbot-army-close-hitting-chinese-market-track-meet-30-cent

See first image, the bigger robot on the left, in particular the shoulder pitch joint that would support the most weight. I'm curious because I know it's really hard to balance strength and precision in these types of robots, and want to know how close a hobbyist could get.

Would they be something similar to this: rotary tables w/ worm gears?

http://www.velmex.com/products/Rotary_Tables/Motorized-Rotary-Tables.html

Looking for more actuation schemes to research, thanks!

答:
A robot like the one you refer to probably has a mix of transmission types that increase in power-to-weight ratio and decrease in size and stiffness as you move outwards on the kinematic chain. The base joints likely have planetary or cycloidal gearing, with maybe some spur gears in the middle, and maybe a harmonic drive reducer at the end effector. I don't think worm gears are typically used with these sorts of revolute joints, unless there's maybe some special, application-specific tool on the end.

If you want to build a hobbyist robot that does some cool stuff, I'd stick with spur gears and planetary gears while you wade through the dozens of other difficulties in designing serial-link manipulators.

However, if you're looking to research interesting actuation schemes that maximize power-to-weight ratio and precision in a robotic joint, then harmonic drives are worth looking into. What you gain in compact size, power-to-weight ratio, and precision, you pay for in joint stiffness and friction losses, so your robot won't get snappy accelerations on the joints that use harmonic drives if that's something you're looking for. A serial chain that uses entirely harmonic drives will need to move pretty slowly to keep resonance under control. You can check out Rethink Robotics's Youtube videos to see what I'm talking about - I suspect they uses HDs on most if not all joints. Harmonic drives are also very difficult to assemble, since the gearing needs to be pre-strained, so they tend to cost a lot more.

Hope that answers your question. Good luck.


问:
Need a pushing mechanism
I'm new to robotics (and maybe it's not even robotics), and want to build a "pushing mechanism" to automatically push a "pop up stick" up from my kitchen bench (see product here: http://www.evoline.no/produkter/port/).

By design, the "pop up stick" is made to be dragged up by hand, but I want to install a mechanism under the bench, to do it by a trigger of some kind.

I'm a programmer, and I have some experience with Raspberry Pi. Does anybody have any hints of what products I could use to build this?

Thanks :)

答:
You could use a rack and pinion as a linear actuator. A simple way of knowing when to stop turning the motor could be a contract sensor/button at the upper and lower position.

You could also add something to compensate for gravity, like a spring or a counter weight, such that it does not fall down under its own weight (or also use "high" friction as used in the linked product, which will as require more force from the motor).

Title: Need a pushing mechanism


答:
Low cost (a relative term) linear actuators are available. [Here is one source] of many1.

Typically you need two parts, the actuator and the driving electronics (also called a motor driver, motor controller, or motor amplifier). The Pi will talk to the driver which will then make the actuator move.

Title: Need a pushing mechanism

Body:
I'm new to robotics (and maybe it's not even robotics), and want to build a "pushing mechanism" to automatically push a "pop up stick" up from my kitchen bench (see product here: http://www.evoline.no/produkter/port/).

By design, the "pop up stick" is made to be dragged up by hand, but I want to install a mechanism under the bench, to do it by a trigger of some kind.

I'm a programmer, and I have some experience with Raspberry Pi. Does anybody have any hints of what products I could use to build this?

Thanks :)


问:
Auto Stabilising Flight
At the moment this project is purely hypothetical but my friend and I were looking to make a model airplane which could stabilize its flight to be a straight line. Basically, we want there to a button on the controller or a separate transmitter which, when activated, would cause the plane to fly in a straight, horizontal line in whichever direction it was facing. The instrumentation we believe we would need is a three axis accelerometer, so that it can level the plane to fly horizontally with the ground and keep the roll and yaw steady. My question is, would this work? When I talked it over with my dad (who does a lot of this kind of thing) he suggested that we might need a Kalman filter to keep the instrumentation from gradually drifting off course but, being a high school student, that sounds a little intimidating. Any comments on feasibility or improvements would be greatly appreciated.</p>

答:
1- it would be better if you use a 9 DOF IMU (gyro, accelerometer, compass) and fuse the data to get a better estimate of the state of your model airplane

2- Then I would suggest that you study what is a PID controller so that you could control the variable of interest

3- The kalman filter your dad mentioned would be used to fuse the data of the IMU (point 1), it is indispensable as it would improve the state estimate

4- You could start without the kalman filter with a model that is not very stable and gradually improve it to employ a kalman filter (later you could even delve into particle filters)

5- It requires some work, as flight control is a bit tricky, but I think with some research you can do it (even though it is a little bit more advanced than high school level)

Title: Auto Stabilising Flight


答:
"Would they be something similar to this: rotary tables w/ worm gears?"

The used mechanisms would vary based on the size of the robotic arm and the application.

There would be plenty of gears used (spur gears, transmission belts, harmonic gears, etc.), depending on the size of the robotic arm and the application (big traditional industrial arm, cobot arm, small pick-n-place, etc.)

Concerning hobbyist versions, one of the main constraints is size (considering that the hobbyist is willing to pay for his robotic prototype), which would limit the design choices available.

How near hobbyist ones would get depends on what suppliers (hobbyist suppliers) would provide in the near future, because it is infeasible to custom make every single component.

Title: What types of actuators do these industrial bots use?

Body:
I have a particular example robot that interests me:

http://www.scmp.com/tech/innovation/article/1829834/foxconns-foxbot-army-close-hitting-chinese-market-track-meet-30-cent

See first image, the bigger robot on the left, in particular the shoulder pitch joint that would support the most weight. I'm curious because I know it's really hard to balance strength and precision in these types of robots, and want to know how close a hobbyist could get.

Would they be something similar to this: rotary tables w/ worm gears?

http://www.velmex.com/products/Rotary_Tables/Motorized-Rotary-Tables.html

Looking for more actuation schemes to research, thanks!


答:
Actuation is a complex subject that cannot be reduces to 1 component alone. It is the interaction of software electronics and mechanics. "Toy" servos tend to incorporate everything in one small package. Industrial robots have 3 or 4 separate components (each costing several hundred or a few thousand euros) instead.

To answer your question, worm gears are almost never used in the joints of industrial robots. Mostly cycloidal or planetary gears are used.

Transmission:
Many hobbyist project use small "toy" servos which are, basically a DC motor, some simple position feedback system and a transmission (+ the controller). The transmission is a 1, 2 or sometimes 3 stage simple gear reducer. Due to its low quality it sometimes has large backlash, so the output of the transmission can move a bit (approx. 0.1 degrees, value varies on quality)  even if the motor does not move. This leads to uncontrollable motions, vibrations due to jerk, etc.
The best "toy" servos you can get, to my knowledge are the Dynamixel servos.

Industrial robots us professional gearboxes with backlash below 0.2 arc minutes. Price for something that you pointed out in the picture is probably around 1000-3000 EUR. Typical manufacturers: ZF, Wittenstein, Nabtesco, Bonfiglioli.
Furthermore, the control algorithm applied backlash compensation to compensate these and further improve the precision.

Motor:
As mentioned, the "toy" servos use DC motor in most cases. DC motor in general my not be cheaper then PMSM (what industrial robots use, see below) but due to bulk manufacturing in small sizes and cheaper motor drivers, overall in the small size range, they may be cheaper to use.

Industrial robots use Permanent Magnet Synchronous Motors. They are less expensive in general as DC Motors (also due to lower maintenance costs, since there is no brush to change regularly). Power ranges for smaller robots are a few hundred watts for larger Robots a few kilowatts. Price for such a motor varies from approx. 300 EUR to 2000 EUR for the high powered ones. Most of them include (optionally) resolver or encoders for position control. These have high precision (up to 4048 values per rotation with additional signal for in-between values). Typical manufacturers form for motors ABB, Siemens, Bosch, Parker. For best performance, encoders are integrated in the motors.

Motor Controller
Toy servos use in most cases 1 Position control loop with PID control method. This is very simplistic and delivers bad performance.

Industrial motor controllers use cascaded control loops (each loop is a variant of PID) for position, velocity and torque. This increases significantly their performance. To increase the performance of the controllers, offset values are added to the control loops (known as feed forward control). This way the controllers cope easier with their task (e.g. if acceleration is needed, the fed forward controller applies an offset to the control output of the torque loop the make the reaction time faster, the weight of the robot is compensates as an offset value on the torque coming from a static model, etc.). Industrial motor controllers have the same manufacturers as motors. Usually it is best to use a matching manufacturer.

Another difference is how the reference signals are given to the motor controllers. This is "only software" so it seems not expensive, but a lot of reaseach is in this domain. THe question is how to plan trajectories between two points so that the motor controller can deliver its best perfromance. You can read about this here.

Al of thea measure above is to "balance strenght and precision" as you formulated. Servos in hobbyist application are nowhere near their counterparts in industrial robots in terms of build quality and performance. I am afraid there is no cheap solution to get the same performance. The cheapest way to improve the performance of hobby equipment it though software. Get a servo where the cascaded control is implementable (like the dynamixel ones) and implement trajectory generators (many robotics courses are available online, like the link I sent you) that plan a trajectory while limiting jerk. Fine tune the control loop of the servo for your robot (instead of accepting the factory default). Compensate anything than can be calculated, eg. the static torque needed to hold the robot still as a feed forward controller.

With the above measures you can at leas get the most out of the hobbyist hardware, which will already make a difference.


问:
Off position robot model - Inverse Kinematics
I had to make a Unity3D robot model(ABB IRB 1600-6R/6DOF), that given a desired end effector transformation matrix, it would calculate and rotate the robot joints to the appropriate angles(Inverse Kinematics Computation). I found some code in Robotics Toolbox for MATLAB that, lets say that you trust me, actually calculates the needed angles(its the general "offset" case in ikine6s.m) - but for a different zero angle position than my chosen one, which is corrected using  the appropriate offsets.

So, I have set my 3D robot model in Unity3D correctly, angles are correct, I give the same parameters in Robotics Toolbox in MATLAB and the results are the same, I plot the robot stance in MATLAB to see it-it's on position-, I then run the code in Unity3D and the robot model seems to move to the stance I saw in MATLAB but it is off position- the end effector is away from its desired position.

Am I missing something?

The scaling is correct. I have subtracted a translation (equal to the distance of the bottom of the model's base contact to the floor, to the start of the next link- as MATLAB doesnt calculate it) from the Y component of the desired position of the end effector(in its homogenous transformation matrix I use as the rotation part, the identity matrix, so we do not care about that part).
Here are some pictures showing my case(say Px, Py, Pz is my desired EE position):

MATLAB-This is the plot of the results of the MATLAB ikine6s with input Px, Py, Pz in the corresponding translation part of the desired homogenous transform matrix:

Unity3D-This is what I get for the same input and angles in Unity3D-the EE is off position(should be half inside white sphere):

答:
Is is hard to make out from the perspectives that you have included, but is seems that the matlap screenshot has a rotation of approx 45 degrees around the global z axis. Taking a look at the grid in the unitz screenshot it seems that the robot has also a 45 degree angle with the global vertical axes (y axis).

I would suggest the following:

Check if the units match. Matlab uses radians while unity in most cases uses degrees for rotation

Check succession of children and parent game object in unity. Make sure that the root coordinate system is the one you think it is and that each linkage is the child of the previous one.

make sure that the coordinate systems where each linkage meets the next one un Unity corresponds to the Matlab one. This might be tricky, due to different coordinate systems. In Unity each game object has its own coordinate system. There are no rules on how these are oriented and they might be left or right handed. The coordinate system in Matlab is left handed and it is oriented according to the DH convention. Make sure that the coordinate system at the joints in Unity are the same as in Matlab or the joint angles are correctly transformed.

make sure that both system use the same handed coordinate systems, adjust if not

lookup which Denavit Hartenberg convention is used in Matlab (proximal, distal, modified, classic) and follow that in Unity

If everything else fails (or you just do not want to bother with coordinate systems) and it is not important to squeeze out every bit of performance in Unity, you can use the built-in Inverse Kinematics in Unity.

UPDATE: build-in un Unity seems to only support humanoid models. Look in the assets tore for a free on which supports serial structures.

Troubleshooting:
Take the a MAtlab forward model. Get the position and orientation of each joint coordinate system in the global frame. Draw these in Unity in a global frame. See which is the first one which is not located at its corresponding joint. Fix then go forward until the last one is in place (at the EE).


问:
How can I make a motion tracking camera?
I'm looking into CCTV, and am interested in minimising costs by having a motion tracking camera cover an area that would otherwise utilise multiple cameras.

There is already something like this on the market manufactured by a company called NightWatcher (I think).  However, it does not track, it merely senses using 3 PIR's and points the camera in 1 of 3 positions. Ping ponging between them if the subject is between sensors.

I like the idea of this, but not the drawbacks, and was wondering if there was anything I could do with an arduino or similar to achieve a better result.

I stumbled across this, but am not entirely sure about it. Also this is for outside application, and that thread is for indoor (if that makes a difference).

https://robotics.stackexchange.com/a/1397/9751

Edit...

Just in case I have mislead you, I want to have a unit where sensors detect movement and then a camera to face that position.

答:
I find it is all fine and good to discuss a problem but sometimes users need a working example albeit not in their preferred programming language.  I have used face detection tracking for robotics behaviors but this has many problems like lighting, faces not visible, profile or back of head Etc.

Motion tracking is better. Using example code I developed some Raspberry Pi camera python code to do real time motion tracking based on diff file method mentioned above.  Code is on github https://github.com/pageauc/motion-track and YouTube video here https://youtu.be/09JS7twPBsQ (most of my stuff has a video associated with it)

The python code can be modified to run on other platforms and systems. From this demo I developed a real time object speed camera and a simple hotspot game that can be found in the same repo.
Recently I have been working on Camera Tracking. Instead of tracking motion in the FOV (field of view) I track actual camera movement.  This uses a little different technique than image diff method.  I am working on further developing this to use in robotics where there are no wheel encoders.  This would use the background to find high value target search rectangles from the video background image (not signs or symbols) to aid in correcting navigation errors for straight line and turns. See my github repo for details and more explanation
Real time speed on a RPI 3 is quite good.

So these are a few real world examples to your question that may be useful if you also have the prerequisite programming skills and/or learn time.  Camera Pan/tilt servo system can actively scan an area and detect and track moving object(s) using just a computer controlled camera setup without the need for special sensors although this would be useful for night operation.

Now I don't claim to be the best coder but a lot of googling will get you a long way there if you keep trying.  I also like to post video of projects although they can go out of date after a while.  My experience with some opencv video is that quite often there is no code repo reference.  Just video with no good sound or vocal explanation and poorly demonstrated.  This is like showing a video of cars driving by quickly to explain how vehicle chassis, electrical and power train systems work.  Just my observation.

A lot of times products don't do what you would like or are too expensive.  Developing your own solution is sometimes not the best approach if you factor in your time and effort unless you do it as a hobby.  For example, I would not think of developing a custom dash cam solution since there are many good, inexpensive product solutions on the market.


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

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

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

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

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

Any and all advice is appreciated.

Thank you.

答:
I assume input is the X and Y coordinates of E.
In this case, unless you know the orientation also, there is no straightforward way to calculate the coordinates of C and D.

I would write 2 parameterized circle or distance equations around A and B.
The $C_x$, $C_y$ and $D_x$ and $D_y$ are unknown. (4 unknowns in this system and 2 equations)
Distance from E to D and distance from E to C can be written and so there is a system with 4 equations and 4 unknowns where besides the unknowns all other parameters shoulds be known.

Solve for C and D coordinates and calculate distances to A and B and it is done. I do not think that the equation system will have an explicit solution but a numerical solver (like Newton-Raphson) can be used to solve it iteratively.

Or search for 5 bar linkage inverse kinematics and maybe that will inspire a solution.


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

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

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

答:
Neural networks are not the best by a loooong shot. Neural networks are not AI, they are a way to do regression and classification. If you don't know what those things are, then you have no business working with Neural Networks.

What you have described is a mapping problem. You need two things from a good algorithm in this case:

Coverage. You need to ensure that the robot can reach every part of the maze. If it cannot, then it might not find the exit / entrance.

Mapping. You need to ensure that you can keep track of all the obstacles.

Without more information about the type of maze, type of robot, and type of obstacles, I'm afraid this problem is under-determined.


问:
Differential GPS or Simple GPS for Robot navigation and odometry?
I am building a rover which can navigate autonomously. I do not want to use wheel encoders for generating robot odometry since it causes drifts due to slippage etc.
I want to use GPS for generating odometry. Will it be useful for me to use the differential GPS approach or shall I use a simple GPS?
I am thinking of using DGPS because it enhances the accuracy to great extent, But at the same time, I think that in generating odometry, absolute gps values are not of importance. Instead, relative gps values are important to find for example, the distance covered by the robot.

Any suggestions on this ? Thanks

答:
Do not give up on encoders. They are a great complement to GPS. I don't know what precision you want to reach, or what terrain your robot will operate in, but wherever it will be, encoders will give you good information about momentary position changes. Of course it will have some error, but when measured over small time period (i.e. 1s) it will be typically much smaller than accuracy of even DGPS.

The problem is encoder error will accumulate over time, so eventually your robot will end up in a completely different position than it should. That's why you should use your GPS data to correct data from encoders (possibly using Kalman filter). Check out this great answer about a sensor fusion.

Benefits of using GPS + encoders:

GPS signal may be lost (indoors, tall buildings nearby, tunnels, etc.) - how will you know where are you then?

Even when you lay down your GPS receiver on a table, the position will slowly drift around some central point - data from encoders may be used to correct for that. This is also the reason why you can't use GPS data to calculate distance covered by the robot (not with a ~1m accuracy at least)

encoders are useful to controlling robot speed, and making sure that it drives straight (which is very hard using open loop PWM)

GPS vs DGPS

Remember that accuracy of i.e. +/- 2m doesn't mean that you will have a constant offset from real position to the north, or any other direction. The readings will float around some position. That's why I would suggest going for higher precision modules


答:
If your budget is large (>\$ 5000) then use an off-the-shelf RTK GPS and you will get a precision of around 1.5cm $\sigma$.
You will also need a RTK subscription and internet connection, or set up your own base station to provide atmospheric corrections (valid for 20-30km).

Alternatively there is this low-cost RTK unit.

However I have previously used a low cost (< \$300USD) setup with a L1 GPS, IMU and camera (making observations of landmarks) using an extended Kalman filter in order to get <7cm $\sigma$ accuracy. I say accuracy rather than precision because I did a simulation using the sensor specs and so I knew the ground truth. I didn't use encoders but I would highly recommend it.
From memory it took me around 4 days to implement and debug the filter.

See also GPS + odometry + camera/laser SLAM algorithms which may solve your problem.

Title: Differential GPS or Simple GPS for Robot navigation and odometry?

Body:
I am building a rover which can navigate autonomously. I do not want to use wheel encoders for generating robot odometry since it causes drifts due to slippage etc.
I want to use GPS for generating odometry. Will it be useful for me to use the differential GPS approach or shall I use a simple GPS?
I am thinking of using DGPS because it enhances the accuracy to great extent, But at the same time, I think that in generating odometry, absolute gps values are not of importance. Instead, relative gps values are important to find for example, the distance covered by the robot.

Any suggestions on this ? Thanks


问:
Difference between an underactuated system, and a nonholonomic system
What's the difference between an underactuated system, and a nonholonomic system? I have read that "the car is a good example of a nonholonomic vehicle: it has only two controls, but its configuration space has dimension 3.". But I thought that an underactuated system was one where the number of actuators is less than the number of degrees of freedom. So are they the same?</p>

答: Underactuation leads to nonholonomic constraints (non-integrable kinematic or dynamic equations) in mechanical systems. </p>