问:
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 believe your question starts with 'how do I configure and talk to a TI CC2500 transceiver from Windows treating it as a USB Virtual COM Port'.

Unfortunately, the answer to this is going to be very specific to the TI CC2500 device.  You'll need to load a driver.  You'll need to understand the communications protocol the CC2500 uses over the serial port.

I'd recommend seeking help from a community closer to your device.  I haven't seen people using the TI CC2500 in robotics before, so there may not be anyone on this forum familiar with it.  Try the TI E2E Community or contact one of their customer support centers.

Good luck with your project.  If you were to say using an Arduino with a Zigbee or Bluetooth communications chip in place of your TI CC2500 I think you'd find better support in the robotics community.

ContentLicense: CC BY-SA 3.0

Title: How do we make our robot work?


问:
Simulating Dynamixel motors in Gazebo
I'm trying to simulate a humanoid robot using Gazebo with plugins. Since our actual model uses Dynamixel motors, I'd like to know how exactly they work to make the simulation as realistic as possible.

Gazebo offers two options to control joints. One is a PID controller, provided by the JointController class. The other way is to directly set a torque to the joint. (The PID method too is ultimately implemented using torques).

Currently, I'm trying the PID-based implementation. I've used a P-only controller with damping on all joints (I've had to guess both values). However, there is a large amount of noise, and the difference between actual and desired position is at times as much as 10-12 degrees (especially when the foot of the robot hits the ground).

Does the actual motor use a PID controller as well? I can't seem to find the details here, Dynamixel EX-106 User's guide, but this link, Dynamixel EX-106+ Robot Actuator mentions "Compliance/PID : Yes".

If the motor does use a PID controller, then what are the parameters? And how does it allow us to set moving speed then?

If the motor doesn't use a PID controller, then what is the pattern of torque provided? In the manual (first link), I found this

From the current position 200 to 491 ( 512-16-5=491 ), movement  is
  made  with appropriate  torque  to  reach  the  set  speed; from  491
  to  507  ( 512-5=507 ), torque is continuously reduced to the Punch
  value; from  507  through 517 (  512+5=517  ), no torque is generated.

This is rather vague though, and no further details are provided.

Also, I'm aware that extremely high damping and extremely high P-values might do the trick. But I want to simulate what actually happens on the motors, and that is probably not the way to go.

I'd appreciate it if anyone has any idea of what Dynamixel servos do, or examples of simulated Dynamixel motors anywhere else.

答: Based on the figure on pg 27 of the manual, it looks like the EX-106 implements a simple proportional controller, with a deadband when the servo is very close to the goal position. The manual calls the Proportional term "compliance slope" and calls the deadband width "compliance margin." Looks like you can use a different Proportional term in the clockwise direction than in the counterclockwise direction. There don't seem to be integral or differential terms.</p>

Title: Simulating Dynamixel motors in Gazebo


问:
Control of WMR (Wheeled Mobile Robot) in 3D
I've implemented SMC (Sliding Mode Controller) on WMR in both X-Y and X-Z plane.
Now i want to combine both of these to control WMR in 3D. For this purpose I'm trying to use resultant vector of simulation in XY plane and track that resultant vector in XZ plane as value of X in previously designed code.  Tracking control of resultant vector is shown in figure 1 while Vector sum decomposed in rectangular coordinates after simulation is shown in figure 2.

Am I going wrong?

What other tecniques can I apply to do 3D control of vehicle using Sliding Mode Controller.

Can i reduce the time delay offset? I've implemented right equations for SMC tracking controller equations but simulation does not gives exact results.These equations work well for control of vehicle in two dimensions (X-Z plane).

答:
In general, the time delay is a function of your system dynamics (mass of your robot, max torque and max velocity of your motors). Feedforward control or a planning algorithm can help with this depending on how much information about the future motion you have.

There is not enough information in your question to guess what issues might exist with the control.

Is it possible that your control assumes no slipping (sideways movement of the vehicle) and your simulation has a poor friction/contact model that does allow slipping?

Questions

I've implemented SMC (Sliding Mode Controller) on WMR in both X-Y and
  X-Z plane.

I assume that XYZ refers to cartesian directions. Are you controlling the position or pose of your robot in the X-Y plane? What are you trying control in the X-Z plane? Are you setting a goal Z position? A wheeled mobile robot is constrained to the surface it rests on, so while controlling the position on the surface projected onto the X-Y plane makes sense, controlling the robot in X,Y, and Z is difficult to understand.


问:
Solving Inverse Kinematics with Non-Linear Least Squares
I want to write my own inverse kinematics solver, and I have been recommended to use Google's Ceres Solver to help. Now, according to the documentation, Ceres Solver is usually used for non-linear least squares problems (http://ceres-solver.org/nnls_tutorial.html). This minimises the sum of squared differences between the measured and target values, over all data. What I am confused about, is how this relates to inverse kinematics.

In inverse kinematics, with the example of a robot arm, the goal is to determine what joint angles the robot should be positioned in, in order to reach a target end effector pose. There exists a single equation which determines the end effector pose, given the set of joint angles, and we want to determine the parameters in that equation (the joint angles).

But how does this relate to the least-squares problem, where there are multiple measurements? Is the problem I am trying to solve essentially the same, except that the number of measurements is one? And in that case, is using Ceres Solver's non-linear least squares solver really necessary?

Thanks!

答:
The inverse kinematics problem can be stated as a nonlinear constrained least-squares optimization, which is in its simplest form as follows:

$$
\mathbf{q}^*=\arg\min_{\mathbf{q} \in \mathbb{R}^n} \left\| \mathbf{x}_d-K \left( \mathbf{q} \right) \right\|^2 \\
\text{s.t.} \quad \mathbf{q}_l<\mathbf{q}<\mathbf{q}_u
$$

where $\mathbf{q}$ is the vector of the $n$ independent joint angles, $\mathbf{x}_d$ is the desired Cartesian pose comprising target position and orientation of the end-effector, and $K\left(\cdot\right)$ is the forward kinematic map. The minimization must be carried out without violating the lower and upper joints bounds, $\mathbf{q}_l$ and $\mathbf{q}_u$ respectively.

Therefore, you are right - in a sense - saying that there exists only one measurement you have to account for, if compared with the traditional least-squares setting.

Concerning how we can solve the problem, there's a large number of traditional techniques that do not resort to sophisticated optimizations: Jacobian transposed, Jacobian pseudoinverse, a synergy of the two termed Damped Least-Squares, to cite the most known. Thus, it's not necessary to employ Ceres, for example, as back-end to implement your solver.

Nonetheless, lately there's been an increasing attention in the community to the use of Sequential Quadratic Programming and more generally nonlinear methods: see for example [1] for a extensive survey. The reason for that is the significant amount of benefits you'll get with a nonlinear optimizer:

robustness against singularities and out-of-reach targets

better handling of joints bounds

possibility to deal with higher number of linear/nonlinear constraints

scalability with the number of DoFs

and more...

Personally, I developed in the past a nonlinear inverse kinematics solver using Ipopt for a humanoid robot ([2]) and I found that I managed to easily outperform other standard techniques, as those provided by KDL.

Thereby, my warm suggestion is to go with Ceres, Ipopt or other equivalent optimizers.

References

[1] TRAC-IK: An open-source library for improved solving of generic inverse kinematics.

[2] An experimental evaluation of a novel minimum-jerk cartesian controller for humanoid robots.


问:
How to produce a continuous variation of a discontinuous function?
I have a differential equation that connects the "velocity" of a point in the FOV of a camera with the velocities of a robot's joints, that is $$\dot s=J(s) \dot q$$ where s is a vector with the $x$,$y$ coordinates of the point in the FOV, $J$ is the interaction matrix and $q$ is the vector of the joint positions.

If I have a certain point whose velocity I am tracking and this point remains in the FOV, then $\dot s$ is well defined. But if I change this point online, that is at the time instant $t$ I have point $s_t$ and at the time instant $t+dt$ I have the point $s_{t+dt}$, then $\dot s$ is not defined.

Can I create a filter to produce a continuous variation of $\dot s$? If not, what can I do?

More specifically, I want to perform occlusion avoidance. In order to do this I want to compute the minimum distance of each feature point of my target object from the possibly occluding object. But, obviously, this distance can be discontinuous due to the fact that another possibly occluding object can appear in the FOV nearer to my target than the previously measured.

答:
It happens many times that set-points fed in our systems do change in a step-wise manner. Your intuition of filtering those variations is correct and represents a common practice.

Here I'd give two cases:

You have direct access to $\dot{s}$, which is thus your velocity reference varying step-wise. Then, you could consider a simple frequency based filter, which does a pretty good job.

You have access to $s$, which is your position set-point, possibly varying step-wise. I therefore assume you're then computing the corresponding velocity $\dot{s}$ by means of differentiation, which is intrinsically an ill-posed method that enhances noise. In this context, my warm advice is to apply state-space filtering to $s$, which not only smooths out step-wise transitions in the input position, but also provides you with robust estimates of the velocity.

The second approach falls within the well known area of Kalman filtering, on which there is a wide availability of material and results in literature. In essence, it's a matter of choosing a template dynamical model underlying your observations $s$ and the filter will give you back the estimated internal state comprising the velocity $\dot{s}$.

Typical selections foresee a model describing a constant speed dynamics with noise on the acceleration, and observed positions. Higher order templates (e.g. constant acceleration with noise on the jerk and so on) are also possible.

Even though your point in the FOV won't move in accordance with the chosen template, the filter will significantly smooth out the velocity during fast transitions, as you desire.


问:
Chaining Kalman filters
My team is building a robot to navigate autonomously in an outdoor environment. We recently got a new integrated IMU/GPS sensor which apparently does some extended Kalman filtering on-chip. It gives pitch, roll, and yaw, north, east, and down velocities, and latitude and longitude.

However, we also have some encoders attached to our wheels, which provide linear and angular velocities. Before we got this new IMU/GPS sensor, we made our own EKF to estimate our state using the encoders and some other low-cost sensors. We want to use this new sensor's on-chip filter, but also incorporate our encoders into the mix.

Is there any problem with chaining the filters? What I mean is, we'd use the output of the IMU/GPS sensor's on-chip EKF as an update to our own EKF, just as we use the data read from the encoders as an update to our EKF. It seems reasonable to me, but I was wondering what is usually supposed to be done in this case.

答:
You can use the INS / GPS as updates to the output of your first EKF. This is, in fact, not chaining, but simply conditioning the estimate based on the added information from the INS / GPS.

Suppose we have the following functions:

$x_{t+1|t}$, $P_{t+1|t}$ = EKF_PREDICT($x_t$, $P_t$, $u_t$), for inputs as state $x$, covariance $P$, and control inputs (estimated by odometry) $u_t$.

and

$x_{t+1|t+1}$, $P_{t+1|t+1}$ = EKF_UPDATE($x_{t+1|t}$, $P_{t+1|t}$, $\hat{x}_{t+1}$).

The estimates from sensors are the $\hat{x}_{t+1}$. We have things like:

$\hat{x}^{gps}_{t+1} = f(GPS)$

$\hat{x}^{map}_{t+1} = f(map)$

$\hat{x}^{ins}_{t+1} = f(INS)$

etc for all other ways of estimating the state of the robot.
So running the function EKF_UPDATE for all of those sensors is good enough.

Your loop will be something like this:

for all time $t$

Let $u_t$ be the current odometry / kinematic estimate of pose, and $R_u$ be the noise on that estimate.

$x_{t+1|t}$, $P_{t+1|t}$ = EKF_PREDICT($x_t$, $P_t$, $u_t$, $R_u$)

for all sensors $S$,

Let $\hat{x}^{S}_{t+1}$ be the estimate of the pose from that sensor, and $R_{S}$ be the noise on that estimate

$x_{t+1|t+1}$, $P_{t+1|t+1}$ = EKF_UPDATE($x_{t+1|t}$, $P_{t+1|t}$, $\hat{x}_{t+1}, R_S$).

end-for

end-for

Some caveats are:

Since we're using the EKF, there is no guarantee that the estimate is independent of the ordering of the updates. That is, if you do INS then GPS, the resulting estimate might be different than if you update with GPS then INS. This is usally not a big deal, but the filter will requiring significantly more tuning.

Please be aware your INS has a bias and drift, which might affect your long-term reliability. GPS can help you a lot here. Most literature simultaneously estimates the bias and drift in the INS.

Title: Chaining Kalman filters


问:
How to compile arm compatible binary from an x86 precompiled library on a pc host to be run on an arm target?
I am using a library precompiled on x86 on my pc (x86_64). Does there exist any toolchain to compile the x86 library and in the end generate an executable for armv7l ubuntu?</p>

答:
Short answer: No. Suggested alternatives below.

The purpose of a compiler is to turn source code into something a machine with a particular computer architecture, like x86, can run. ARM7 is a different architecture. A tool that could statically convert a program from one machine architecture to the other and guarantee the 'correct' program results would be awesome... but it would also pretty much be crazy AI. You DO however, have practical options to move forward. These options are sorted from simplest to most complicated:

See if your library comes precompiled for ARM7 already, as this asker wanted to know.

If you have enough memory and processor resources on your ARM7 machine, you can use WINE for ARM. Your ARM7 machine runs a Windows emulator, and you can run your x86 program inside the emulator.

Willing to run the program remotely over a network and get the results to your ARM7 machine? It's SSH time! Open a connection, run your program somewhere else, and get the results.

Do you have the source code and can you compile programs from your ARM7 machine? Put the source code on the ARM7 ubuntu machine, then compile it there.

Do you have the source code, but your ARM7 device is too small or bare bones to run a compiler? Then you can "cross compile", where you use a compiler meant to create programs for Machine Architecture A (ARM7), but you run that compiler on Machine Architecture B (x86).

(WARNING, HERE BE DRAGONS, LEGALLY MURKY AREAS, AND ENTIRE DOCTORAL THESES. DON'T DO THIS UNLESS YOU HAVE THAT KIND OF TIME OR INTELLECTUAL INTEREST.) Don't have the source code, and can't use your ARM7 to emulate x86 or talk to a different x86 computer? Your remaining option is hacking. You will need to decompile the binary you have and recompile it for the ARM7. This is technologically possible, so I've included it, but it's not for the faint of heart.


问:
Stabilising an inverted pendulum
With the problem of stabilising an inverted pendulum on a cart, it's clear that the cart needs to move toward the side the pendulum leans. But for a given angle $\theta$, how much should the cart move, and how fast? Is there a theory determining the distance and speed of the cart or is it just trial and error? I've seen quite a few videos of inverted pendulum, but it's not clear how the distance and speed are determined.</p>

答:
There are lots of ways to solve this problem, which falls into the category of Control Engineering.  There are two standard approaches:

Classical Control:  The control command has to be proportional to a linear combination of the error, the rate of change of the error, and the integral over time of the error, a.k.a. a PID controller.   This approach requires you to tune three parameters controlling which dictate how much gain should be used in proportion to the three aforementioned measurements.  This can be done manually by trial and error, but more sophisticated approaches exist such as Ziegler-Nichols tuning.

Optimal Control:  construct a cost function which is constrained by the system's dynamics and obtain it's minimum.  A common choice is a quadratic cost function in terms of the state vector and the control command, leading to a thing called an LQR controller.  The minimum is obtained by solving the Riccati equations, for which there are standard numerical techniques.

In my personal experience, LQR gives better results, but requires a bit of computational power and mathematical understanding to accomplish.  PID is, by far, easier to implement and doesn't require a whole lot of mathematical understanding to do, but may not perform as robustly as you wish.

In any case, you will need sensors to detect the pendulum's angle and either its rate of change in angle, or a data recorder to accumulate the error over time, or both.

Also, you may find that your sensors do not always give correct values, due to cheap technology or unexpected disturbances, in which case you also need to account for uncertainty in measurements.  A Kalman filter would be needed in such a case, and a sophisticated mathematical understanding will of the dynamics be needed to develop one properly.

Title: Stabilising an inverted pendulum


答:
The theory that describes what you are looking for is call Control Theory. Search for the Nonlinear Systems textbook by Hassan Khalil for an excellent overview of the material--the inverted pendulum problem is addressed explicitly.

To theoretically stabilize the inverted pendulum on the cart, a model of the dynamics of the system are needed and can easily be found on the web. The next step is to find a state space representation of the dynamics. With the state space represented, there are two options--linearize the dynamics around the desired equilibrium (balanced pendulum bob angle of zero degrees from vertical) or utilize the nonlinear dynamics directly. Most projects that I have seen use linearization. At this point, a desired output must be chosen, and a controller accomplishing this objective must be found--this is the bread and butter of Control Theory, and it is non-trivial to do so. For linearized inverted pendulum systems, PID control is typically used.

So to answer your question: yes, there is theory; no, it isn't (shouldn't be) trial and error, and yes, it is hard to accomplish.

Title: Stabilising an inverted pendulum

Body: With the problem of stabilising an inverted pendulum on a cart, it's clear that the cart needs to move toward the side the pendulum leans. But for a given angle $\theta$, how much should the cart move, and how fast? Is there a theory determining the distance and speed of the cart or is it just trial and error? I've seen quite a few videos of inverted pendulum, but it's not clear how the distance and speed are determined.</p>


问:
Design in the robotics world
Apologies if this isn't really the right place to be asking, but I was wondering whether third party design firms are ever contracted to design industrial and or consumer robots?

If not is it something that is usually done in house, and who within an org would usually take care of this process?

Thanks.

答:
Robots are often made multi-purpose.
They're usually not redesigned for every other application, that'd cost quite a lot.

A company that would like to use a robot, (let's say a packaging company) often doesn't have the knowledge (or experience) in designing and manufacturing robots.

The company that would like to use a robot, often doesn't even have the knowledge to program/implement it into their workflow.

Let's say there is a company that's selling bottles of water, called WaterB. Pretty straight forward. Since they do not design robots on a daily basis, they're unlikely to have personnel that can design and "create" a robot efficiently. It will not be cost effective to design a robot for a one-off, and it will have some "quirks" since it's the first version of a company with no experience.

The WaterB company now has a choice, hire another company to design a completely new robot, buy an existing model (and implement it themselves) or hire an "system integrator" (company).

Usually, they'll hire a system integrator, they'll go over the benefits and problems that robots may have and check if there are points in the bottling proces where robots can be used efficiently.

WaterB (or if used, the system integrator) will then most likely buy an existing model of robot, and program it to "palletize" the water bottles.

So yes, there are companies that design and manufacture robots (obviously), but it's often not really something you do "in-house". Due to the long design, development, testing and certification proces.

Designing/developing a robot usually only pays back when you're going to sell multiple of them.

Title: Design in the robotics world


问:
How to go around in a circle?
I have the mBot robot and I'm trying to get it to go to the other side of a cylindral obstacle.

Something like this:

What I know:

Radius of the cylinder - r

Robot's distance from the cylinder

Wheel thickness - 1.5 cm

Distance between the middle of each wheel - 11.5 cm

How would I achieve the above path?

The only thing I saw was this SO question that says:

The distance between the left and right wheel of the robot is 6
  inches.

So the left wheel should travel at a distance of 2(pi)(radius+6)

And the right wheel should travel at a distance of 2(pi) (radius-6)

The problem with my robot is that you can't tell it to go 20cm to the right, nor can you tell it to turn 90 degrees to the right.

All you can do is set each motor's speed 0-255, so there's not way to put it in the formula disatance = time x speed.

I assume I have to set each motor's speed to a different value so they would go in a circle of radius x and then just exit at the half of the circle (like shown in the picture)

答:
The distance travelled is directly proportional to speed $s = v*t$, so if you want to achieve specific distance ratio, the ratio of wheel speeds should be the same:
$${{s_{left}} \over {s_{right}}} = {{v_{left}*t} \over {v_{right}}*t}$$
Be warned though, that without encoders, you won't be able to accurately set speed (wheel speed with the same PWM for left and right motor may be different), so the robot will follow given path only approximately.</p>

Title: How to go around in a circle?


答:
The robot will drive towards the cylinder.

The robot should make  90 degree turn.

The robot should drive, with one wheel going slower as the other. (But it will be an constant).

Between point 2 & 3 in the image, the displacement of the robot will be 90 degrees turned in 2*R*Pi/4 distance.

For the wheels, indeed:
2*(Radius-6)Pi/4 and 2(Radius+6)*Pi/4

The time of both wheels need to be the same.
So, if you want to do this path in 10 seconds:

One wheel will be set at (2*(Radius-6)Pi/4) inch/s.
And the other wheel at (2(Radius+6)*Pi/4) inch/s.

But as Mactro mentions, the ratio should be the same.

(2 * (100 - 6) * Pi) / 4 = 147.654854719
(2 * (100 + 6) * Pi) / 4 = 166.50441064

So, 148/167 ratio for a 100 inch radius.

Title: How to go around in a circle?

Body:
I have the mBot robot and I'm trying to get it to go to the other side of a cylindral obstacle.

Something like this:

What I know:

Radius of the cylinder - r

Robot's distance from the cylinder

Wheel thickness - 1.5 cm

Distance between the middle of each wheel - 11.5 cm

How would I achieve the above path?

The only thing I saw was this SO question that says:

The distance between the left and right wheel of the robot is 6
  inches.

So the left wheel should travel at a distance of 2(pi)(radius+6)

And the right wheel should travel at a distance of 2(pi) (radius-6)

The problem with my robot is that you can't tell it to go 20cm to the right, nor can you tell it to turn 90 degrees to the right.

All you can do is set each motor's speed 0-255, so there's not way to put it in the formula disatance = time x speed.

I assume I have to set each motor's speed to a different value so they would go in a circle of radius x and then just exit at the half of the circle (like shown in the picture)


问:
Should I use gyro or encoders for robot moving in straight line?
I've recently succeeded in building my first collision-avoidance Arduino robot with 2 DC motors, and it works pretty well. However, it doesn't move in a straight line yet, when it should. I'm now studying which method should I implement to make the robot go straight. I've heard about using IMU or encoders with feedback control. I pretty much understand how to use the encoders, but I'm not sure about the gyro. Should I use just one of those or a combination of them?</p>

答: Either is going to require feedback control (PID or some subset thereof) to function correctly. I personally have had the most success with encoders, however, I haven't spent a ton of time with accelerometers, but I would assume unless you have an accurate one it may be kind of a pain. Encoders are usually built into motors and are fairly idiot proof. </p>


答: There is no good substitute for knowing exactly what your wheels are doing. Even with a gyro, you may not get a straight line, as all gyros have drift (and the ones with low drift are expensive). Also, a gyro won't allow you to accurately control wheel speed and won't tell you when a wheel is slipping or stuck. Encoders will buy you much more than a gyro.</p>

Title: Should I use gyro or encoders for robot moving in straight line?

Body: I've recently succeeded in building my first collision-avoidance Arduino robot with 2 DC motors, and it works pretty well. However, it doesn't move in a straight line yet, when it should. I'm now studying which method should I implement to make the robot go straight. I've heard about using IMU or encoders with feedback control. I pretty much understand how to use the encoders, but I'm not sure about the gyro. Should I use just one of those or a combination of them?</p>


答:
Your assesment of the situation seems correct. You have no robot body or wheel distance measurement that you can easily use. You need two pieces of the distance,velocity,time equation to do something that can work.

You best option is to ask the mBot developers to add some time functions to the arduino library (or perhaps this is available somewhere else, or something you can hack). You can then command a velocity, measure the time elapsed, and guess the distance you have moved. You can also change the velocity based on the elapsed time to approximate the shape you want.

The results will not be perfect but you will be able to use and learn the basic equations for differential drive robots. This will serve you if you continue working with robots and get a more capable one with wheel encoders or other position sensing.

Title: How to go around in a circle?


答:
The problem here is that you are trying to drive in a straight line without any external reference. Wheels slip (making encoders give error), gyro's drive (so there's error there to), magnetometers have issues with nearby magnets, and GPS may not work on the scale you want it to. So what are we left with? Sensor fusion.

If we use a combination of an encoders (to measure the actual wheel speed) with a gyro (to measure the short-term rotation changes), with a magnetometer (to achieve long-term direction management).

Hang on, this is getting expensive and hard. How long did you want to drive in a straight line for? 1m, 100m, 100km? What terrain. If it's a tabletop, encoders or a gyro would work. If it's off road, you need more.

Encoders

An encoder gives ... rotational velocity of the wheel. You can integrate this into rotational angle of the wheel to determine how far you've moved. You can compare this with the other wheel's distance to figure out whether the robot has rotated. At high speeds, you need to poll the encoder really fast, or set up interrupts.

Gyro

Don't ask me how a solid state gyro works, but it gives you the rotation change of the robot directly. Unfortunately, this include the rotation of the earth, and so gyro's drift over time. In my experience, with a small RC car-sized robot over ten minutes, the drive of even a cheap gyro is negligible. Once again you're integrating though, so you have to poll it quite fast, and most gyro's talk over i2c, which can be a bit of a pain.

Note that the accuracy of a gyro depends on it's mounting as well. If it's subject to lots of vibration, it will drift faster.

Magnetometer/compass

With some soft iron, you can shield them from your motors just fine, and they provide and absolute orientation relative to earth. Sounds great? Yup, worked fine one one of my robots, but on the competetion day, someone else had three magnets capable of lifting 25kg each. My robot went into orbit around it.
But, if you can ensure that there aren't going to be massive magnets near your robot (other than the robots own motors, which you can shield and then calibrate out to some extent), you can get ~2-3 degree accuracy with very little effort.

Fusing

If you spend a couple more dollars, you can find a 10DOF board that includes a gyroscope, magnetometer (and accelerometer and barometer). Then you can apply some sensor filtering to combine the long-term accuracy of the magnetometer (assuming you drive past the magnets) with the short term (ok, ten minutes or so) sub-degree accuracy of a gyro. Where did the encoders go? Well, I tend to deal with vehicles with tracks (which slip) or offroad (which slip), so I haven't worked with encoders as much as the others.

The physical device that I use in my hobby projects is the GY-87 10DOF board, which uses the MPU6050 accelerometer-gyro and the HMC5883L magnetometer. You speak i2c to the MPU6050, and the MPU6050 can speak to the HMC5883L for you.


问:
Build a simple robot to learn ROS
I am a beginner to ROS and I wanted to know if I could build a simple robot to learn ROS.
I currently have the following components available:

Arduino Uno

Simple two wheeled robot chassis

Some motors

L293D motor driver

Some ultrasonic sensors

Some infrared sensors

答:
ROS generally requires a full x86 or x64 computer, such as an Intel NUC. This can then communicate to things like arduino, but the brains of the computer is in the NUC.

As such, ROS is intended for large projects, and may be unsuitable for a hobby project. If this is to be your first adventures into robotics, stick with arduino for now. When you want to build a robot that can vacuum your house, wash the dishes and drive your car, then ROS is probably the thing for you.

Title: Build a simple robot to learn ROS


问:
Raspberry pi 3 location in a set field, no gps
I'm developing a project which involves a raspberry pi 3 remote control rover and I need to know the exact location of the raspberry pi rover in a set field.

Let's say I have four logs, one in each corner of the square field (the goal right now is to extend this to any shape field, any number of corners), every of them equipped with (some kind of wave technology) that allows me to triangulate the position (based on signal intensity) of the raspberry pi rover.

The distance between logs should not be bigger than 30m (~100feet) and there is no line of sight guaranted.

The question is: Which kind of technology should I use, infrared, wifi, bluetooth, radio, ultrasound, etc? or, is there any better approach to this problem?

答: Infrared and ultrasound are blocked by obstacles. Since you cannot guarantee a line-of-sight, eliminate these two. WiFi, Bluetooth and radio (RF) will have the range you need and should be able to penetrate obstacles you are likely to have, then you would use their relative signal strength (RSSI) to do your triangulation calculation.</p>

OwnerDisplayName: tlhIngan


答:
ROS is a sophisticated Robotics platform. So the minimum, You'll need a board with an operating system capabilities, like Raspberry Pi, banana pi, or beaglebone (you could try very cheap orange pi).

Or theoretically (I would like to try this too), you can make a tethered Arduino board connected to wifi using wifi module and send commands using Firmata protocol from the host computer.

Title: Build a simple robot to learn ROS

Body:
I am a beginner to ROS and I wanted to know if I could build a simple robot to learn ROS.
I currently have the following components available:

Arduino Uno

Simple two wheeled robot chassis

Some motors

L293D motor driver

Some ultrasonic sensors

Some infrared sensors


问:
Adhesion for a heavy wall-climbing robot
I have come across a number of methods for developing wall-climbing robots.

Suction

Chemical Adhesion

Gecko like hair adhesion

Electroadhesion

Which method would be the best for heavy robots (5kg+)? Are there any other methods that I have missed?

答: As Plecharts said, it depends on your surface.  Magnets work really well for a heavy robot, but iff you're going to drive on metal.  An example can be found on this VEXLabs robot: http://www.vexforum.com/wiki/Magbot_Model_3</p>


问:
Damping vs Friction
I am using a physics simulator to simulate a robot arm. For a revolute joint in the arm, there are two parameters which need to be specified: damping, and friction. If a torque is applied to the joint, both the damping and the friction seem to reduce the resultant force on the torque. But what is the difference between the damping and the friction?</p>

答:
Friction would be your standard "sliding friction", and exerts a force opposing the motion, proportional to the load (or the normal-force of the load, when talking about your classic sliding), but independent of velocity.

I suspect that "damping" is referring to viscous friction, which is not independent of velocity. Viscous friction would exert a force opposing the motion, typically independent of the load, but increasing with velocity. In a rotary joint, it is typically caused by the packing grease in the bearings.

Title: Damping vs Friction


答:
A force balance equation is typically written as:

$$
m\ddot{x} + b\dot{x} + k{x} = F \\
$$

where $F$ is an applied force, $x$ is position, $\dot{x}$ is velocity (first derivative of position), and $\ddot{x}$ is acceleration (second derivative of position). $m$ is mass, $k$ is a spring constant, and $b$ is a viscous damping term.

This force balance is one of the fundamental equations hammered into all mechanical engineers. Each term represents a particular force contribution, and the derivative terms in the equation dictate an oscillatory or harmonic solution.

Friction forces (also called "dry" or "Coulomb" friction) aren't listed explicitly here; they're generally lumped into the "applied force" term ($F$). Generally, from physics, $F_{\mbox{friction}} = \mu(mg)$, which is read to mean that friction force is some factor $\mu$ that "keeps" a fraction of the weight (a force) of the object being affected by friction.

Unlike springs, damping and friction are losses because there's essentially no way to mechanically recover the energy lost to those terms. There's no energy storage with dampers and friction like there is with a spring, so none of that energy is restored.

So, to summarize,

Friction coefficient gives a force based on how heavy the object is.

Damping coefficient gives a force based on how fast an object is moving.

Consider the energy terms, where everything takes the same path ($\Delta x$). If you calculate energy $E = \int F dx$ (using constant speeds, etc.) then you get:

$$
E_{\mbox{friction}} = \mu (mg) \Delta x \\
E_{\mbox{damping}} = b\dot{x} \Delta x \\
$$

So the only way to reduce friction losses is to reduce the weight or to reduce the friction coefficient. This is typically done with wheels, low-friction materials, etc.

The only way to reduce damping losses is to reduce speed or to reduce the damping coefficient. This is typically done by changing fluids - it's a lot harder to run through water than it is to run through air, but there's very little difference when you move slowly.

Determining these coefficients for a rotating system based only on kinematics and free body diagrams is not easy. If you have a device in front of you, you could try to calculate the rotating the joint at different speeds and plotting the energy losses versus speed.

Assuming the joint is the only load, the speed should stabilize at a point where internal losses equal the applied power. As you change speed the friction losses stay constant, but the viscous losses increase. When you plot applied torque (or input power divided by speed) versus speed for the unloaded system, the friction losses will be the y-intercept and the damping (viscous losses) will be the slope.

Title: Damping vs Friction

Body: I am using a physics simulator to simulate a robot arm. For a revolute joint in the arm, there are two parameters which need to be specified: damping, and friction. If a torque is applied to the joint, both the damping and the friction seem to reduce the resultant force on the torque. But what is the difference between the damping and the friction?</p>


答:
If you are interested in learning ROS but do not have sophisticated hardware available, you can use the Gazebo simulator to simulate a robot and use ROS with that.

Keep in mind that ROS is not the only way to write software for robots, and also not necessarily the best way.

Title: Build a simple robot to learn ROS


问:
First build - Quadcopter , need help deciding hardware and connections
I am building my first drone,

Objective: - Need to control drone by wifi on phone or laptop using
  ground station software of Openpilot

I have a Arduino 2560 , cc3d Openpilot flight controller , raspberry pi with wifi bluetooth in built...

Now i am not able to understand , how to go forward , should i connect arduino with openpilot cc3d flight controller , or raspberry pi directory with cc3d flight controller ....

Do i really need arduino 2560 now ?

also how to connect r pi with cc3d flight controller , and how to mock PWM signals ?

答:
I'm not sure if you are connecting the Flight Controller directly to the Arduino / PI within the drone.

If you are then ditch the Arduino Mega and the PI and use a Nano.  It will still provide you with 6PWM pins.
The PI is going to require a "Hat" to generate PWM as far as I can tell, and the Mega is just to damn big and heavy.


问:
Motors response different with high-frequency PWM
We are making a junior soccer robot and we just got our brilliant motors from Maxon.
Setting the PWM timer to low-frequencies (around 39kHz or 156 kHz ) the robot acts as expected. But this produces some problems.

It puts a heavy current on batteries (around 1.5A for 3 motors which is far too high).

The high current causes our motor drivers (L6203) to heat up very quickly and even heat-sinks won't help them.

The motors make such a bad sound as they are screaming and this is not normal.

In contrast when I configure the timer on high-frequencies (such as 1250 kHz or 10000 kHz) the current drops off to 0.2A which is ideal and the sounds quit down.
But this causes a problem that our 3 motors when set to run on their highest speed (PWM set to 255) don't run by the same rpm. like one of them runs slower than others making robot turn to a specific side and so our handling functions fail to work correctly.

Asking someone he told me that the drivers don't respond the same to frequencies thus resulting in different speeds and because on low frequencies the difference is very small I won't notice it but on higher frequencies the difference becomes bigger and noticeable.

So is there any workaround for this problem? or I should continue using low frequencies?

PS: I'm using ATMEGA16 as the main controller with a 10 mHz external crystal.

答:
While I do not know how to fix the root cause of the problem, a work around is to use closed-loop feedback.  If you can measure the speed of each wheel (for example, with encoders), you can use a PID-like algorithm to adjust the speeds of your wheels so the robot goes straight.

A compass or gyroscope would also be suitable for this task.


问:
How mature is real-time programming in robotics?
Edit: I don't know why, but this question seems to be confusing many people. I am aware of when/where/why/how to use real-time. I am interested in knowing whether people who have a real-time task would actually care enough to implement it in real-time or not.

There's no need to mention why real-time operations are important for a robot. My question is however, how much is it actually used in robotics?

Take this question for example. Only one answer mentions any platform with real-time capabilities, and it is far from the top too. ROS apparently, being a very popular platform which is not real-time.

In the real-time world however, RTAI1 seems to be the only workable free real-time platform of use. It is however, limited to Linux (no problem), badly documented and slowly developed.

So, how much is real-time behavior sought after among robotics developers? The question is, how much are developers inclined to write real-time applications when real-time behavior is actually needed? If not much, why?

For example, reflexive behavior based on tactile data, cannot go through ROS because it would lose its real-time property. But do people really come up with a real-time solution or use ROS anyway, ignoring the real-time property?

1 or similarly Xenomai

答:
One good solution is to do BOTH.  A design I use place "hard" real time functions on a small micro controller, tight servo control loops and such.  Then there is another CPU that is larger, running Linux and ROS.  I let ROS handle the higher level tasks and the uP handle things like controlling a stepper motor or running a PID loop.    </p>

<p>As said above by others you CAN allow a non-real-time OS to run 1KHz control loops but in order for this to work you need a gross over-kill sized computer that spends most of it's time in an idle loop.  If you run the Linux/ROS computer at near 100% CPU utilization the real-time performance is poor.   Using a two tier design allows you to always get very good RT performance and also use a smaller, less power hungry computer (possibly a Pi2  higher level tasks.)   My uP currently does not run any OS but I'm moving to FreeRTOS </p>

Body:
One good solution is to do BOTH.  A design I use place "hard" real time functions on a small micro controller, tight servo control loops and such.  Then there is another CPU that is larger, running Linux and ROS.  I let ROS handle the higher level tasks and the uP handle things like controlling a stepper motor or running a PID loop.

As said above by others you CAN allow a non-real-time OS to run 1KHz control loops but in order for this to work you need a gross over-kill sized computer that spends most of it's time in an idle loop.  If you run the Linux/ROS computer at near 100% CPU utilization the real-time performance is poor.   Using a two tier design allows you to always get very good RT performance and also use a smaller, less power hungry computer (possibly a Pi2  higher level tasks.)   My uP currently does not run any OS but I'm moving to FreeRTOS


问:
What information an IMU gives to a drone?
An Inertial Measurement Unit (IMU) is an important sensor used in aerial robotics. A typical IMU will contain an accelerometer and a rate gyroscope. Which of the following information does a robot get from an IMU?

Position

Orientation

Linear velocity

Angular velocity

Linear acceleration

Angular acceleration

I don't think it gets its orientation information from IMU. The last time I took the test, I said that all but the first two are true. I failed.

答:
You already know the answer - because as you say it contains an accelerometer and a rate gyro.

An accelerometer measures linear acceleration, a rate gyro measures angular velocity. These are the only quantities the unit will actually measure.

The other properties - whether positions, velocities or accelerations - have to be calculated by the controller. For example integrating an acceleration gives a velocity, and integrating again gives position.

There's an exception - if the device is being held motionless in any position, then the accelerometer is sensing which direction gravity is acting in, so it can be used directly as an orientation sensor. But that only applies if you know the device is being held motionless...

Answer will be
Linear Acceleration & Angular Velocity only.

ContentLicense: CC BY-SA 4.0


答: An Inertial Measurement Unit (IMU) is a device that contains three accelerometers that measures a body's specific force vector, and three gyroscopes that measures its inertial angular velocity vector. It often also contains a triad of magnetometers that measures the magnetic field vector around the device. Note that the "accelerometers" do not directly measure the translational acceleration vector, this must be obtained by adding the apparent gravity vector to the measured specific force vector.</p>

Title: What information an IMU gives to a drone?

Body:
An Inertial Measurement Unit (IMU) is an important sensor used in aerial robotics. A typical IMU will contain an accelerometer and a rate gyroscope. Which of the following information does a robot get from an IMU?

Position

Orientation

Linear velocity

Angular velocity

Linear acceleration

Angular acceleration

I don't think it gets its orientation information from IMU. The last time I took the test, I said that all but the first two are true. I failed.


问:
Double/Triple inverted pendulum always on a cart?
All of the examples of keeping a double/triple inverted pendulum balanced using a PID controller I've seen seem to be on a cart. Like this one https://www.youtube.com/watch?v=cyN-CRNrb3E

How come the PID controller always controls a cart rather than a servo that holds the first pendulum? The second/third pendulum could be connected loosely on the first pendulum and the PID controller controls the first pendulum. Is it because servos tend to be too slow or are there other reasons?

答: There's no reason why you couldn't do it with a servo on the first pendulum, but the problem is very different. Instead of motion constrained on a line (cart), motion is constrained along an arc. The dynamics change dramatically due to both vertical and horizontal motion along the arc, but that's not to say that it couldn't be done. As far as I know, it's just more complicated and not as well studied a problem as the cart problem. </p>


问:
Position Control vs Velocity Control vs Torque Control
Please can somebody explain to me the difference between Position Control, Velocity Control, and Torque Control? Specifically, I am thinking in terms of a robot arm. I understand that position control tries to control the position of the actuators, such that the error signal is the difference between the current position and the desired position. Velocity control is then trying to control the velocity of each actuator, and torque control is trying to control the torque of each actuator.

However, I don't understand why these are not all the same thing. If you want to send a robot arm to a certain position, then you could use position control. But in order to move an actuator to a certain position, you need to give it a velocity. And in order to give it a velocity, you need to give it a torque. Therefore, whether the error is in position, velocity, or torque, it always seems to come back to just the error in torque. What am I missing?

答:
Torque is analogous to force for rotating systems, in that:

$$
F = m a \\
\tau = I \alpha \\
$$

Where $\alpha$ is angular acceleration and $I$ is moment of inertia. $m$ and $a$ are mass and linear acceleration, respectively.

So, in a way, a position controller, a velocity controller, and an acceleration (torque) controller are all different implementations of each other because each is the integral of the next - position is the integral of velocity, and velocity is the integral of acceleration.

Where these differ is how you apply the controller. This typically depends on what you're interested in. For instance, are you trying to control position, as in a servo motor? Are you trying to regulate acceleration, as in a hospital elevator?

Typically you will have some specification you are trying to meet. Then, with your specifications, you can use typical PID guidelines to build a controller for that particular aspect. That is, if you work at that particular "level": position, velocity, or acceleration, then you can design for a particular rise time, overshoot, and damping.

The difference being that you're designing acceleration overshoot, or positional overshoot.

Generally I would say the output of the controller goes to motor voltage, so while the output of the controller is always the same (motor volts) the input and gains are different, with the desire to achieve a different set of operating parameters.

I'll close by pointing out that a motor controller output is terminal voltage because that's how one modulates motor current. Motor current, in turn, generates torque via the motor torque constant.

So, ultimately, every controller regulates motor torque, but with the end goals varying - control motor acceleration, velocity, or position. Again, what you're trying to control depends on the application and will affect the gains you choose.


问:
Rotate 3d vector value into a single axis using a rotation quaternion
I want to rotate the whole value of a 3d vector into one axis using quaternion rotations.

The reason behind is that I want to align the X and Y Axis of my smartphone with the X and Y Axis of my vehicle in order to detect lateral and longitudinal acceleration separated on these two axis. Therefore I want to detect the first straight acceleration of the car and rotate the whole acceleration value into the heading axis (X-Axis) of the phone assuming a straight forward motion.

How do I achieve this?

答:
Use the average magnitude of X,Y as the acceleration vector.

Get the angle between this vector and the (1,0).

Create a quaternion with this vector that looks something like (cos(angle/2),0,0,-1)

Multiple all future acceleration results


答:
I'm going to take a slightly different tack to Chuck.

What is Torque Control?

For me, Torque Control is about performing a move with an explicitly defined torque, rather considering torque just the means to the end of Position or Velocity control.

Normally when you move a robot, you specify position and speed, with the robot allowed to use any and all torque up to it's maximum, required to achieve those two goals.

When you specify a move with a Torque component, you are saying you want to use that specific torque for that move. It's easiest to illustrate this with an example.

Example: picking up an egg

Let's say that you want your robot to grip an egg. The egg is a fragile spheroid of (slightly) variable size.

Without Torque control

Ideally, you would have to know the orientation of the egg and the precise dimension along the grip axis. You then have to close the gripper to be slightly smaller than that grip axis dimension and rely in the error between the demanded and actual position to apply the correct amount of force to grip the egg securely.

This second order effect is very fragile and could result in eggs being dropped once motors start to age and provide less torque, or start to crush eggs if PID parameters are tweaked to (say) improve position or velocity accuracy.

Since eggs aren't uniform, if you cannot measure the grip axis dimension for each egg, then you will need to work out a compromise grip position.

Too small and large eggs will be broken by the force applied, too large and small eggs won't be gripped tightly enough. If there is sufficient variation between the smallest and largest eggs, there may be no compromise position which won't either crush or drop some eggs.

With Torque control

With Torque control, you have much finer, more predictable control. You are specifying torque as a first order effect and have direct control over it.

Typically, you would start by moving the gripper without Torque Control to just larger than the largest egg, then move the gripper with Torque Control to just smaller than the smallest egg. As soon as the torque limit is achieved, the motor would stop moving, and the egg would be gripped with precisely the required force.

Why not use Torque control all the time?

You typically only ever use Torque Control when you absolutely need it because direct Torque Control means giving up control of position and velocity.

You can get close to direct Torque Control by applying a Torque limit to a standard Position/Velocity move, but you have to be careful, since the torque limit must be higher than the minimum torque needed to achieve those moves.

Applying a torque limit which is too low can easily result in following errors (actual position falling behind required position, resulting in poor control) and can even prevent a robot from moving to it's destination position (if the torque limit is lower than the torque required to make the move, due to stiction, friction or gravity to name but a few possible factors).

Complications

There are some situations where you need to apply a force smaller than the stiction of the system. Because the static friction would prevent the required force being applied, effectively no force would be applied. This could be the case with some direct drive motors for instance. In that case your Torque Control system may need to be able to briefly apply a higher force to break past the static friction, but then quickly revert to the required Torque, so that excess force is not applied.

Conclusion

Torque control is an important technique for some applications, it is something which our bodies take for granted, but which Robot systems have to be explicitly configured for.

Title: Position Control vs Velocity Control vs Torque Control

Body:
Please can somebody explain to me the difference between Position Control, Velocity Control, and Torque Control? Specifically, I am thinking in terms of a robot arm. I understand that position control tries to control the position of the actuators, such that the error signal is the difference between the current position and the desired position. Velocity control is then trying to control the velocity of each actuator, and torque control is trying to control the torque of each actuator.

However, I don't understand why these are not all the same thing. If you want to send a robot arm to a certain position, then you could use position control. But in order to move an actuator to a certain position, you need to give it a velocity. And in order to give it a velocity, you need to give it a torque. Therefore, whether the error is in position, velocity, or torque, it always seems to come back to just the error in torque. What am I missing?


问:
Rostock Delta Robot 3D Printer Degrees of Freedom (DOF)
What is the degrees of freedom (DOF) of the Rostock delta robot 3d printer (delta mechanism that consists of three prismatic joints)?

Here's the link to the delta mechanism I'm referring to:
https://www.youtube.com/watch?v=AYs6jASd_Ww.

Thanks in advance for your help!

答:
The end-effector of the structure can do 3 translations X Y and Z translations. However more then 1 motor has to be moved in order to execute a pure translation. This means that the desired motions in cartesian space first have to be mapped to the so called joint space only afterwards can these motions be executed as desired. The function that does the mapping is called the inverse kinematic function or inverse kinematic transformation.

This is common in robotics, but not that common for 3 D printers which tend to have a portal type structure. You can read more about the delta robots/delta structure here


问:
Motor Choice given size constraint and load requirement
Good day everyone :)

I am an undergraduate student working on a project involving the use of high torque small-sized DC motors for use in designing a person following trolley bag. Where in the problem is to use small sized motors but still maintain the usability and efficiency in carrying loaded luggages.

I have been looking for motors in local stores as well as in RS components as well as Element 14. However I am not sure if my choices are the right fit as I am at a loss on what specifications to look for when selecting a particular motor for this application. I have also tried to look for motors used in current products that can be used in my application such as todays electric skate boards but unfortunately have no luck on finding their suppliers.

Basically the question I would like to ask  is what specifications or calculations can I perform to select the proper motors given size constraints and weight carrying requirments. Or does anyone have suggestions on common motors that are already normally used for this application. My target maximum load capacity is 20kg.

Thank you!

答:
Approach 1: based on the total weight and how steep a slope you would expect it to climb, calculate the power required. (Basic physics)

Approach 2: draw a diagram of the wheel size you'd like to use, with an obstacle of a given height in front of it. Work out the angle the wheel has to "lever" itself up to get over the obstacle, and work out the motor torque needed from that.

Disclaimer: I didn't do either of the above - I just bought a few of these (EMG30 motors) which were fine for a five kilogram machine. Yours will be a lot heavier though so I think the more precise method would be recommended.


问:
What does Simultaneous Localization And Mapping (SLAM) software do?
I took a course to have a better understanding of drones and their design. At the end of the course there was a test question that I got wrong and I would like to understand why.

I was supposed to select the choices that best describe SLAM.

and the possible answers were:

Estimates the location of features in the environment?

Controls the robot's flight through the environment?

Causes the robot to avoid obstacles in the environment?

Navigate in a cluttered environment?

Estimates the position and orientation of the robot with respect to
    the environment?

At first I knew that at least 3 and 4 were right because I watched a drone doing these things. I also thought that the last answer was linked to these two so I said yes to it too. Finally, I thought that the only thing that was still controlled by the user would be the flight...

Yet I failed again... Therefore what does Simultaneous Localization And Mapping (SLAM) software do?

答:
Which software?

Yes, It creates map from its starting point. And robot locates itself in its generated map when generating map.

It is using laser data to locate robot in map, when process starts, map's first part is the first laser scan data. When the robot moves, slam reads odometry data, and locates robot via odometry and laser. Even if odometry is poor, it corrects location via laser scan match.

No, its not a job of slam.
Avoiding obstacles is a job of navigation, The navigation must calculate best path with avoiding obstacles. Slam is Simultaneous Localisation and Mapping, it generates map and locates robot on it.

I didn't understand what you meant, yes it can explore cluttered places but navigation isn't its job.

Referring to answer 3, Thinking about environment isn't job of slam too :) It's navigation's or driving people's job.

Also if you didn't please take a look at this SLAM video.


答:
20kg is a mass. It makes a force on Earth (20*9.81 = 196N), but that's not a torque. Motors make torque - what is your maximum torque specification?

Once you know how much torque you need (that will be based on the load, gearbox, wheel/pulley diameter, friction and other losses, etc.) then you can ballpark feasibility by evaluating your required torque density - how much torque you need per unit of volume (as your two driving specs are torque and volume).

You'll have some nominal torque load, and a nominal operating speed - this should give you your average power, and then you can look at power density. Power densities should be easy-ish to find, but you may have to start doing the math to determine what an acceptable range of torque densities are. Note that a lot of sites mis-label specific torque (torque per weight) as torque density (torque per volume).

If you find that your torque and power densities are reasonable (within the band of products available on the market) then it's just a matter of shopping for the right one.

This is the kind of research that, as an engineer and former undergrad advisor, I would love to see as proof that the base design needs to be re-evaluated. Look at torque densities for a range of sizes - from large industrial motors to miniature units. I suspect you're not going to find a huge variation in torque per unit volume, and then you can say for sure that it is or is not possible to achieve your performance in a particular size.

Title: Motor Choice given size constraint and load requirement

Body:
Good day everyone :)

I am an undergraduate student working on a project involving the use of high torque small-sized DC motors for use in designing a person following trolley bag. Where in the problem is to use small sized motors but still maintain the usability and efficiency in carrying loaded luggages.

I have been looking for motors in local stores as well as in RS components as well as Element 14. However I am not sure if my choices are the right fit as I am at a loss on what specifications to look for when selecting a particular motor for this application. I have also tried to look for motors used in current products that can be used in my application such as todays electric skate boards but unfortunately have no luck on finding their suppliers.

Basically the question I would like to ask  is what specifications or calculations can I perform to select the proper motors given size constraints and weight carrying requirments. Or does anyone have suggestions on common motors that are already normally used for this application. My target maximum load capacity is 20kg.

Thank you!


答:
If you have some budget for your project, both Maxon and Faulhaber have good DC motors and motor-gearhead combinations.

Maxon publishes a nice set of formulas and background theory on electric motors.

When it comes to getting the maximum performance out of motors, thermal issues are the main factor. One starts asking questions like: What's the actual duty cycle for this application? Is the motor on 100% of the time or will there be time for it to cool down? How quickly can my system get rid of the heat?

Keep in mind that even though a lot of motors are specified relative to their design voltage, this is a flexable parameter. Even with a cheap motor you may be able to get higher performance with a combination of driving it with a higher voltage and monitoring it's temperature to make sure you don't overheat it.


问:
Taylor Series expansion for EKF
In Probablistic Robotics by S. Thrun, in the first section on the Extended Kalman Filter, it talks about linearizing the process and observation models using first order Taylor expansion.

Equation 3.51 states:

$g(u_t,x_{t-1}) \approx g(u_t,\mu_{t-1}) + g\prime(u_t, \mu_{t-1})(x_{t-1} - \mu_{t-1})$

I think $\mu_{t-1}$ is the state estimate from the last time step.  My question is: what is $x_{t-1}$?

Also, the EKF algorithm following this (on table 3.3) does not use the factor $(x_{t-1} - \mu_{t-1})$ anywhere, only $g\prime(u_t, \mu_{t-1})$.  So after being confused about $x_{t-1}$, I'm left wondering where it went in the algorithm.

答:
$\mu_{t-1}$ is the state estimate from the last time step, $x_{t-1}$ is the actual state (a random variable) in the last time step.

Basically it goes like this: in the traditional Kalman filter, you have linear models that tells us how states evolve and measurements are made. In the EKF you have non-linear models but want to use the Kalman filter equations, so you use the first order Taylor expansion as the KF linear model. That way you can still propagate covariances appropriately.

Note that state and measurement predictions still use the non-linear models. So linearization "only" affects covariance propagation -- which affects everything really, because that regulates how certain you are about your estimates and the relative trust you place on your state estimate vs your measurements.

Title: Taylor Series expansion for EKF


问:
Sporadic sensing rates for hc-sr04 ultrasonic distance sensor
Been working on a robot recently which uses ultrasonic sensors for an integral part of the navigation.
While testing the sensors I noticed a strange behaviour, the sensors seem to frequently stop functioning and bring the entire Arduino Mega I'm working with to a stop. The strange part is that these stops seem to be entirely random, on some occasions the sensor will read values consistently (at maybe 20 vals per second) for 10+ seconds, then all of a sudden the sensor will slow to reading only 2-3 values per second with stalls between.

I have tested several sensors and different codes for pinging distances yet the problem has persisted.

This leads me to believe the issue is with the arduino mega itself, but I am unsure how to verify this. Any advice?
Thanks in advance!

PS: other pins on the Mega seem to be working fine, i.e. analog pins for IR reflectance sensors and PWM pins for driving 2 DC motors.

答: I think that the strange behaviour that you are experiencing comes from lost echoes. The HC-SR04 is at it's best performance with obstacles of 0.5 square meters (you can check this in the data sheet). With smaller obstacles some of the echoes at random wont be detected. The sensor waits for echoes to return up to about 182 mS no matter how fast you trigger it. Only then the echo signal goes low if no echo is detected. I have checked this behaviour by free triggering the sensor at different rates and watching the echo signal at the same time with an oscilloscope.</p>


问:
How to make a robot?
For instance, how would you hook up a electric pump communicate with a motherboard? Let's say I buy a electric pump, I hook it up to some sort of metal structure that if the pump is turned on it moves the metal structure, how would I hook up the pump to my motherboard so that I can program it?

答:
Ok, It sounds like you either saw an arm with hydraulic actuators or a Hollywood special-effects movie (they really like hoses in their robots).

Assuming you saw real hydraulic actuators, then I need to start by saying that is only cost effective if you need a lot of force. The majority of robots use electric actuators, specifically servo motors.

Hydraulic actuators work by controlling valves, not the pump. There is typically just a single pump that maintains a very high fluid pressure in a reservoir, called the "accumulator". The accumulator is like a battery of hydraulic energy for the actuators, and the pump just keeps the accumulator "charged".

The control of the actuators is done by "proportional valves". The servo controller regulates the amount of fluid passing to the actuators by controlling these valves, based on feedback from position-sensors in the actuators. A central computer is often tasked with commanding the servo controllers, but that's often not necessary. Sometimes the servo controllers are commanded by some form of hand control.

So you might already see why most robots use electric motors instead of hydraulics. Hydraulics add more layers of complexity to the robot. Electric motors are more direct if you don't need the power that hydraulics provide.

By the way, it's possible that you've mistaken cables for hoses. Often, the motors are placed away from the joints and "tendons" are strung through the arm to connect the joint to the motor. Occasionally, these tendons might be hydraulic hoses.

Title: How to make a robot?


问:
How are industrial robotics components purchased?
For hobbyists, you go to a store to buy products. The prices for these products are all clearly listed in the store catalog, and you can easily search for parts by lowest price or read customer reviews of the products.

For industrial engineers building complex machines, how do they buy components? Or don't they worry about cost, and leave it to their employer to eat the cost as a part of doing their line of work?

Is it possible to "shop around" for low-cost engineering components?

It is unclear to me how someone building a robot on their own as a small one-man startup can make the step from the world of toy robots, to larger and more industrial robotic components.

Most of the non-hobbyist stuff is hidden away and not exposed to the world. While a product catalog might be available, there are no prices listed for anything.

For larger industrial components, there does not seem to be any realistic way to shop around for the lowest price or best value, since pricing for much of the big stuff is basically unavailable.

For me personally, I am interested in trying to build my own powered exoskeleton on a middle class American income, so I can't afford to be paying 1000 bucks for a single electrohydraulic proportioning servo valve, when I'll need probably 50 of them. But shopping around for low cost ones is basically impossible as far as I can determine, because pricing info is generally not available or searchable from the majority of manufacturers.

答:
Like any company, a small engineering firm depends on its service vendors. Those vendors might include machine shops, welders, and paint shops. developing relationships with vendors is important not just to have someone to go to, but also for advice on the best way to go about doing those things. Many of those places will be small shops, and are happy to deal with other small shops.

Then there are parts vendors, like metal supply shops and industrial supply places. For industrial supply, try McMaster-Carr. They have everything from hydraulic motors, to nuts & bolts to haz-mat suits, and all of the prices are there. For metal, try Industrial Metal Supply. I get about 80% of my materials between those two sources.

Don't be afraid to call potential vendors for prices. You will find that many don't want to deal with low-volume customers, and talking to them on the phone is the easiest way to weed them out.

But still, it is not easy.


问:
In how many ways can a six propellers drone fly or rotate?
I thought it were twelve ways:

Six for each ways between two propellers

Six others for each rotation on these ways.

But according to Vijay Kumar Dean of Penn Engineering , it seems that I was wrong...

Then I read this article  about modeling and robust trajectory tracking control for a novel Six-Rotor Unmanned Aerial Vehicle and this one about navigation and autonomous control of a Hexacopter in indoor environments but was never able to find such an information.

I then guessed that 3 of the rotors could go one direction and three others into another which would add 6 other ways for rotating and therefore 6 others for simply flying but that is only a guess.

答:
Generally half the rotors will go clockwise and the other half go counterclockwise so the drag on the rotors do not cause a net rotation effect. To manoeuvre, the relative speeds of the rotors change.

Running the rotors faster or slower causes more or less downforce. Doing the same to all the rotors will cause the copter to climb or descend. Doing so to the rotors on one side only will tilt the copter. Once tilted, the total downforce has a sideways component so the copter will move towards the lower side. Slowing down the rotors turning one direction and speeding up those in the other direction imbalances the drag and the copter will turn.

The above scheme effects rotation about thee axes are movement along three axes. That is all the degrees of freedom any solid body can do in three dimensional space.

None of these behaviours directly depend on the number of rotors - three rotors are enough to do all of above, and you can achieve nearly as much control with only one single bladed rotor and more complicated algorithms.


答:
After the propagation step, we need to find the parameters of the Gaussian which describe our new estimate. These are, the mean $\mu$, and the co-variance $\Sigma$. You asked about the mean specifically, so here we go.

Note that the definition of the mean of the propagated state is the expectation of the propagated state. Taking the expectation of the Taylor series expansion, we have (note I'm using shorter notation of superscript - for prior):

$$x = g(x^-, u) $$

And by Taylor series expansion,

$$x \approx g(x^-, u) + g^\prime(x^- , u) (x-x^-)$$

Evaluating the approximate function $g()$ at the mean of the prior yeilds:

$$x \approx g(\mu, u) + g^\prime(\mu , u) (x-\mu)$$

So, let's use $\mathbb{E}$ as the expectation operator to find the expected value of the output (which is the mean of our posterior estimate.

$$\mu = \mathbb{E}[x]$$
$$\mu = \mathbb{E}[g(\mu^-,u)]$$
$$\mu \approx \mathbb{E}[g(x^-, u) + g^\prime(x^- , u) (x-\mu^-)]$$

$$\mu \approx \mathbb{E}[g(x^-, u)] + \mathbb{E}[g^\prime(x^- , u) (x-\mu^-)]$$

Now substitute in $G$, the Jacobian of the function $g$ also evaluated at the mean.

$$\mu \approx \mathbb{E}[g(x^-, u)] + \mathbb{E}[G\cdot (x-\mu^-)]$$
$$\mu \approx \mathbb{E}[g(x^-, u)] + \mathbb{E}[G\cdot x - G\cdot \mu^- ]$$
And by linearity of expectation:
$$\mu \approx \mathbb{E}[g(x^-, u)] + G\cdot \mathbb{E}[x] - G\cdot \mathbb{E}[\mu^- ]$$

And guess what? The expected value of both of those things on the right is zero. (why? because we assumed they were Gaussian).**

Now, we have to compute the co variance, defined as $\mathbb{E}\left[ (x-\mathbb{E}[x])(x-\mathbb{E}[x])^T\right]$. You can easily derive this by following the same steps. First expand the terms inside the first expectation, then substitute the linear approximation of $g$ as before. Some matrix algebra will yield the EKF co-variance update. Note that you have to include the "white noise" Jacobian.

See here for a possibly better derivation.

**The real lie the EKF tells you is that the term, $\mathbb{E}[g(x^-, u)]$ is the same as $g(\mu^-,u)$, which holds as long as the function $g()$ isn't too crazy.

Title: Taylor Series expansion for EKF

Body:
In Probablistic Robotics by S. Thrun, in the first section on the Extended Kalman Filter, it talks about linearizing the process and observation models using first order Taylor expansion.

Equation 3.51 states:

$g(u_t,x_{t-1}) \approx g(u_t,\mu_{t-1}) + g\prime(u_t, \mu_{t-1})(x_{t-1} - \mu_{t-1})$

I think $\mu_{t-1}$ is the state estimate from the last time step.  My question is: what is $x_{t-1}$?

Also, the EKF algorithm following this (on table 3.3) does not use the factor $(x_{t-1} - \mu_{t-1})$ anywhere, only $g\prime(u_t, \mu_{t-1})$.  So after being confused about $x_{t-1}$, I'm left wondering where it went in the algorithm.


答:
For an industrial setting funds are not unlimited but the value of the machine to the process is known or predicted and if the benefit is greater than the cost, the funds are sought.

Relationships with suppliers are built up over time. A lot of these relationships are old, passed from one team member to the next. Typically one maintains a relationship with multiple suppliers of similar capabilities to reduce the risk if something happens to any one supplier. So you intentionally buy product that you know will be more expensive or lower quality to keep the relationship established.

You will have to work to find suppliers and build those relationships.

You are also working with prototype quantities which adds another challenge into the mix. Some suppliers (whether it's machinists or components vendors) don't like to waste time with small fish. It's not worth the effort and there is a higher risk to them of not getting paid. That's kind of the way it is.

I've worked in robotics prototyping for a long time, for both institutions and small but well known companies. Working with prototyping quantities (2-20) has always been a tough sell. You start to get a feel for whether the supplier will work with you pretty quickly.

That said, if you do your leg work you can find everything you need. For instance, I needed a custom bearing made and the big guys laughed at me because I needed less than 100,000. But I called around and got lucky, finding the small shop that did prototypes for the SKF research team. On the other hand, I needed A custom gear+shaft and one of the big companies that normally does stuff for helicopters slotted the design right in with no problem. You never know. You just gotta pick up the phone. A lot.

Regarding costs it's unclear whether this is a personal project or a startup one. If its a startup, try pitching your design to investors or directly to your market. Even if you want to self fund this serves as a good test, if neither are breaking out their wallets, this should be a big warning to you that the world is not ready for your idea. I've had several friends, with PhD's in robotics from good universities, throw a way a lot of money on failed startups that did not meet this test.

If it's a personal project you may have to resort to dumpster diving and other similar techniques. Bosch may want 5K for their light weight high performance valves, but the Ferrari racing team (or whomever is near you) is probably throwing out some because they have 10 hours of use and the driver is complaining.

The phone is your friend for the industrial components and services world. You'll get a faster response than email. It may help for you to throw up a 1-3 page website for your company (make one up if you don't have one, a sole proprietorship) that the sales guy can hit.

Finally, if you don't have a lot of experience with hydraulics, spend some time researching degloving to get proper motivation for your safety protocol. A small exo with no barrier between me and the hydraulic lines is not something I would get into.

Title: How are industrial robotics components purchased?

Body:
For hobbyists, you go to a store to buy products. The prices for these products are all clearly listed in the store catalog, and you can easily search for parts by lowest price or read customer reviews of the products.

For industrial engineers building complex machines, how do they buy components? Or don't they worry about cost, and leave it to their employer to eat the cost as a part of doing their line of work?

Is it possible to "shop around" for low-cost engineering components?

It is unclear to me how someone building a robot on their own as a small one-man startup can make the step from the world of toy robots, to larger and more industrial robotic components.

Most of the non-hobbyist stuff is hidden away and not exposed to the world. While a product catalog might be available, there are no prices listed for anything.

For larger industrial components, there does not seem to be any realistic way to shop around for the lowest price or best value, since pricing for much of the big stuff is basically unavailable.

For me personally, I am interested in trying to build my own powered exoskeleton on a middle class American income, so I can't afford to be paying 1000 bucks for a single electrohydraulic proportioning servo valve, when I'll need probably 50 of them. But shopping around for low cost ones is basically impossible as far as I can determine, because pricing info is generally not available or searchable from the majority of manufacturers.


答:
You are right that prices are not displayed for products aimed at industrial use on vendors websites. Catalogs are available and you have to ask for a quotation to get the price. I am not sure why this is, it might have to do with differential pricing based on the customer, clients often get discounts and for some major manufacturers they also get a webshop type access reserved only for top clients. Another reason could be that they want to make sure that if you start buying equipment from them the equipment "fits together", is compatible and is well suited for the goal of the project. They often ask you about the project fro which you want to buy equipments, which you of course are not obliged to disclose the project, but salesperson are well trained can help a lot in selecting the most well suited equipment, if you allow them to.

To answer your questions:

Or don't they worry about cost, and leave it to their employer to eat the cost as a part of doing their line of work?

No, they do not. Especially small and medium enterprises are very price sensitive and are constantly looking for less expensive solutions (please note the difference between solution and components).

Is it possible to "shop around" for low-cost engineering components?

To my knowledge it is not. The sites I have found (in Europe) that allow you to by industrial equipment are way more exponense then the the official suppliers with no webshop.

Industrial components are expensive and in my personal observation, vendors who sell similar quality have similar price ranges.

Building an exoskeleton will be particularly expensive, because of the safety requirements (you have to guarantee that it cannot hurt anyone with a probability of 10e-8). Safety certified industrial equipment is way more expensive then regular industrial equipment. There is no way around this.

If you want a more cost effective solution you can prove that you technology works in simulation ad/or on a smaller scale and try to get an investment based on results (either from Investors or from Kickstarter or similar).


答:
A physical system only has 6 degrees of freedom - you can't have more than 6 ways to move. It doesn't matter how many propellers there are. There is forward/backward (translation) along the x/y/z axes and rolling side-to-side (rotation) about the x/y/z axes. Any off-axis motion just means that there is a combination of fundamental axial motion.

:EDIT:

I'll add, as @DavidCarey mentions, that just because you have 6 actuators (6 propellors) doesn't mean you automatically can control all 6 degrees of freedom.

Can you roll the hexacopter 90 degrees sideways and hold it there? Can you pitch it 90 degrees forward and hold it there?

That said, even though you can't control all 6 degrees of freedom, you can still move along all 6 axes of motion. So, if your question is about what you can control, it's 4 axes of control (assuming the hexacopter propellers are all planar; i.e. a customary arrangement). If your question is how many ways you can move, it's 6 degrees of freedom.

As I hint at above, you can have a non-standard 6 propeller arrangement, where 4 fans are planar pointed at +Z, then one each is pointed +x and +y. In that way you can roll, pitch, yaw, and translate along x/y/z. Then you have 6 axes of control.

But again, for a planar arrangement, a 6 rotor vehicle still only has 4 axes of control.

Title: In how many ways can a six propellers drone fly or rotate?

Body:
I thought it were twelve ways:

Six for each ways between two propellers

Six others for each rotation on these ways.

But according to Vijay Kumar Dean of Penn Engineering , it seems that I was wrong...

Then I read this article  about modeling and robust trajectory tracking control for a novel Six-Rotor Unmanned Aerial Vehicle and this one about navigation and autonomous control of a Hexacopter in indoor environments but was never able to find such an information.

I then guessed that 3 of the rotors could go one direction and three others into another which would add 6 other ways for rotating and therefore 6 others for simply flying but that is only a guess.


问:
Choice of a motor for robotic arm
This is my first post here, so hello all. I really hope I can learn a lot from you guys.

I am trying to build a robotic arm to carry an object and put it inside of different boxes that are placed in different fixed locations.

I found a few robotic arms that can do it, but I am still trying to find the right motor for the job. I read a lot on-line about the different motors, but I am not sure which on to pick. Since the boxes are located in fixed places, the motors have to move in a precise way, so, according to my research, Servo motors are the ones I should use.

Since it is a low budget project (I am college student), I wasn't sure which motor to choose (there are a lot of servo motors out there). I found several Servo motors on-line, for example , Analog Feedback Servo, and I was wondering what is the best servo motor I can buy for a really low cost project? I think I can spend about 10-20$ per motor (I need 5 motors).

I already have an Rpi and I know that pin 18 is the PWM pin that controls the motor's precision movement, but before I purchase a PWM controller and additional motors I need to run some testing to find how precise the motor is.

By the way, how can I calculate the amount of weight the motor can handle?

Any ideas and information will be greatly appreciated.

Thank you

答:
The choice of motors is a trade off between cost/power/ease of implementation/etc. that only you can make.  But hobby servos like you linked to are a common choice for low-cost, low-power, hobby arms.

Simple max-torque calculations for a robot arm are pretty straight forward.  (This is a simple tutorial).  But there are a few online calculators to help: [1], [2].

You might also benefit from this robot arm tutorial.

Title: Choice of a motor for robotic arm


答:
practice

In practice, every multicopter (including 6-propeller hexacopter and 4-propeller quadcopter) that I've seen so far has 4 degrees of freedom: pitch, roll, yaw, and climb.

The minimum number of rigid rotors to get 4 degrees of freedom is 4 rotors.
(Single-rotor helicopters have articulated blades and swashplates, which are more complicated than rigid rotors).
One big advantage of using more rotors than the theoretical minimum number is so that if/when something goes wrong that affects one of the 6 rotors, the remaining rotors can still control all 4 degrees of freedom for a controlled landing.

Such multicopters, like single-rotor helicopters, must go through a "roll -- pull collective -- unroll -- push collective" sequence to move a little bit to the right, since they cannot directly control the "forward" or "right" translation degree of freedom.

theory

The maximum number of degrees of freedom of a rigid object in our 3-dimensional world is 6. One way of naming those 6 degrees of freedom: pitch, roll, yaw, climb, forward, right.
Another way of naming the 6 degrees of freedom: heading, elevation, bank, X, Y, Z.

In principle a multirotor helicopter with 6 or more rigid rotors (hexacopters, octocopters, etc.), if the motors are rigidly mounted at the appropriate tilt(*),
or a tandem rotor helicopter if the articulated blades are controlled appropriately, can directly control all 6 degrees of freedom.

Such a helicopter can move sideways directly by increasing sideways thrust, without tilting.
For example, with a tandem rotor helicopter where the forward rotor turns clockwise as viewed from above,
if the controller drives the swashplates so the front rotor tilts forwards and the back rotor tilts backwards, the helicopter as a whole will accelerate to the right without rotating.


问:
What is the most realistic grasping simulator?
I am looking for a physics simulator which can accurately model a robot hand picking up an object. The main requirement is for accuracy / realism, rather than speed. It needs to be able to model soft bodies, such as the rubber "skin" on robotic finger tips. It also needs to be a dynamics engine, such that the object is actually moved around by the hand, modelling effects such as slippage.

From the research I have already done, there are two good candidates. First, GraspIt! (http://graspit-simulator.github.io/). This is open-source, and specifically designed for grasping, rather than physics simulation in general. Second, MuJoCo (http://www.mujoco.org/). This is a more general simulator, is a commercial product, and has been adopted by some big names such as DeepMind.

I have tried using the Bullet physics engine for robot grasping simulation, but soon realised that this was not going to be strong enough, because Bullet is really designed for games, and hence sacrifices realism for speed. However, I'm much more interested in something which is as realistic as possible, even if the computation is slow.

Does anyone have any suggestions as to how I can proceed? Anybody with any experience with GraspIt! or MuJoCo?

Thanks!

答:
Most robotics simulators use ODE, Bullet, or PhysX as the back-end physics engine.  As you noticed, these are primarily rigid-body simulators developed for the game industry.  But I believe they have come a long way in recent years and are starting to have some soft-body dynamics.

You might want to look into off-line rendering tools like Blender, Maya, 3DStudio, etc. typically used for animations and movies.  They are more concerned with accuracy than real-time sim time.  But I have never tried to interface with these tools programmatically, which will probably be more difficult.


问:
Handling of a 4WD robot frame as a 2 wheel differential drive
I have a 'Baron' robot frame with 4 static wheels, all driven by a motor. At the moment I'm thinking of handling it like a 2 wheel differential drive. Left and right wheels would receive the same signal. Actually you can interpret it as a tank on caterpillars, exept there is no link between the two tires.
Does anyone have a different idea about this?

Ps: The purpose of the robot will be to know it's exact location. I will use a kalman filter (EKF) to do sensor fusion of the odometry and an IMU with accelero, gyro and magnetometer. So in the kalman filter I add the odometry model of a differential drive robot.

答:
Yes, you can treat a skid-steer or tracked vehicle as a 2 wheel differential drive vehicle.  The only downside is that you will not know the exact point of rotation.  On a 2 wheel differential drive robot it is right between the wheels, but on your robot it could be anywhere on the centerline of the robot between the axles.  The location will depend on the center of mass of the robot and the friction between the wheels and the ground.

I think there is no reason why you can't feed the odometry into a kalman filter.  You should give it a fairly high covariance though.  Actually, when driving straight the covariance can be low.  It is only when turning that it should be large.


问:
Locking the yaw direction of a laser pointer
I have a laser pointer on a handle grip and I'm trying to keep the laser pointer's yaw direction, which can rotate at around 10deg/s. So I have the laser pointer on a stepper motor and an accelerometer/gyro in the handle, but what's a good way for maintaining its yaw direction? Could I simply turn the shaft according to the accelerometer/gyro's yaw readings or is control theory (PID) needed?

That is, if my stepper makes 4096 steps/rev, one gives 0.0879 deg. If the handle is turned by, say, 0.879 deg, then turn 10 steps in reverse (instantaneously). Would this be jerky and PID be needed?

Any thought appreciated.

答:
My guess would be it is going to be fine if you make sure that the stepper reacts fast enough. Hand motions are naturally jerk (and acceleration) limited, so your reaction will also be -- unless you wait too long and let the error accumulate.

I think that bigger problem might be the noise of your sensors. Some clever filtering might be necessary.


问:
Task space to joint motion space conversion
I am the moment trying to read and understand this paper Task Constrained Motion Planning in Robot Joint Space but seem to have a hard time understanding the math.

The paper describes how to perform task constrained motion planning in cases where a frame is constrained to a specific task.

the problem the paper tackles is when sampling in joint space, randomized planners typically produce samples that lie outside the constraint manifold. the method  they proposed methods use a specified motion constrain vector to formulate a distance metric in task space and project samples within a tolerance distance of the constrain.

Given the this I am seem to a bit confused on some simple terms they define in this paper.

Examples. How is a task space coordinate defined ? what information does it have?

they compute the $$\Delta x = T_e^t(q_s)$$ which is transformation matrix of the end effector with respect to the task frame.

What I don't get is why the end effector? and why the end effector with respect to the task frame?

Secondly.
Later in the paper they write down an expression that relates the task space to the joint space motion. They do it using the Jacobian, but seem to miss explaining (in my opinion) what $E(q_s)$ actually do.

$$J(q_s) = E(q_s)J^t(q_s)$$

What is said about it in the paper is that

Given the configuration $q_s$, instantaneous velocities have a linear
relationship $E(q_s)$

why the need of instaneous? what is the definition of an instantaneous component? how does it differ from the information given by the jacobian?

Basically i don't understand how and why the mapping is as it is?..

答:
"Why the end effector?"   Because a robot working on a task uses its end effector to interact with the objects that make up the task.   For example, it is common to align the jaws ("fingers") of a parallel-jaw gripper with the sides of an object to be picked up.   The simplest way to describe that object is by using a fixed coordinate system in which the task objectives are easy to visualize.   Maybe, for example, $\hat x$ is pointed in the direction of travel of a conveyor belt.   Since a robot can be placed with its base frame in an arbitrary relationship to the task space, it is usually easier to use the task coordinate system and make the transposes described.  </p>

<p>Regarding $E$, look at the paper's appendix.   The author uses this matrix to relate the Euler angles of the robot to the task system.  </p>

Body:
"Why the end effector?"   Because a robot working on a task uses its end effector to interact with the objects that make up the task.   For example, it is common to align the jaws ("fingers") of a parallel-jaw gripper with the sides of an object to be picked up.   The simplest way to describe that object is by using a fixed coordinate system in which the task objectives are easy to visualize.   Maybe, for example, $\hat x$ is pointed in the direction of travel of a conveyor belt.   Since a robot can be placed with its base frame in an arbitrary relationship to the task space, it is usually easier to use the task coordinate system and make the transposes described.

Regarding $E$, look at the paper's appendix.   The author uses this matrix to relate the Euler angles of the robot to the task system.


问:
For a quadcopter: Premade flight controller or custom made?
I'm interested in building a quadcopter. The result I'd like to obtain is an autonomous drone. I'd be interested in a GPS to allow it to remain stationary in the air, and also to fly through checkpoints.

Can this be done with a flight controller, or does it need to be programmed? I'm not too sure about what flight controllers really are.

Could someone offer any materials to help me get towards this goal.

Thanks, Jacob

答:
Flight controllers is a significant circuit in a quadcopter. Its function is to direct the RPM of each motor in response to input. A command from the pilot for the multi-rotor to move forward is fed into the flight controller, which determines how to manipulate the motors accordingly.

Different Flight controllers have different functionality. Some are very simple and do not supplement sensors for these operations. However, you'll find much of these, do use them for more accurate navigation and flight. It's not one- but many sensors together for best possible flight. For example the Parrot drone uses 3 axis accelerometer, gyroscope, magnetometer and one ultrasound sensor.

Personally, I would recommend buying a flight controller. If this is your first project with a quadcopter, you probably should focus on its navigation algorithms. You can however try making your own when you gain experience with quads.

Which one should you use?

It really depends upon you. If you wish to employ all the above sensors, you'll need one matching those specs. Else you can search for an alternative.