答:
It looks like there are 3 main components to the demonstration in this video.

1. Creating the map

Navigation requires a map of the robot's environment -- it looks like this was done manually.  It doesn't matter whether you create the digital map based on the real-world map, or a real-world map based on a contrived digital map.  But the maps must match.

2. Computing the path

As mentioned in Chuck's answer, Dijkstra's algorithm can compute a path through a map -- one of many methods of doing so, but probably the most appropriate for this problem.  However, you need a bit more than Dijkstra here; the final path is not just the list of nodes you will travel through, but what direction you need to turn at each node (i.e. how many lines the line sensor will need to cross over) in order to be on the line leading to the next node in the path.

I would imagine that the instructions set to the robot are just a simple list of how many paths to rotate over at each intersection.  Like [-1, -1, 1, 1, 0].  This assumes a known starting point and orientation.

3. Following the path

This seems like a straightforward application of a line-following robot.  It looks like this robot is also able to detect the intersections.

In their video, they provide a huge piece of manual assistance: placing the robot at a known starting location.  All that the robot does is follow the lines, and at each detected intersection executes a turn according to the list of turns it received as instructions.

Title: Advanced Line Following Robot of Maze Solving

Body:
I know how to make a line follower. But in this video what have they done exactly? They are giving the source and destination in the map but how the robot moves based on the instruction given in map?

What is the procedure to do it? They have mapped the path. Please do watch the video.


问:
Crock Pot Knob Turner
I have a Crock Pot with an analog knob and would like to find a way to turn the knob by using and appliance timer. I have no idea where to begin. I need help.
Thanks</p>

答:
You might be better served by using a PID "profile controller" -- it would be easier (cheaper) and more accurate than trying to manually control the knob.  These are also called "Ramp/Soak controllers".  They allow you to set different temperatures for different times.  A solid-state relay model (SSR) would probably be the most appropriate for what you are doing.

You would keep your crock pot set on high, put the temperature sensor inside, and let the PID controller do the rest.  It works by cycling the power on and off, trying to maintain the proper temperature during each of the time periods you programmed.

ContentLicense: CC BY-SA 3.0

Title: Crock Pot Knob Turner


问:
Which is model is best for feedback control of robotic manipulators: MIMO or parallel SISO?
I'm currently designing a robotic arm with 6-DOF, and my goal is to be able to give setpoints for 3d position, velocity and orientation ($x,y,z,\dot{x},\dot{y},\dot{z},\theta,\alpha,\gamma$).

I only had feedback-control for SISO systems so far in College, so, taking the learning curve of multivariable control in consideration, should I approach this problem trying to model the system as a MIMO or multiple SISOs?

If possible please mention possible disadvantages and advantages in each strategy.

答:
Welcome to Robotics.SE! This is not exactly my area of expertise, but let me give you a few pointers.

A very common approach for controlling manipulators is to first design good joint velocity controllers, in the "multiple SISO" approach you mention. You would then use inverse kinematics to determine at each point in time what the joint velocities should be ideally to reach your desired end-effector pose.  Assuming your joint velocity control loop dynamics are fast enough, you should be able to achieve those velocities. The kinematic model of manipulators is usually obtained in terms of Denavit–Hartenberg parameters.

Considering that it is frequently done for robots and probably is enough for your purposes, I suggest you take that approach.

In a non-linear control class I took we saw a MIMO model for robot manipulators. I am not 100% sure about this, but I think you might want to use this if you are interested in modeling not only kinematics but also dynamics.

The main difference is that in this scenario the joint positions and velocities all affect the inertia matrix, Coriolis and centrifugal forces and damping in a non-linear and usually not separable fashion. So you would not only have to get used to MIMO control, but would have to look into non-linear control as well.

As I said, it's not my area of expertise so if someone thinks I said any gibberish I would be gladly corrected.


问:
Detect polyethylene
First of all, I am in high school[to tell you that I am a newbie and lack knowledge]

What I want to achieve for now is a thing that can differentiate between poly bags[polyethylene] and other stuffs. Or a thing that could detect polyethylene.

I have to built a robot and therefore we have only a few method accessible.

Anyway any knowledge or suggestion or external links provided by you, about this topic would be welcomed by me.

答:
Mentioned this as a comment, but getting no response I'm turning it into an answer:

This is going to depend very heavily on what the "other stuffs" are. You could probably differentiate between polyethylene and water using a humidity sensor. You could differentiate between polyethylene and iron by using a magnet.

In other words, if you are comparing polyethylene against other materials for which there is an existing sensor, then it might be reasonable to just set up the sensor for each of those other materials and assume that a negative detection for all those sensors is a positive detection of polyethylene.

Title: Detect polyethylene


问:
Need a mobile robot simulator that provides easier odometry funtions
I want a mobile robot to go from a starting position to a goal position. But, I don't want to calculate the pose from encoders. Instead I want to know if there exist such a simulator that provides pose function that makes the work easier, like go_to(x_coordinate, y_coordinate). That means, the robot will automatically calculate its current position and leads itself to the goal position. </p>

答: This closed StackOverflow question has a long list of simulators and some discussion on them.  Some are simple and 2D only, some are 3D and include rigid body physics simulation. </p>


问:
What is the difference between path planning and motion planning?
What are the main differences between motion planning and path planning?
Imagine that the objective of the algorithm is to find a path between the humanoid soccer playing robot and the ball which should be as short as possible and yet satisfying the specified safety in the path in terms of the distance from the obstacles.

Which is the better terminology? motion planning or path planning?

答:
There isn't really a difference. "Path planning" might be used more often to simply describe the problem of finding a desired path from one state (or sub-set of states) to another. Whereas "motion planning" might be used to describe the same problem but more specifically the actual commanded motions that the robot uses to track the series of desired states along the path.

For example, path planning would produce a desired trajectory for a rocket, whereas motion planning would produce the series of commands to the engines, fins, etc.

So for the problem you mention, you need to plan a path for the robot to follow. This then needs to be expanded into trajectories for all of the robot's leg and arm joints. Then you have to convert these trajectories into raw commands to the motors (or whatever control input the robot accepts).


答:
What's the difference between turn-by-turn GPS and driving a car?

GPS is path planning: high-level commands like, "turn right in 1 mile."

Driving is motion planning, which means following a route established by path planning while at the same time taking care of the minutia: interfacing with the car, staying in lane, watching for pedestrians, obeying traffic law, merging with other vehicles, changing lanes, etc.

Title: What is the difference between path planning and motion planning?

Body:
What are the main differences between motion planning and path planning?
Imagine that the objective of the algorithm is to find a path between the humanoid soccer playing robot and the ball which should be as short as possible and yet satisfying the specified safety in the path in terms of the distance from the obstacles.

Which is the better terminology? motion planning or path planning?


答:
Compare the following two images:

The path planning is somewhat trivial. There's only one path: the rope. The motion planning on the other hand is not that easy.

In a maze the path planning is hard and motion planning is easy:

Of course both planning tasks can be easy or hard at the same time or anything in between.

They are linked to one another in that

the planned motion should follow the path or follow that path closely

the current motion can influence the path planning. If driving in one direction at a high speed, a sudden change in velocity might not be the best idea even if that would be necessary to get on the shortest path. Or the starting pose of a nonholonomic robot, which influences the possible path significantly.

They are separate in that

motion is related to time (change of position over time), but the path itself is not. Even if the motion goes along the path exactly it could have various trajectories for velocity and/or acceleration. Your robot could stop for example to let another robot cross its path, which is a change in motion but not the path itself.

motion can be influenced by other things, like wind for example

Neither list is exhaustive.

Which the terms is better than ? motion planning or path planning ?

There's no "better" term. It depends on what you are describing.

For anything that involves moving a physical robot, I'd use motion planning.
How do I get this thing from here to there? could be a question you are answering.

If the robot itself is abstracted away and you are only planning a path of a point through a maze I'd use path planning. What's the shortest path from point A to B? could be an example question.

But again, both planning tasks are connected. If you ask What's the shortest possible path? then certainly the geometry and motion capabilities of the robot determine what's possible. You do both motion and path planning at the same time. Using either term should be fine here.

This holds true for the other cases as well. Both terms can be used interchangeably because the definition of motion and path aren't very clear. (a path implies that a motion happens along it and a motion necessarily happens along a path). You are usually doing both to some degree anyway.


答:
When it comes to robots the terms that are most often used are path planning and trajectory planning. While motion is most commonly used in combination not with planning but with control as in motion control.

In most cases by path planning the spatial aspect of planning is considered, while trajectory planning (again, in most cases) includes the velocity and acceleration components also. For industrial robots and CNC machines the waypoints are given be the programmer while the motion controller (robot controller, CNC) plans and executes the trajectories. Based on the dynamics limitations (of the system or coming from the programmer) the motion controller calculates makes a plan how to reach the next waypoint and to arrive there with a desired velocity and acceleration (zero if you want to remain in the next waypoint)

In an order of event one would normally plan a path in the form of waypoints then plan the trajectories (incl. velocities and accelerations) linking those waypoints. Based on the system which you are using this might be done by your motion controller.


问:
Stereo vision in Matlab
I am working on a project about robot soccer vision.

How I utilize two webcams as a stereo vision in matlab for robot soccer matters?

答:
This is a pretty broad question but here is how I would approach the problem:

Connect to each camera using the videoinput function.

Calibrate the cameras using a checkerboard pattern -- I am more familiar with using OpenCV to do this, but MATLAB has a cameraCalibrator function.

Analyze the stereo images to get a 3D interpretation of the scene. This is another broad field of study, but you can use disparity to try and create a complete depth image or pick out particular features using detectSURFFeatures (along with extractFeatures) and match them with matchFeatures.

Use the 3D data for high-level planning and control of the robot. This is tied back into how you analyze the images too, i.e., if you want to track particular objects like the ball or other robots, or estimate the relative pose of the opposing net, or generally localize the robot itself based on fiduciary markers or something.

The process of connecting to the cameras, calibrating, and extracting 3D data can be thought of as a work package in terms of getting your system working. However, the fourth item (using the data) is where you need to start so that you know what requirements and limitations to place on the algorithms.

Title: Stereo vision in Matlab


问:
What is the required theory behind building a robotic arm?
I am currently planning on building a robotic arm. The arm's specs are as follows:

3 'arms' with two servos each (to move the next arm)

single servo clamp

mounted on revolving turntable

turntable rotated by stepper motor

turntable mounted on baseplate by ball bearings to allow rotation

baseplate mounted on caterpillar track chassis

baseplate is smaller in length and width than caterpillar chassis

What are the required formulas in determining how much torque each servo must produce, keeping in mind that the arm must be able to lift weights of up to 1 kilogram? Also, considering that the ball bearings will take the load of the arm, how strong does the stepper have to be (just formulas, no answers)?

As far as overall dimensions are concerned, the entire assembly will be roughly 255mm x 205mm x 205mm (l x w x h). I have not finalized arm length, but the aforementioned dimensions give a general estimate as to the size.

答:
There are 2 (or 3, depending on how the planned lifetime of the robot is) thing thats you have to consider.

Static load:
The motors stall (zero revolution) torques have to be able to hold the weight in the robots most unfavorable pose (usually the arm stretched out). You can determine this by static modelling, that involves only an equilibrium of forces for a given pose (no motion). The motors stall torques have to be at least equal (but larger is recommended) then the torques obtained from the static model.

Dynamic load:
This is the case where you need to consider both forces and motions. determine the target maximum speed of the robot for its end-effector (tool center point, TCP). Besides your mentioned maximum payload, you will need to know the moment of inertia of your payload (or you can approximate it if you consider that it is e.g. sphere shaped or square shaped). You will also need to approximate the masses and inertia of your linkages (incl. motors). These all are input to the dynamical analysis. The dynamic model calculates the motions of the centers of gravities of all your solids then attaches the necessary forces that act on them and then does a force equilibrium (as in the static model, but completed with "motion forces").

The fastest way to model the dynamics is with a software for dynamic modeling (e.g. SimMechanics package of Matlab). If not you will have to write the equations. I would recommend the Newton-Euler approach since it is the simplest. Here you can find more about it:

http://www.diag.uniroma1.it/~deluca/rob2_en/06_NewtonEulerDynamics.pdf

The static model is a subcase of your dynamic model. If in the dynamic model you set velocities and accelerations to zero you end up with a static model. However, to find the worst case pose for your robot (the one that requires the maximum amount of torque, or produced the highest force on the bearings) is not simple in the dynamic case (when you have motions, not just standstill). You need to find the worst case load pose in order to be sure that the maximum load on the bearings and maximum torque on your motors does not exceed the maximum allowable forces/torques in the datasheet of your motor/bearings Trial and error with large increments, see where the forces peak and investigate that interval with smaller increments. A more complicated approach would be to use an optimization algorithm to find which pose maximizes your torques or reaction forces...

If you want to plan the lifetime of your robot a fatigue analysis will also be required. I assume you do not need this...


答:
It sounds like you are developing a robotic manipulator from scratch so I also assume you will be writing software for position control too. Both the design and control depend on not only the dynamics but also the kinematics of your robot.

Kinematics cover the relationships between the joint angles and link lengths (each "arm" is referred to as a link) so that you can determine the position and orientation (as well as velocities and accelerations) along any part of the robot. One method of modeling the kinematics is to break your set of links into the corresponding series of Denavit-Hartenberg parameters. This is not difficult to do, you just have to familiarize yourself with coordinate frames and determine the coefficients for your particular links.

Keep in mind that we are always considering the robot states to be the angles of the joints (or extension of any prismatic joint). Given any set of angles we can then use the kinematics to determine the Cartesian positions of the robot components. Same goes for angular rates to Cartesian velocities and angular accelerations to Cartesian accelerations (of course the velocities and accelerations depend on the angles and rates as well).

To get the torques we then look at the dynamics, where we use the kinematics to model the robot motion and then examine the reaction forces and moments between links based on the inertia of the moving masses. Again, this is not actually too difficult and reduces to a series of free-body diagrams that can be solved in series. The torque on each joint is then simply the moment being applied to it projected onto the joint axis of rotation.

This is known as the computed torque method whereby we prescribe a trajectory for the manipulator joints over time (angles, angular velocities, and angular accelerations) then use the kinematics to determine the Cartesian motion of the joints and finally solve for the reaction torques in the joints. Essentially we are saying "if the manipulator were to perform this motion, what torques will it need to apply through the motors".

When you control the manipulator, you can then input those computed torques for your desired motion and include a layer of feedback control to correct for errors since our model is never perfect. Of course you can use the kinematics and dynamics to approach the problem in different ways, but you'll always need to include them both.

As 50k4 mentioned in the other answer, there are plenty of software packages to help you do this. However, you will most definitely have to understand the underlying principles in order to translate your particular design into the configuration that the software expects (i.e., DH parameters or some other accepted convention). Manipulators can be a bit daunting so take it in stride!

Title: What is the required theory behind building a robotic arm?

Body:
I am currently planning on building a robotic arm. The arm's specs are as follows:

3 'arms' with two servos each (to move the next arm)

single servo clamp

mounted on revolving turntable

turntable rotated by stepper motor

turntable mounted on baseplate by ball bearings to allow rotation

baseplate mounted on caterpillar track chassis

baseplate is smaller in length and width than caterpillar chassis

What are the required formulas in determining how much torque each servo must produce, keeping in mind that the arm must be able to lift weights of up to 1 kilogram? Also, considering that the ball bearings will take the load of the arm, how strong does the stepper have to be (just formulas, no answers)?

As far as overall dimensions are concerned, the entire assembly will be roughly 255mm x 205mm x 205mm (l x w x h). I have not finalized arm length, but the aforementioned dimensions give a general estimate as to the size.


问:
What is required to build a simple XY-stage?
In the scope of my PhD, I would like to build an automated microscopy set-up that should take images of a sample of 2cm by 2cm. This should be done by taking pictures of 500 micrometers by 500 micrometers.

Therefore I need to design an XY-stage moving my sample over the optical setup. I would use a Raspberry Pi to steer all the hardware.

Could you direct me to material about how to best make an XY-stage ? My questions are about what types of motors to use (stepper?), how many, how to create a good sliding mechanism to avoid jerky steps, etc.

Simple links to basic engineering of such set-ups would be more than enough for me to start, as I am a complete layman in this field.

EDIT: I have found this blogpost. It does what I require, if I get small enough angle step stepper motors.

EDIT2: I need a maximal range of motion of 10 cm in both directions. The overall size should not exceed 30x30 cm^2. Step sizes should not exceed 10 microns. I do not care about moving speed. Based upon the design in the link, buying a stepper motor with a 100:1 gear box could allow my very small radial steps (<0.05 deg) which would result in about 5 micron steps, assuming a rotor radius of about 1cm.
As far as price goes, it should not exceed commercially available options which start at about 5k USD

答:
You mentioned step size of 10 microns...It is not certain that you can achieve this precision with conventional stepper motors and diy hardware. the backlash in the gearbox (especially if multi stage) would exceed your required precision...I would recommend looking into precision piezo actuators...

These come to mind:
http://www.physikinstrumente.com/products.html

To my knowledge they have high precision x-y tables and suitable controller for them that you can interface also form an arduino (or something else, e.g. Matlab). Should be right around your budget, maybe a bit higher... You can also look for different manufacturer for piezo linear actuators...


问:
Is modelling a robot and deriving its Equations of Motions more applicable to a system that is inherently unstable?
As someone who is new and is still learning about robotics, I hope you can help me out.

Let's say I have two systems:

(a) Inverted Pendulum (unstable system)

(b) Pole Climbing Robot (stable system)

For system (a), I would say that generally, it is a more dynamic system that produces fast motion. So, in order to effectively control it, I would have to derive the Equations of Motions (EOM) and only then I can supply the sufficient input to achieve the desired output. Eventually, the program will implement the EOM which enables the microcontroller to produce the right signal to get the desired output.

However for system (b), I assume that it is a stable system. Instead of deriving the EOM, why cant I just rely on the sensor to determine whether the output produced is exactly what I want to achieve?

For unstable system, controlling it is just difficult and moreover, it does not tolerate erratic behavior well. The system will get damaged, as a consequence.

On the contrary, stable system is more tolerant towards unpredictable behavior since it is in fact stable.

Am I right to think about it from this perspective? What exactly is the need for deriving the EOM of systems (a) and (b) above? What are the advantages?  How does it affect the programming of such systems?

Edited:
Some examples of the climbing robot that I'm talking about:

i.ytimg.com/vi/gf7hIBl5M2U/hqdefault.jpg

ece.ubc.ca/~baghani/Academics/Project_Photos/UTPCR.jpg

答:
Interesting question...

In a closed loop system you always rely on a sensor to see if the output equals your reference value or not (e.g. is the actual state and desired state the same). If no, your controller acts tries to minimize the difference between desired state and current state.

The input you can give to the inverted pendulum is not the same as your output, what you measure. If it would be, it would not be an inverted pendulum. Infact with the EOM you try to figure out what input should you give to the system to produce the output you expect. In other word how does your input relate to your output (or vice versa).

Here is a tutorial on how to write the EOM:
http://ctms.engin.umich.edu/CTMS/index.php?example=InvertedPendulum&section=SimulinkModeling

I am not sure what you meen by pole climbing robot, but I assume it is a more complex system consisting of more actuators and so it has a higher level (maybe open loop) control system and then closed loops for all different actuators...


答:
A system is (marginally) stable if all of the poles are (equal to or) less than zero. In general, the poles of a system determine whether a system is stable or not, and the zeros of a system determine the approach to stability (rise time, settling time, overshoot, etc.)

A PID controller operates with no system model taken into account. A PID controller adds a pole at zero and two zeros to the system; these can be adjusted to tune the system response.

The problem with trying to use a PID controller on an unstable system is that you need to tune the zeros of the controller to exactly equal to the unstable poles to achieve pole-zero cancellation. If, for some reason (friction, wear, capacitor aging, vibration, etc.) the controller's zero end up not exactly equal to the unstable poles, then the unstable poles are no longer cancelled and the system goes unstable again.

In scenarios like this, adding zeros is not the solution. The way to control an unstable pole is to actually place the (unstable) open-loop poles somewhere else. In this manner you're not trying to control the system by cancelling the poles, you're actually acting to change the fundamental dynamics of the system.

The technique to achieve pole placement is generally state feedback control. This requires a system model because (hand-waving) you need to know which poles are unstable and in order to be able to make them stable. Remember, for stability, a positive pole is unstable and a negative pole is stable, from the inverse Laplace tranform of the pole, $e^{\pm pt}$ - the time response either decays or "explodes" exponentially.

So, once you have a system model and evaluate which poles need to be moved from the right- to the left-hand plane you can calculate the gains required to do the move et voila, the controller is complete. Note the (hand-waving); this can be a very time-consuming task.

So, in conclusion, while you might be able to "skate by" with a PID controller on an unstable system, PID control will never change the pole locations of the underlying system so you will only ever achieve tenuous stability. In order to change the underlying system dynamics, you first need to know the underlying system dynamics, and that's why you need a system model.

Title: Is modelling a robot and deriving its Equations of Motions more applicable to a system that is inherently unstable?

Body:
As someone who is new and is still learning about robotics, I hope you can help me out.

Let's say I have two systems:

(a) Inverted Pendulum (unstable system)

(b) Pole Climbing Robot (stable system)

For system (a), I would say that generally, it is a more dynamic system that produces fast motion. So, in order to effectively control it, I would have to derive the Equations of Motions (EOM) and only then I can supply the sufficient input to achieve the desired output. Eventually, the program will implement the EOM which enables the microcontroller to produce the right signal to get the desired output.

However for system (b), I assume that it is a stable system. Instead of deriving the EOM, why cant I just rely on the sensor to determine whether the output produced is exactly what I want to achieve?

For unstable system, controlling it is just difficult and moreover, it does not tolerate erratic behavior well. The system will get damaged, as a consequence.

On the contrary, stable system is more tolerant towards unpredictable behavior since it is in fact stable.

Am I right to think about it from this perspective? What exactly is the need for deriving the EOM of systems (a) and (b) above? What are the advantages?  How does it affect the programming of such systems?

Edited:
Some examples of the climbing robot that I'm talking about:

i.ytimg.com/vi/gf7hIBl5M2U/hqdefault.jpg

ece.ubc.ca/~baghani/Academics/Project_Photos/UTPCR.jpg


答:
The inverted pendulum is unstable in the sense that it will diverge away from the upright position if perturbed (for example, slightly blown by wind or lightly vibrated). On the other hand the "climbing robot" will swing back to its original position if perturbed, so you can say it is stable.

You don't need to derive the equations of motion for an unstable system in order to control it if you have sensor feedback of the desired output (just like you said). Instead, you use a feedback control law that compares the sensor reading to your desired output to compute the required control input that reduces that difference. Read about PID controllers to get an idea of how that works (it's actually pretty simple).

The advantage to using the equations of motion is that you can predict the required input to achieve a desired response, and this predicted input is often referred to as feed-forward control (or open-loop control). If you combine both feed-forward and feedback control you get a very robust system that applies predicted inputs to achieve a desired output but also implements feedback based on sensors to correct for errors (your equations of motion can never be perfectly accurate).

Another benefit of using the equations of motion is that you can account for non-linearities in the system that might otherwise be problematic for a PID controller.

When it comes to programming, using feedback will be much simpler than using feed-forward since the equations of motion will likely be relatively complex (in general, but not bad for a simple inverted pendulum).


问:
Why do 3-axis accelerometers seemingly have a left-handed coordinate system?
Careful inspection of page 35 (figure 58) of the ADXL345 datasheet shows that under gravitational loading only, the chip uses a left-handed coordinate system.  My own experiments with this chip confirm this.

I typically only use the chip to indicate the gravity vector.  So when using this chip, I simply negate the values to get a right handed coordinate system.  But this doesn't seem right.  I assume there is a logical and mathematical explanation for the left-handed coordinate system but i can't figure out what it might be.

答:
This is not using a left-handed coordinate system! Check out my crude edits to the diagram.

Note each coordinate system (RGB for XYZ, black for gravity) has the gravity vector aligned in the negative direction of the appropriate axis, while the diagram shows a positive reading. I could have drawn them the other way but the actual acceleration in the absence of gravity would be upwards to produce the same reading. Maybe this is why negating the values works for your application.


问:
Filtering angular velocity spikes of a cheap Gyroscope
I would like to filter angular velocity data from a "cheap" gyroscope (60$). These values are used as an input of a nonlinear controller in a quadcopter application. I am not interested in removing the bias from the readings.

Edit:
I'm using a
 l2g4200d gyroscope connected via i2c with an Arduino uno. The following samples are acquired with the arduino, sent via serial and plotted using matlab.

When the sensor is steady, the plot shows several undesired spikes.

How can I filter these spikes?

1st approach: Spikes are attenuated but still present...

Let's consider the following samples in which a couple of fast rotations are performed. Let's assume that the frequency components of the "fast movement" are the ones I will deal with in the final application.

Below, the discrete Fourier transform of the signal in a normalized frequency scale and the second order ButterWorth low pass filter.

With this filter, the main components of the signal are preserved.

Although the undesired spikes are attenuated by a factor of three the plot shows a slight phase shift...

And the spikes are still present. How can I improve this result?
Thanks.

EDIT 2:

1./2. I am using a breakout board from Sparkfun. You can find the circuit with the Arduino and the gyro in this post: Can you roll with a L3G4200D gyroscope, Arduino and Matlab?
    I have added pullup resistors to the circuit. I would exclude this option because other sensors are connected via the i2c interface and they are working correctly.
    I haven't any decoupling capacitors installed near the integrated circuit of the gyro. The breakout board I'm using has them (0.1 uF). Please check the left side of the schematic below, maybe I am wrong.

Motors have a separate circuit and I have soldered all the components on a protoboard.

The gyro is in the quadcopter body but during the test the motors were turned off.

That is interesting. The sampling frequency used in the test was 200Hz.  Increasing the update freq from 200 to 400 hz doubled the glitching.

I found other comments on the web about the same breakout board and topic. Open the comments at the bottom of the page and Ctrl-F virtual1

答:
You gave the part number and protocol, but

Can you provide a schematic for how this is installed in a circuit?

Are you using the module or an individual chip?

Is this all soldered together or is it connected on a breadboard?

Is this laying on a table or similar or is it actually in a quadcopter body? Are the quadcopter motors running?

What sampling rate are you using?

I ask because the spikes seem too large to be "just" noise. My thoughts on troubleshooting would then be to address whatever the underlying cause of the spikes is rather than trying to filter them out of the output. Potential issues I can think of are related to the questions I'm asking, so for each question I ask I'm thinking it could be:

It could be either a voltage supply issue or communication line issue. Things to look at on the schematic: (A) Check that the supply voltage is actually within the 2.4 - 3.6V allowable input range (page 11); (B) Check that decoupling capacitors are installed and connected to a suitable voltage; (C) Check that I2C pullup resistors are installed; (D) Check what other large equipment (read:motors) are installed in the circuit and check that the power supply is capable of delivering peak current.

Again, checking for decoupling capacitors and if everything is soldered correctly; on the module everything could be expected to be soldered correctly, but pullup resistors are not included.

Breadboard connections can be noisy, especially at high communication rates. Also, a breadboard connection implies that the system may not be securely attached to anything.

While unlikely, a loose chip/module could be experiencing some vibration (maybe from nearby speakers) that could explain the spikes. If the motors are running, this is a lot more likely. In addition, the motors could be browning out your voltage supply, creating issues for the gyro.

This is mostly a curiosity question, but higher communication rates tend to cause/exacerbate issues.

I would guess it's probably a supply voltage issue, either to the chip directly or on the communication line, but again, they're all shots in the dark without more information.

:EDIT:

From a link OP posted, there was this comment/answer:

What did work was setting it to read both the A8 and the 28 registers, then compare them. If they differ, read them again! Seems to have solved 100% of my glitching. Now I can get on to calibrating in peace.

This, coupled with other users that have similar issues, would leave me to believe it's a defective chip design. If you evaluate the data and the least significant byte is, in fact, always 255 when you get this glitch, then you could always just check for that condition and either ignore that sample or substitute the previous reading for the current reading, or do what is suggested above by 'virtual1' on the other site. I would avoid setting it to zero because this may cause "inverse glitches" if you get that spike while there is actually valid data.


答:
Did you try out median filtering?

This nonlinear technique is suitable to counteract the presence of spikes while preserving the high frequency content of the input signal.

Title: Filtering angular velocity spikes of a cheap Gyroscope

Body:
I would like to filter angular velocity data from a "cheap" gyroscope (60$). These values are used as an input of a nonlinear controller in a quadcopter application. I am not interested in removing the bias from the readings.

Edit:
I'm using a
 l2g4200d gyroscope connected via i2c with an Arduino uno. The following samples are acquired with the arduino, sent via serial and plotted using matlab.

When the sensor is steady, the plot shows several undesired spikes.

How can I filter these spikes?

1st approach: Spikes are attenuated but still present...

Let's consider the following samples in which a couple of fast rotations are performed. Let's assume that the frequency components of the "fast movement" are the ones I will deal with in the final application.

Below, the discrete Fourier transform of the signal in a normalized frequency scale and the second order ButterWorth low pass filter.

With this filter, the main components of the signal are preserved.

Although the undesired spikes are attenuated by a factor of three the plot shows a slight phase shift...

And the spikes are still present. How can I improve this result?
Thanks.

EDIT 2:

1./2. I am using a breakout board from Sparkfun. You can find the circuit with the Arduino and the gyro in this post: Can you roll with a L3G4200D gyroscope, Arduino and Matlab?
    I have added pullup resistors to the circuit. I would exclude this option because other sensors are connected via the i2c interface and they are working correctly.
    I haven't any decoupling capacitors installed near the integrated circuit of the gyro. The breakout board I'm using has them (0.1 uF). Please check the left side of the schematic below, maybe I am wrong.

Motors have a separate circuit and I have soldered all the components on a protoboard.

The gyro is in the quadcopter body but during the test the motors were turned off.

That is interesting. The sampling frequency used in the test was 200Hz.  Increasing the update freq from 200 to 400 hz doubled the glitching.

I found other comments on the web about the same breakout board and topic. Open the comments at the bottom of the page and Ctrl-F virtual1


答:
The answer is that 3-axis accelerometers don't have a left handed coordinate system just for the gravity. In static condition (i.e. if the accelerometer is not accelerating with respect to any inertial frame) they measure the opposite of gravity acceleration, not the gravity acceleration itself.

In more general terms, the accelerometers measure the difference between the actual acceleration of the sensor with respect to any inertial frame and the gravitational acceleration:
$$
a_{accelerometer} = a_{sensorFrame} - g
$$
This "acceleration" measured by the accelerometer is sometimes called proper acceleration.

This can be easily verified by checking the measure of an accelerometer in free fall: as in that case the actual acceleration of the sensor will be equal to $g$, the accelerometer measure will be $0$.

Title: Why do 3-axis accelerometers seemingly have a left-handed coordinate system?

Body:
Careful inspection of page 35 (figure 58) of the ADXL345 datasheet shows that under gravitational loading only, the chip uses a left-handed coordinate system.  My own experiments with this chip confirm this.

I typically only use the chip to indicate the gravity vector.  So when using this chip, I simply negate the values to get a right handed coordinate system.  But this doesn't seem right.  I assume there is a logical and mathematical explanation for the left-handed coordinate system but i can't figure out what it might be.


问:
Where to make changes for simulation project Bullet/Gazebo/ROS/Orocos
I am starting to develop robotics project which involves simulation (and maybe real world programs) of soft-body dynamics (for food processing) and clothes/garment handling (for textile industry or home service robots). It is known that soft-body dynamics and garment handling are two less explored areas of robotics and simulation, therefore I hope to make some development of (contribution to) projects that are involved. The following projects are involed:

Bullet physics engine - for dynamics

Gazebo - simulation environment

ROS - robot OS, I hope to use Universal Robot UR5 or UR10 arms and some grippers (not decided yet)

Orocos - for control algorithms

Initially I hope use "ROS INDIGO IGLOO PREINSTALLED VIRTUAL MACHINE" (from nootrix.com), but apparently I will have to make updates to the Bullet, Gazeboo, add new ROS stacks and so on.

The question is - how to organize such project? E.g. If I am updating Bullet physics engine with the new soft-body dynamics algorithm then what executable (so) files should I produce and where to put them into virtual machine? The similar question can be asked if I need to update Gazebo.

There seems to be incredibly large number of files. Is it right to change only some of them.

Sorry about such questions, but the sofware stack seems to be more complex than the robotics itself.

答:
As far as I know, soft body simulation is not currently supported in Gazebo.
See https://bitbucket.org/osrf/gazebo/issues/1422/soft-body-supoort-in-gazebo and http://answers.gazebosim.org/question/5129/status-of-bullets-soft-body-dynamics-integration/ .</p>


问:
Need an idea: automated sim card switcher
First off, sorry if my question is too naive or not related to the forum (this is the best matching one I've found on StackExchange).

I have some amount of SIM-cards. I can programmatically access a single SIM-card if it is inserted into a USB-modem. I want to be able to access the specified card in the set. The best way to achieve this I can think of is to create a device that would somehow replace the current card in the modem with one in the set. I can not use several modems for this because I don't really know the amount of cards and I would like to automate this process anyway.

I am more of a programmer than an engineer so everything that follows (including the entire concept of switching cards) looks pretty weird to me. There probably is a better solution, but this is the best I've come up with. For now I consider building some sort of conveyor that would move cards and insert the ones I need with some sort of a feed device. This looks like an overkill to me that would be both expensive to build and uneffective to work with.

I want an idea of a device that would replace SIM-cards into the modem (or maybe a better solution to the problem). Any disassembly of a modem needed is possible.

This is required to automate receiving SMS from clients that have different contact phones. Unfortunately, a simple redirection of SMS is not an option.

答:
Seems pretty challenging! I would suggest a rotating table with the SIM cards (sort of like an old slide projector) that is controlled with a stepper motor or has an encoder or Hall effect sensors so you can position the cards with the reader. On the inside of the ring of cards you could use an actuator to push them into the reader. Getting them back out is probably the harder part since you will need to grab them out.

If you can mess with the reader then that is good since it will work a lot better if you can make it so your actuator system just holds onto the SIM card the entire time -- push it in, read it, then pull it out without letting go. You can then also make the connection a bit looser if that helps pushing in and pulling out more easily.

Another option could be to pull apart the reader some more and set it up so that you press the SIM card up against it instead of inserting into a slot. This would probably make it easier to change cards but you'll have to be more careful about ensuring the "pins" are connected properly.


问:
Transforming angular velocity?
I have the following system here:

http://imgur.com/UTqswOi

Basically, I have a range finder which gives me $R_s$ in this 2D model. I also have the model rotate about the Centre of Mass, where I have angular values and velocities Beta ($\beta$) and BetaDot ($\dot{\beta}$).

I can't see, for the life of me, how to figure the formula for the angular velocity in the Range Finder frame. How am I supposed to do this? I have all the values listed in those variables. The object there doesn't move when the vehicle/system pitches. It's stationary.

答:
I think your diagram is missing an angle for the laser angle with respect to the vehicle body -- I'm going to call that angle $\alpha$, see this diagram for clarity:

Since it seems you are tracking an object with your laser, I imagine the point of this is to predict the angular velocity of that object in the vehicle frame. So your laser is scanning in 2D, providing range at a number of angles, and you want to predict what angle the object will be at in the next time step.

In that case, you need to consider to motion of the system to figure out the motion of the target object in the laser frame. Assume the target object has position $\hat{p}$ in the world frame and $\hat{p}_L$ in the laser frame. Although it sounds like this is for a manipulator that is fixed at the base, we will still consider a moving centre of mass with position $p_0$ in the world frame. The position of the target in the world frame is then:

$\hat{p} = p_0 + A_{\beta} \begin{bmatrix} L_z \\ -L_y \\ \end{bmatrix} + A_{\beta} R \begin{bmatrix} \cos \alpha \\ -\sin \alpha \\ \end{bmatrix} $

Where $A_{\beta} = \begin{bmatrix} \cos \beta & \sin \beta \\ -\sin \beta & \cos \beta \\ \end{bmatrix}$

Then we differentiate that to get the velocity -- which should be zero assuming your object is stationary in the world frame.

$0 = \dot{p}_0 + \dot{\beta} J_{\beta} \begin{bmatrix} L_z \\ -L_y \\ \end{bmatrix} + R \dot{\beta} J_{\beta} \begin{bmatrix} \cos \alpha \\ -\sin \alpha \end{bmatrix} + R \dot{\alpha} A_{\beta} \begin{bmatrix} -\sin \alpha \\ -\cos \alpha \end{bmatrix} + \dot{R} A_{\beta} \begin{bmatrix} \cos \alpha \\ -\sin \alpha \end{bmatrix}$

Where $J_{\beta} = \begin{bmatrix} -\sin \beta & \cos \beta \\ -\cos \beta & -\sin \beta \\ \end{bmatrix}$

This then defines two equations (the z- and y-components of the above equation) in two unknowns ($\dot{R}$ and $\dot{\alpha}$).

However, what you really need is to simply find an expression for the predicted range and laser angle ($\tilde{R}$ and $\tilde{\alpha}$) in terms of your states, the vehicle pose, ($z$,$y$,$\beta$) and target position ($\hat{z}$,$\hat{y}$).

$\tilde{R} = \sqrt{\left( \hat{z} - \left( z + L_z \cos \beta \right) \right)^2 + \left( \hat{y} - \left( y + L_y \sin \beta \right) \right)^2}$

$\tilde{\alpha} = \tan^{-1} \left( \frac{\hat{y} - \left( y + L_y \sin \beta \right)}{\hat{z} - \left( z + L_z \cos \beta \right) } \right) - \beta$

Then you can apply this in an EKF according to the chat discussion. Note I have switched the axes labels and sign conventions to something that I am more used to.

Title: Transforming angular velocity?


问:
Arduino Motor control
I'm working on a rather low budget project, and need some way to control four or more motors using one Arduino. I've looked at motor shields a little, but I have a shield on top of it already, It does have female input on the top though, so a motor shield may work. Any suggestions?</p>

答: I've had luck using these motor driver units.  They can be speed-controlled with the PWM outputs, and motor direction can be provided with digital inputs.</p>

Title: Arduino Motor control


问:
Filtering IMU angle discontinuities
I try to measure Euler angles from an IMU, but some discontinuities happens during measurement, even in vibrationless environment, as shown in the images below.

Can someone explain which type of filter will be the best choice to filter this type discontinuities?

答:
Here are my two suggestions for dealing with this problem:

Use a median filter, which replaces each value of your signal with the median of the values in a small window around each one. Here is some pseudo-code, where x is your original signal, y is the filtered signal, N is the number of points in your signal, and W is the number of points in the median filter window.

for (k = 1 to N) {
    y[k] = median of samples x[k-W+1] to x[k]
}

If you are using MATLAB then you can use the function medfilt1 to do this, or the function median to make your own filter (see this), whereas if you are using a language like C++ then you may need to write your own functions (see this).

The other option is to simply check the magnitude of the change in the signal and reject any sample whose change is beyond some threshold. Something like this:

if (abs(x[k] - y[k-1]) > threshold) {
    y[k] = x[k-1]
} else {
    y[k] = x[k]
}

EDIT:

Taking a look at your data, it looked suspiciously like an angle wrapping issue, but around 180 deg instead of 360 deg. The spikes disappear if you double the signal then apply an angle wrap (using MATLAB's wrapToPi for example). The plot below shows the doubled signal in blue and the doubled signal after wrapping in red.

Here is the code I used:

```<code>sensorData = dlmread('sensor.txt');
t = sensorData(:,1);
x = sensorData(:,2);

x2 = 2*x;
y = wrapToPi(x2*(pi/180))*(180/pi);

figure
hold on;
plot(t,x,'k','linewidth',2);
plot(t,x2,'b','linewidth',2);
plot(t,y,'r','linewidth',2);
</code>```

Title: Filtering IMU angle discontinuities

Body:
Here are my two suggestions for dealing with this problem:

Use a median filter, which replaces each value of your signal with the median of the values in a small window around each one. Here is some pseudo-code, where x is your original signal, y is the filtered signal, N is the number of points in your signal, and W is the number of points in the median filter window.

for (k = 1 to N) {
    y[k] = median of samples x[k-W+1] to x[k]
}

If you are using MATLAB then you can use the function medfilt1 to do this, or the function median to make your own filter (see this), whereas if you are using a language like C++ then you may need to write your own functions (see this).

The other option is to simply check the magnitude of the change in the signal and reject any sample whose change is beyond some threshold. Something like this:

if (abs(x[k] - y[k-1]) > threshold) {
    y[k] = x[k-1]
} else {
    y[k] = x[k]
}

EDIT:

Taking a look at your data, it looked suspiciously like an angle wrapping issue, but around 180 deg instead of 360 deg. The spikes disappear if you double the signal then apply an angle wrap (using MATLAB's wrapToPi for example). The plot below shows the doubled signal in blue and the doubled signal after wrapping in red.

Here is the code I used:

sensorData = dlmread('sensor.txt');
t = sensorData(:,1);
x = sensorData(:,2);

x2 = 2*x;
y = wrapToPi(x2*(pi/180))*(180/pi);

figure
hold on;
plot(t,x,'k','linewidth',2);
plot(t,x2,'b','linewidth',2);
plot(t,y,'r','linewidth',2);


答:
You are hoping to make a jukebox for SIM cards.

If you can place a reasonable cap on the size of your magazine (say 50) I would use a carousel with the cards attached to the outer perifery.  You would then index the disk and move the relevant SIM card under the contacts (extended from the modem) that would be loaded onto the card (and signal the SIM door closed or power on the modem).  This way you have two very simple motions that you can simply automate with a stepper motor (with timing belt reduction) and a simple hobby type PWM servo actuator.  You would have some index ridges to align the nano, mini or micro SIMs and glue or double sided tape them down.  If you need more capacity you would just replicate the setup.

A more sophisticated setup would be to make an electronic switching arrangement.  You would then permanently load the cards into sockets and use electronics to enable the connection to each one.  Dual sim selectors for mobile phones are common but I expect the system could be made to work on perhaps 8 or 16 and possibly even cascaded two deep with perhaps 64 to 256 loaded cards selected with commands to the control circuit.

Title: Need an idea: automated sim card switcher

Body:
First off, sorry if my question is too naive or not related to the forum (this is the best matching one I've found on StackExchange).

I have some amount of SIM-cards. I can programmatically access a single SIM-card if it is inserted into a USB-modem. I want to be able to access the specified card in the set. The best way to achieve this I can think of is to create a device that would somehow replace the current card in the modem with one in the set. I can not use several modems for this because I don't really know the amount of cards and I would like to automate this process anyway.

I am more of a programmer than an engineer so everything that follows (including the entire concept of switching cards) looks pretty weird to me. There probably is a better solution, but this is the best I've come up with. For now I consider building some sort of conveyor that would move cards and insert the ones I need with some sort of a feed device. This looks like an overkill to me that would be both expensive to build and uneffective to work with.

I want an idea of a device that would replace SIM-cards into the modem (or maybe a better solution to the problem). Any disassembly of a modem needed is possible.

This is required to automate receiving SMS from clients that have different contact phones. Unfortunately, a simple redirection of SMS is not an option.


问:
Designing a 5 bar linkage robot: Plot Clock
I am a beginner at robotics.
I recently stumbled across this robotic clock on youtube.

I am an electrical engineering student and am interested in submitting it as my minor project.

I have studied the basics on forward and inverse kinematics, Greubler's Equation, four bar linkage but this robot seems to be a 5 bar linkage. I want to know how to implement it in a 5 bar linkage.

How to use the inverse kinematics solutions described in Combined synthesis of five-bar linkages and non-circular gears for precise path
generation, to make the robot follow desired trajectory?

I have been stuck at this for days... any sort of help would be appreciated.

答:
Not to completely ignore your direct questions, but I think you are overthinking the problem.  I don't believe any linkage math or even inverse kinematics are required.  The main reason is that the set of actions that the robot must perform (10 different characters at 4 locations) is small and the workspace never changes (a plane that is fixed to the robot).  That's not to say that this isn't a great project, and there should still be some interesting engineering problems to solve.

Since hobby servos like these are backdrivable, I think the best thing to do would be for you to simply write each character by hand and record the trajectory.  (Record the joint angles at some time increment and/or when the joints move some distance).  Then simply write some control code to follow this trajectory.  Like i said before, because the robot's workspace is completely fixed, you can get away with doing everything in joint-space.  Going in and out of Cartesian space with FK / IK really doesn't buy you much.

Now, if you were to make a mobile system that was supposed to write on any whiteboard surface in it's workspace, then you would start to need some forward / inverse kinematics...


问:
Relation between pole placement and marginal stability?
I'm given an assignment in which I have to design a full state feedback controller by pole placement. The state space system is fully controllable and I've been using Matlab/Simulink to determine the required feedback gain K using the place() command for several sets of poles, however once I use poles that are "too negative", for example p=[-100,-200,-300,-400,-500], my controlled system starts showing bounded oscillatory behaviour. </p>

<p>Is it possible that too negative poles can cause marginal stability? And if so, why? I've read that this is only possible when the real part of one or more poles equals 0, which certainly isn't the case here. </p>

答:
You are most likely running into problems with the maximum time step in your simulation. This phenomenon is known as stiffness, where your equations of motion are highly sensitive to the size of the time step in a discrete solution.

Consider a simple mass-spring system with mass $m$, spring stiffness $k$, displacement $x$ and velocity $\dot{x}$ for states $q$, and an input force $F$ for the input $u$.

$q = \begin{bmatrix} \dot{x} \\ x \end{bmatrix}$

$A = \begin{bmatrix} 0 & -\frac{k}{m} \\ 1 & 0 \end{bmatrix}$

$B = \begin{bmatrix} \frac{1}{m} \\ 0 \end{bmatrix}$

$C = \begin{bmatrix} 0 & 1 \end{bmatrix}$

$D = 0$

We apply a full-state feedback control law (which ends up being PD control), with:

$u = -Kq$

And use MATLAB's place function to determine the gain matrix $K$ for desired poles $p$. Package this into a setup script like this:

```<code>% system coefficients
k = 1000;               % spring stiffness (N/m)
m = 1;                  % mass (kg)

% state-space model
A = [0 (-k/m); 1 0];
B = [(1/m); 0];
C = [0 1];
D = 0;

% desired poles
p = [-1000, -2000];

% gain matrix
K = place(A,B,p);

% initial conditions
x_dot_0 = 0.5;
x_0 = 0.2;
</code>```

Then create a Simulink model:

Now if we use poles $p = \begin{bmatrix} -10 & -20 \end{bmatrix}$, we get an acceptable albeit slower response. But when we use poles $p = \begin{bmatrix} -1000 & -2000 \end{bmatrix}$ we find that there is only marginal stability with some steady-state error (although the bandwidth of the steady-state error is small).

This is happening because the closed-loop system frequency is so high that there is numerical instability in the simulation caused by the solver's choice of time-step. To get around this, we can switch the maximum time step from auto to something appropriate like 1-e5. You can do this in the "Solver options" found in the "Simulation -> Model Configuration Parameters" menu (it might be called something a bit different in your version of MATLAB).

Here is the comparison of the low gain result, high gain result with default auto maximum time-step, and high gain result with maximum time-step of 1e-5.

Body:
You are most likely running into problems with the maximum time step in your simulation. This phenomenon is known as stiffness, where your equations of motion are highly sensitive to the size of the time step in a discrete solution.

Consider a simple mass-spring system with mass $m$, spring stiffness $k$, displacement $x$ and velocity $\dot{x}$ for states $q$, and an input force $F$ for the input $u$.

$q = \begin{bmatrix} \dot{x} \\ x \end{bmatrix}$

$A = \begin{bmatrix} 0 & -\frac{k}{m} \\ 1 & 0 \end{bmatrix}$

$B = \begin{bmatrix} \frac{1}{m} \\ 0 \end{bmatrix}$

$C = \begin{bmatrix} 0 & 1 \end{bmatrix}$

$D = 0$

We apply a full-state feedback control law (which ends up being PD control), with:

$u = -Kq$

And use MATLAB's place function to determine the gain matrix $K$ for desired poles $p$. Package this into a setup script like this:

% system coefficients
k = 1000;               % spring stiffness (N/m)
m = 1;                  % mass (kg)

% state-space model
A = [0 (-k/m); 1 0];
B = [(1/m); 0];
C = [0 1];
D = 0;

% desired poles
p = [-1000, -2000];

% gain matrix
K = place(A,B,p);

% initial conditions
x_dot_0 = 0.5;
x_0 = 0.2;

Then create a Simulink model:

Now if we use poles $p = \begin{bmatrix} -10 & -20 \end{bmatrix}$, we get an acceptable albeit slower response. But when we use poles $p = \begin{bmatrix} -1000 & -2000 \end{bmatrix}$ we find that there is only marginal stability with some steady-state error (although the bandwidth of the steady-state error is small).

This is happening because the closed-loop system frequency is so high that there is numerical instability in the simulation caused by the solver's choice of time-step. To get around this, we can switch the maximum time step from auto to something appropriate like 1-e5. You can do this in the "Solver options" found in the "Simulation -> Model Configuration Parameters" menu (it might be called something a bit different in your version of MATLAB).

Here is the comparison of the low gain result, high gain result with default auto maximum time-step, and high gain result with maximum time-step of 1e-5.


答:
Both the forward kinematics and inverse kinematics aren't too difficult, but always a little tricky for parallel manipulators like this one. Consider the configuration in this diagram.

The forward kinematics first involve solving for the position of the joint where you hold the pen from each motor joint separately and then equating the two.

$\begin{bmatrix} a - b \cos \theta_2 - c \cos \beta \\ a \sin \theta_2 + c \sin \beta \end{bmatrix} = \begin{bmatrix} e \cos \theta_1 + d \cos \alpha \\ e \sin \theta_1 + d \sin \alpha \end{bmatrix}$

This gives you two equations in two unknowns, $\alpha$ and $\beta$. After you solve for those angles, simply substitute them back into one of the sides of the above equation and you have the position of the pen given the input motor angles $\theta_1$ and $\theta_2$.

For the inverse kinematics, you start with the known position of your pen (the blue dot in the image), then you compute the lengths of the red lines, $f$ and $g$. Since you know all other lengths you can also solve for the angles in triangles $def$ and $gcb$. From that geometry you can then get the angles $\theta_1$ and $\theta_2$.

So then you can turn each of your desired clock characters into an x-y path for the pen, convert the x-y path into $\theta_1$-$\theta_2$ trajectories, and control your motors accordingly. It looks like the entire linkage is then mounted on another joint that pushes the pen away from the surface between characters, but the logic behind that should be pretty easy to implement.

Title: Designing a 5 bar linkage robot: Plot Clock

Body:
I am a beginner at robotics.
I recently stumbled across this robotic clock on youtube.

I am an electrical engineering student and am interested in submitting it as my minor project.

I have studied the basics on forward and inverse kinematics, Greubler's Equation, four bar linkage but this robot seems to be a 5 bar linkage. I want to know how to implement it in a 5 bar linkage.

How to use the inverse kinematics solutions described in Combined synthesis of five-bar linkages and non-circular gears for precise path
generation, to make the robot follow desired trajectory?

I have been stuck at this for days... any sort of help would be appreciated.


问:
Backstepping Integrator: changing the virtual control
given the following differential equation 2°ODE in the following form:

$\ddot{z}=-g + ( cos(\phi) cos(\theta))U_{1}/m $

found in many papers (example) and describing the dynamic model of a quadrotor (in this case I'm interested as an example only for the vertical axis $Z$) , I get the movement about $Z$ after integrating the variable $\ddot{z}$ two times. As control input I can control $U_{1}$, which represents the sum of all forces of the rotors.

A Backstepping Integrator (as in many of papers already implemented) defines a tracking error for the height $e_{z} = z_{desired} - z_{real}$ and for the velocity $\dot{e}_{z} = \dot{z}_{desired} - \dot{z}_{real}$ to build virtual controls.

Through the virtual controls one can find the needed valueof $U_{1}$ to drive the quadrotor to the desired height (see the solution later on)

But wait...as said above I need to track both: position error and velocity error.

Now I asked myself, how can I transform such equation and the corresponding virtual controls to track only the velocity??

In my code I need to develop an interface to another package which accepts only velocity inputs and not position information.
I should be able to drive my quadrotor to the desired position using only velocity informations, tracking the error for the z displacement it not allowed.

The solution for the more general case looks like:

$U_{1}=(m/(cos(\phi)cos(\theta))*(e_{z} + \ddot{z}_{desired} + \alpha_{1}^{2}\dot{e}_{z} - \alpha_{1}^{2}e_{z} + g + \alpha_{2}\dot{e}_{z})$

for  $\alpha_{1}, \alpha_{2} > 0$

I could simply put brutal the $\alpha_{1} = 0$ for not tracking the position on Z but I think that is not the correct way.

Maybe could you please point me in the right direction?

Regards

答:
Now I asked myself, how can I transform such equation and the
  corresponding virtual controls to track only the velocity??

Actually deriving the tracking error of the velocity is much simpler than its position counterpart. In the same manner of deriving the position, you could derive the velocity. Start from the velocity and ignore the position which means you only need one Lyapunov function. Note with the position, you need two  Lyapunov functions.


问:
Standalone (or capable of being) Robotics Simulator
I'm a software engineer who volunteers with a non-profit that introduces young girls to technology. We have recently been talking about methods of introducing these children to the world of robotics, and I am curious what types of low-cost options we have.

One very appealing idea would be to have an online simulator, or (more preferable) an off-line standalone-simulator that we can build and program simple robots with. Perhaps nothing more than dragging components together, and then programming the interactions between those components.

What solution(s) exist that I might be able to make use of in our outreach?

答: V-Rep (Virtual Robot Experimentation Platform) seems to be quite broad in the kinds of simulations that it can do. It is free for educational purposes and comes with a wide range of tools. You can take a look at this YouTube video for a demo.</p>


问:
Trying to calculate the Thrust of my quadcopter motors
I am trying to Calculate the thrust my 4 quadcopter motors will have.
I am not sure how to do it. Here are the parts I am Using

4S 6600mAh 14.8V Lipo Pack

15x5.5 Prop

274KV motor max output is 28A

ESC 35 Amp

Thank You

答:
Thrust is a force. You probably have a device in your house to measure force: a scale, so why not determine the thrust empirically?

Build a little mount to place the prop on a scale securely.

Tare the scale

start the motor, the reading of the scale will tell you how much thrust the prop produces


答:
Your motors do not develop the thrust, they spin rotors which develop thrust. Practically speaking, it is probably better to create an empirical model (or look-up table) based on measurements of the thrust versus motor voltage -- see Bending Unit 22's answer.

However, if you really want to predict the thrust, you'll need a model of your rotor. Then you can use blade element momentum theory (BEMT) to estimate the thrust based on the rotor properties -- chord distribution, twist distribution, airfoil lift and drag profiles, etc.

You can also reduce the model to a simple equation like this:

$T = \frac{1}{4 \pi^2} K_T \rho D^4 \omega^2$

Where $T$ is the thrust, $\rho$ is the air density, $D$ is the diameter of your rotor, $\omega$ is the rotor angular speed, and $K_T$ is the thrust coefficient defined as a function of the advance ratio, $\zeta$.

$K_T = C_{T1} \zeta + C_{T2}$

$\zeta = \frac{2 \pi \left( v - v_{\infty} \right)}{\omega D}$

The coefficients $C_{T1}$ and $C_{T2}$ are specific to the rotor blade, and $\zeta$ is a function of the relative vehicle speed along the thrust direction with respect to the surrounding air ($v - v_{\infty}$).

Note that this simplified model is typically more applicable to underwater propellers, but might work for your quadrotor as well. However, BEMT is the usual approach for modeling rotorcraft thrust.

But to apply any model you will need to know the properties of your rotor, and they can be difficult to find (especially considering the properties are probably not constant along the blade). This is why an empirical method is likely your best option to avoid unnecessary work.

Title: Trying to calculate the Thrust of my quadcopter motors

Body:
I am trying to Calculate the thrust my 4 quadcopter motors will have.
I am not sure how to do it. Here are the parts I am Using

4S 6600mAh 14.8V Lipo Pack

15x5.5 Prop

274KV motor max output is 28A

ESC 35 Amp

Thank You


问:
How much of a pause should there be between messages? (IRobot Create-2)
When I send several commands in a row some don't get executed. For example I have a script which starts the roomba driving in a circle and plays the john cena theme song through its speakers but sometimes it will only play the music and not drive. I have noticed that in all the guides there are pauses after every command. Is there any documentation which describes when pauses are needed?</p>

答:
The pause between commands depends on how much time you need to wait for your particular commands to execute. For your example, you'll need to wait however much time it takes to drive in a circle before playing your theme song, then after that wait however long it takes to play the song before moving on to the next command. It might be better to take care of the pauses by using some kind of feedback about what the robot is doing instead of pre-programmed pause times. For example, use a loop to keep checking if the wheels are still turning or if the speaker is still playing.

The bottom line is that your code is being executed line-by-line with no attention being paid to whether the previous command has finished executing, so just remember to account for that when you design the program.


问:
What is the difference between path planning and motion planning?
What are the main differences between motion planning and path planning?
Imagine that the objective of the algorithm is to find a path between the humanoid soccer playing robot and the ball which should be as short as possible and yet satisfying the specified safety in the path in terms of the distance from the obstacles.

Which is the better terminology? motion planning or path planning?

答:
Just an extract from my answer to a similar question:

Path planning is the process you use to construct a path from a
  starting point to an end point given a full, partial or dynamic map.
  Motion planning is the process by which you define the set of actions
  you need to execute to follow the path you planned.

I can also add that you can perform navigation with only motion planning, but this requires planning in infinite continuous multidimensional space that has to take into consideration the motion model of the robot (skid-steering, differential, nonholonomic ...) and variation in speed and acceleration.

The most common method in robotics is to solve the navigation problem using path planning (pure geometric planning from A to B), then apply motion planning on top to assess the feasibility of the path.

It's very unlikely that robots follow an exact motion plan due to the uncertainty in actuation (slippage, velocity control errors accumulate, position errors accumulate ...). This is usually solved by an online high-level planner that monitors the progress along the way and adjusts the motion commands accordingly.

The details are much more complex, but I tried to summarise it in a simple way. Hope this helps.

Ref to my old answer: https://stackoverflow.com/a/19749176


问:
Changing STM32 Nucleo Board's Microcontroller
I have a STM32F072RB Nucleo Board which has a 64Pin Microcontroller.

For my application I chose the sTM32F103RG which has a bigger RAM size and Flash size too.

Can i Remove an F072R from a Nucleo board put a F103R on top of it?

I am testing my code with a F103C, but the flash and ram size is not meeting my requirement. I have a F072R Nucleo Board lying around so for a quick developmental test could I swap it for the 103R ? The R series is Pin Compatible!

Anyone Has done microcontroller swapping before?

答:
From my experience I would not recommend it.

If you look into the datasheets:

STM32F0 @ Page 33

STM32F1 @ Page 28

They look quite Pin compatible, but you change not from one chip to a similar one, you change the complete architecture. From a Cortex M0 to a Cortex M3. There are huge differences internally. Including even the Frequency of the CPU, register arangement (I do not know how the mBed chip will like this). The instruction set is extended by the factor of ~3 .

If I may recommend something change the nucleo board. Maybe a F401RE which uses a Cortex-M4 and is listed as a highperformance module or a L152RE ( a M3 and low performance) both have lot more Flash and Ram then the F072RB.
 If you want to stick to smaller MCU then take the F091RC, simialar to your board but doubled flash/ram.


问:
differences between SCARA arm design
I am currently interested in SCARA arm designs and I have few, beginner questions for which I didn't find answers yet.

1/ While comparing professional arms (made by epson, staubli...) I noticed that the actuator used for the translation on the Z axis is at the end of the arm. On "hobby" arms like the makerarm project on kickstarter they use a leadscrew with the actuator at the beginning of the arm.
I thought it was smarter to put the actuator handling this DoF at the begining of the arm (because of its weight) and not at the end, but I assume that these companies have more experience than the company behind the makerarm. So I'm probably wrong, but I would like to understand why :)

2/ Also I would like to understand what kind of actuators are used in these arms. The flx.arm (also a kickstarter project) seems to be using stepper motors but they also say they are using closed loop control, so they added an encoder on the stepper motors right?

Wouldn't it be better to not use stepper and, for instance, use DC brushless motors or servos instead ?

3/ I also saw some of these arms using belts for the 2nd Z axis rotation, what is the advantage ? it only allows to put the actuator at the begining of the arm ?

答:
1) Yes, you are correct that moving the actuator closer to the joint increases the arm's capabilities. The reason that some arms do not use this configuration is to keep the robot simple. Adding gears, belts, screws, etc. increases complexity and mass, adds extra friction and backlash, and leads to more wear and tear. Another benefit is that it is much easier to estimate the torque/force at the end-effector/tool if there are fewer mechanisms in-between.

2) Stepper motors are popular because they have position feedback integrated into the motor. They precisely "step" through discrete movements and so you don't need an encoder. Using stepper motors works well for simple applications where the arm needs to follow trajectories while respecting torque limits on the joints. However, if you want to implement more sophisticated compliance and force control methods then DC motors will work much better.

3) The answer to this is the same as 1), and yes, it allows you to move the actuator closer to the joint.

A particularly interesting manipulator is the Barrett WAM arm, which has the first 4 DOF's actuated by motors in the base and using a low-friction cable system to transmit the motion. The optional wrist connector adds another 3 DOF's that were contained in the wrist itself. It is not a SCARA configuration, but still might be of interest to you.

Title: differences between SCARA arm design


答:
So i Upgraded to a STM32F103RGT7.
STLink Recognized the device as a F10X Family!.
I am aware of the architecture change and everything. And yes they are pin compatible. I also saw on STM's website that all the Nucleo board's schematics are the same. And the F072's Board has the Same BoM.

Title: Changing STM32 Nucleo Board's Microcontroller

Body:
I have a STM32F072RB Nucleo Board which has a 64Pin Microcontroller.

For my application I chose the sTM32F103RG which has a bigger RAM size and Flash size too.

Can i Remove an F072R from a Nucleo board put a F103R on top of it?

I am testing my code with a F103C, but the flash and ram size is not meeting my requirement. I have a F072R Nucleo Board lying around so for a quick developmental test could I swap it for the 103R ? The R series is Pin Compatible!

Anyone Has done microcontroller swapping before?


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

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

Thank you in advanced.

答:
It depends on what you want to control, either position or velocity. Generally a PID for the position (angles) is implemented, but in case you would be interested in velocity control you can also find some good materials at the voice 'Velocity PID'.

Regarding the second question, if the loop time is constant, it can be incorporated in the gain, that is:

$k_d$ = $k_d'/T$

So no differences, just a scaling factor.

Title: Need help for a quadcopter PID


问:
Very low output voltage at the output of L298n?
I am using arduino and L298n motor driving IC to drive 4 12V dc motors (150rpm).
Also I am using 11.1V LiPo battery (3cell, 3300 mAh, 20C).I have connected two PWM pins of L298n to digital HIGH from arduino.Battery positive terminal is connected to the 12V input of IC.Battey negative terminal and arduino ground is connected to the ground input of IC.Also a 5V input is given from arduino to IC and ground from arduino is connected to other gnd pin which is adjacent to INT3 pin.Motor1 pins from L298n are connected with two motors (connected parallely on right side of bot) and Motor2 pins are connected with other two motors (connected parallely on left side of bot).Appropriate inputs are given to INT1,INT2,INT3,INT4 to drive the bot in forward direction.But the bot is moving too slowly.The voltage measured across motor1 pins is only 5V.I have connected the battery directly to the motors,then it is running very fast.How to run it fast.Please help.....

答:
Try to digitalwrite a high on your pwm pins, i.e.

```<code>digitalWrite(pwmpin1, HIGH);

digitalWrite(pwmpin2, HIGH);
</code>```

Otherwise, run your motors from an external power supply as they may be requiring a lot of current to run.
Hope this helps :)

Body:
Try to digitalwrite a high on your pwm pins, i.e.

digitalWrite(pwmpin1, HIGH);

digitalWrite(pwmpin2, HIGH);

Otherwise, run your motors from an external power supply as they may be requiring a lot of current to run.
Hope this helps :)


答:
"connected parallely on right side of bot"

Watch out for this - running two motors in parallel from one motor output doesn't always work as you would expect.  If you try the circuit with just one motor connected for each side of the vehicle, does it work better?

Title: Very low output voltage at the output of L298n?

Body:
I am using arduino and L298n motor driving IC to drive 4 12V dc motors (150rpm).
Also I am using 11.1V LiPo battery (3cell, 3300 mAh, 20C).I have connected two PWM pins of L298n to digital HIGH from arduino.Battery positive terminal is connected to the 12V input of IC.Battey negative terminal and arduino ground is connected to the ground input of IC.Also a 5V input is given from arduino to IC and ground from arduino is connected to other gnd pin which is adjacent to INT3 pin.Motor1 pins from L298n are connected with two motors (connected parallely on right side of bot) and Motor2 pins are connected with other two motors (connected parallely on left side of bot).Appropriate inputs are given to INT1,INT2,INT3,INT4 to drive the bot in forward direction.But the bot is moving too slowly.The voltage measured across motor1 pins is only 5V.I have connected the battery directly to the motors,then it is running very fast.How to run it fast.Please help.....


问:
CNCing an injection mold
I want to injection-mold several thousand of a part that fits in a 6" x 6" x 2" bed.

I would like to be able to use only tooling that I can make myself, so I can rapidly iterate on the tooling as production problems are discovered.

I know that typical injection-mold "hard tooling" is created using electrical discharge machining, which requires first CNCing a carbon positive and then using that as an electrode to spark-burn out a negative mold from hard steel.

However, I do not have the equipment for EDM. Instead, I would prefer to directly CNC the negative mold. I know that a soft enough steel to be CNCed will not last very long as an injection mold, but like I said, my run size is tiny, and I am ok with making a new mold every 500 units or so if necessary.

I am open to buying an endmill that is diamond-tipped, to work with harder steel, but then the limitation will probably be how much torque the CNC can produce on the endmill.

What are some recommendations or links to helpful resources? In particular, what is a good CNC with enough torque, and what blend of steel should I use? Thanks!

答:
Answer from my MechE friend Sam who doesn't have an account:

First, I don't think you're going to have trouble with any CNC not
  having enough torque

Second I don't think you'll need diamond tipped. Tungsten carbide max.

I would look into using aluminum I believe it is viable for some
  molding.

And mild steel should definitely hold up. Easier to machine as well.

Title: CNCing an injection mold


问:
6DOF robot arm: Velocity of end effector vs. joint velocities
I have a 6 DOF arm whose velocities I'm controlling as a function of force applied to the end effector. The software for the robot allows me to input either the desired end effector velocity or the desired joint angular velocities, which I know can be found using the inverse Jacobian.

Are there any benefits of using one scheme over the other? Would, for example, one help avoid singularities better? Does one lead to more accurate control than the other does?

答:
In the end, end effector speed is going to be determined by joint speed + kinematics, so I would choose whichever format you want that makes life easier on you.

Regarding singularities, there's no singularity caused by joint velocities, only by joint angular positions. So, if you're trying to avoid singularities but are only controlling based on velocity, then you'll probably need some separate controller or other method to "watch" the trajectory you're on to alter the specific combinations of joint velocities to avoid the singularity.

Regarding accuracy of control, again your end effector is located based on the combination of joint angles, so ultimately your joint angle positioning AND end effector positioning are both determined by your ability to encode, read, and control the joint angles. Again, I would go with whichever method is more convenient for you.


问:
using a device with os instead of microcontrollers
Im working on a robot that needs image processing to analyze data recieves from cameras.

As i searched for ARM and AVR libraries i found that there is no dip library for these micros and their limited ram is hard for image data process. i want to know is there any hardware that connects to a win or android or... devices and make it possible to that device connect to actuators and sensors?

thank you or helping.

答:
First you are right, Imageprocessing is nothing for MCUs. Mostly because of their limited hardware ressources. But it is simply not the task of those thingys. So the reason you use MCU is the control you have over the system. You can use hunderds of different interrupts, you can manipulate all timers, you have DMAs, tons of different peripherals and response times within few microseconds. The complexity and controlability of those chips can be seen by looking at the documentation of those chips. An actual one, eg out of the STM32F7-Series has 3000 pages documentation of software and registers.

If you look at image processing, what you need there? Lot of computation power!!! You need no timers, no DMA, no responses within microseconds.

 So why use MCU for imageprocessing? It's just not there business.
For Imageprocessing you need moderen processors with huge computational power.

The drawback of modern processors you loose all the nice stuff you like about MCUs. So you cannot control something with high frequencies, you have no access to timer registers,not a lot of peripherial things.

 Given this background and the task to solve a problem with sensors, actors and some conputer vision you can solve this taks with following approaches:

Use dedicated I/O Hardware for normal Computer

Let your computer vision and all your control algorithms on your computer and use additional hardware to switch IOs use some buses or whatever you have to do. An example hardware would be phidgets, which work with USB; or a PCI card which is directly connected to your computer's bus system.
This provides the advantage that you only have one system, but your system's realtime capability is not given at all. The OS (Windows or Android) have no realtime capabilities at all. with some tweeks and experience you reach a jitter of 0.5ms. This is basically your idea, you mentioned in the question.

Programm MCUs for vision

Well use MCUs for things they are not made for. If you do not need lot of processing on the images this can be a viable option. Depends on your task and on the setup. Most of the algorithms are available and can be implemented with some time investment. The problem is that your are missing the computational power and the memory. So you are limited in computations per timeframe.

Apply a distributed controller concept

Take the best of both worlds. Let the MCU and the computer with decent CPU,Memory and OS what they were designed for. The only problem is communication between those modules. But there are solutions, from serial (USB) over TCP/IP(Ethernet) or even SPI. It's just you need to figure out, what are the requirements and what fits them best.

Use a system which combines the best out of each world

There are not a lot modules which are made for such applications but in the time of early development for the IoT there are some. In my personal opinion the best module is the Beaglebone Black. It has some high performance ARM core out of there cortex A series and a DSP coprocessor for the high responsiveness and low jitter. On this DSP you do not have all features you can access on a normal MCU but it maybe sufficent.

As conclusion the distributed controller is the most sophisticated and can be adjusted to meet almost any need. The other methods depend a lot on the requirements. They might be enought or maybe not. For some "I want to try something quick and dirty and i do not care about performance" use some phidgets, they are relatively cheap and are pretty easy to make them work.


问:
How do I interpret this data, received by the I2C controller on an NXT 2 brick?
I have been trying to write code to connect a HiTechnic prototype board to my lego brick. Although I am using MSRDS studio, that isn't the issue; reading and writing to the serial port that the device is connected to works fine.

Where I am lacking is that I don't understand the data is that is being sent and received. It goes out and comes back in the form of a byte array. For example:
[128]
[15]
[0]
[2]
[16]
[2]
[8]

Is this byte array converted from hex? What is this response telling me?

Obviously I am a total newbie at this, I can program but I don't really understand electronics and I am trying to make that connection between what I have read about how an I2C controller works and what is happening when I send and receive data over a serial port.

答:
Your question is not clear. "Is this byte array converted from hex?"  If you know what the values are, you should know how you got them. 128 is not a hex number, it is the same as a hex 80, also written as 0x80.  It indicates a 'Direct command, reply not required' as a serial to NXT stream. 15 = 0x0F = LSWRITE.

It does not make sense to decode any more, as it is your program but you have not told us what you are trying to do and how you are trying to do it.

Just to be clear, there is NO connection between the serial port (usb or bluetooth) and the i2c bus. But the LSWRITE/LSREAD would be the appropriate direct commands (I was wrong earlier, had to look at it some more). I would suggest starting on just the NXT using NXC or LeJOS or RobotC and getting an understanding of the I2C protocol before trying to extend that to a remote PC connection with MRDS.

Start here And download all the PDFs. They describe the command that can be sent over the PC to NXT serial link.

I2C is another step. Start with the Wiki. But you will find that LEGO vendors often do not completely implement the protocol, or they implement it incorrectly. You pretty much need to analyse each device and adjust how you treat it.

I would suggest something like the Saleae logic to analyse what is actually happening.


问:
Solving for DH Parameters
Given three sets of joint angles in which the end effector is in the same position, is it possible to find the DH parameters?

If the robot has 2 DOF in shoulder, 2 DOF in elbow, and 1 dof in wrist, with DH parameters as upper arm length, elbow offset in 1 axis, lower arm length, can this be solved, if so how?

I tried iterating through DH parameters to minimize position of end effector with forward kinematics, but this doesnt seem to work as DH parameters of 0 for everything makes 0 minimal distance.

Reason for this; given a physical robot, no DH parameters are known, and measuring by hand is not accurate.

答:
For a 5-DOF manipulator you will have 15 DH parameters. Three sets of joint angles will yield 9 equations, so that will not be enough to determine the parameters. And this is assuming you know the end-effector position, whereas if you are simply trying to use the constraint that all three positions are equal then you will have even fewer equations to work with.

You should be able to estimate the $\alpha$ parameters simply by inspecting the robot -- hopefully they are all 0 deg or $\pm$90 deg.

If you are measuring the end-effector position then you can simply set up as many test points as are necessary to get all of the parameters. This can be done strategically to simplify the process. Start with the outermost link, rotate that joint only, and look at how the end-effector position changes, then you can determine that link's parameters. Then move to the next link and repeat.

Alternatively, you can use the forward kinematics in a differential form as would be used to determine end-effector velocity, $\dot{p}$, in terms of joint angle velocities, $\dot{\theta}$, based on the Jacobian, $J$.

$\dot{p} = J \dot{\theta}$

Consider this relationship in terms of differences in end-effector position related to differences in joint angles:

$\Delta p = J \Delta \theta$

The above relationship can then be used to solve for the DH parameters given a series of measured $\Delta p$ and $\Delta \theta$ values using a non-linear least-squares solution.

Title: Solving for DH Parameters


问:
Cannot command irobot create 2
This might be a dumb question. I have started to play with this robot with raspberry pi two days ago. I did some simple stuff, like- move around and sensor reading etc. But since yesterday night, It seems like I cannot send any command. The built in clean, dock functions are working perfectly but I cannot do anything using the same python code that I already used before. Its behaving like nothing is going through the Rx.

Can you suggest what might go wrong? Thanks

答:
It's possible that you may have switched the baud rate at some point. Try resetting the robot (press dock and spot at the same time for ~10 seconds, or take the battery out and put it back in).

This will cause the baud rate to go back to the default 115,200

Title: Cannot command irobot create 2


问:
can we detects animals through PIR(passive infrared sensors)
as i dont know that what kind of radiation animals emit. as humans emit IR radiations so PIR sensors help to identify humans. pls suggest me if someone have knowledge about sensors which detects animals.</p>

答:
Warm blooded mammals and birds should be similar to humans as far as these sensors are concerned, amphibians and reptiles probably not.

Here are some thermal signatures from sensors that are more sophisticated, but in any case should give you an idea of the difference in body temperature from the ambient background temperature, of some parakeets vs a lizard.


问:
Denavit Hartenberg parameters
Can anybody help figure out HD parameters for the case where two links with a revolute joint are in the same plane, thus that the variable angle is 0, but the twist is not 0. This is a simple drawing. I think that x-axis that is perpendicular to both z-axis, points away and goes through the intercection of z-axis. The link length is 0, the twist is a and the offset is d. Whould it be correct?
Thanks.

答:
You can use dummy transformations when the DH parameterization cannot get you from one axis to the other. Think of it as two succesive DH transformations where the first one does not have a moving joint. It is just there to get to the other joint the the second DH transformation

EDIT:

to complete the answer with reference:

http://petercorke.com/doc/rtb_dh.pdf

If your previous Z axis is not intersecting the next X axis and/or they are not perpendicular, you will not be able to use one DH transformation matrix from one coordiante system to the other

Title: Denavit Hartenberg parameters


问:
Is it possible to make Kite flying robot?
This question was asked in electronics stackexchange. I want to know if is it possible to make a robot that can fly kites. Is this idea practical? I was thinking that making a kite is just like making some flying quadcopter or helicopter. I just want to know is this idea really implementable?  Is there an example or similar work in reference to this?     </p>

答:
Feso has one, you can use it for inspiration

https://www.festo.com/net/SupportPortal/Files/42084/CyberKite_en.pdf


问:
What is inverse depth (in odometry) and why would I use it?
Reading some papers about visual odometry, many use inverse depth. Is it only the mathematical inverse of the depth (meaning 1/d) or does it represent something else. And what are the advantages of using it?</p>

答:
Davison's paper introducing the method is easy enough to understand:

Inverse Depth Parametrization for Monocular SLAM by Javier Civera, Andrew J. Davison, and J. M. Martınez Montiel DOI: 10.1109/TRO.2008.2003276


问:
Forward Kinematics/D-H parameters for perpendicular joint axes
I am trying to compute forward kinematics of the Kuka youBot using DH convention:

http://www.youbot-store.com/youbot-developers/software/simulation/kuka-youbot-kinematics-dynamics-and-3d-model

The arm joint 1 and arm joint 5 are revolute and rotate about the world z-axis (pointing to the sky)

But the other 3 joints are all revolute and rotate about x-axis, let's say (points horizontally)

DH convention says the "joint distance" is along the "common normal". But unless I am mistaken, the only common normal is the y-axis, and that is also horizontal, meaning there is no joint distance.

I was thinking I would use link offset for joint1 - joint2, but then I ran into a problem with joint4 - joint5. Link offset is supposed to be along the previous z-axis, and in that case it would point horizontally out to nowhere. But link distance STILL doesn't work either, because that is the common normal distance, and as established the common normal is x-axis, also horizontal. So now I feel very screwed. I am sure there is a simple solution but I can't see it.

So I guess the question is, how do I use the DH convention for the links between 1-2 and 4-5, when the joint rotational axes are perpendicular?

答:
You can find a lot of material on the DH convention. If you are only interested in the youBot, then check thes out:

http://www.kuka-robotics.com/NR/rdonlyres/5E66A5D6-F30F-46BE-B9CF-6820C55FCE91/0/Armtutorial2.pdf

Sorry if this is the same what you alredy have, but the link you specified is broken...