问:
How to manipulate the magnetic field around a robot?
Nanorobotics can be realized with a combination of a magnetic field and a passive robot. The robot is equal to a tweezer which is controlled by an external field. This field is generated by electromagnetic coils. Even the topic is described in the literature since the 2000s, it is hard to understand how such a system works exactly. My question is: what kind of coil is needed to generate a vector field which drives the robot? As far as i know from the physics course, a normal coil can either be on or off, but how to change the direction of the field?</p>

答:
The magnetic field is proportional to the current. A fixed geometry coil can generate a field that is positive or negative or zero based on how much current is driven through the coil and which direction the current goes. This is limited by how heat is removed from the system.

The exact shape of the field can be influenced using a magnetic circuit to guide the magnetic field.

Magnetic fields combine so two coils can create a combined field that is any combination (sum) of the individual fields. Add as many coils as you want.

Other types of control can be done by rapidly switching fields (perhaps just a single field) on and off rapidly. This is what is done for the magnetic levitation desk toys.

There are other things that can be done by using the magnetic field to transmit power, or combining mechanical or fluid dynamic effects on the motion of the nano-robot with the magnetic effect.


答:
AC motors operate by generating a vector field. The field on the stator rotates, and the rotating field interacts with the field on the rotor (generated, or permanent magnets, or induced) to move the rotor.

The motor fields rotate by varying the current applied to the stator windings because magnetic field strength is proportional to current. The orientation of the coil/winding determines the direction of the field, and then the applied current essentially determines the magnitude along that axis.

ContentLicense: CC BY-SA 4.0

Title: How to manipulate the magnetic field around a robot?

Body: Nanorobotics can be realized with a combination of a magnetic field and a passive robot. The robot is equal to a tweezer which is controlled by an external field. This field is generated by electromagnetic coils. Even the topic is described in the literature since the 2000s, it is hard to understand how such a system works exactly. My question is: what kind of coil is needed to generate a vector field which drives the robot? As far as i know from the physics course, a normal coil can either be on or off, but how to change the direction of the field?</p>


问:
Missing links in Create 2 documentation
The latest edition of Servo Magazine clued me to the existence of the Create2.

So one is now on the way and I've begun downloading the documentation. The problem is that the doc's which are dated 2014 are full of referrals to other documents but those links are broken or non-existent.

iRobot appears to continue supporting STEM and Create2, so how does one find the missing files?

答:
I'm not sure what you're looking for. If I go to the Create2 page, there is a button that says, "Get Started" that takes me to a page that gives the Open Interface Specification, dated July 19, 2018.

If you click the link for "More..." under the Create 2 Projects heading, it takes you to a list of other projects, including Arduino and RaspberryPi tutorials, a battery power tutorial, as well as cable pinout diagram, chassis screw location diagram, and a host of other documents pertaining to different communication protocols.

Title: Missing links in Create 2 documentation


问:
Discontinuities in IMU data in pitch only
I am having a problem with pitch measurements with Bosch BNO055 IMU. The device is rotated on a relatively stable rotating spindle and does a revolution on a circle around 10cm radius. It is upright in the current placement. Attached is my signal when I do harmonic oscillations on an arc of around 90 degrees.

The estimates I am getting are from the internal Kalman filter. We are using the sensor with RTIMULib and this test code:https://github.com/RPi-Distro/RTIMULib/blob/master/Linux/python/tests/Fusion.py

As far as I know, no preparations were done, including calibration.

I get very unusual discontinuities in pitch that do not look like warping at all. There are quite a few phenomena, like:

It doesn't seem symmetrical, the signal is not the same at the same point in both directions, which can be seen by asymmetrical peaks.

The jumps are sometimes from a to pi-a or -pi-a, but sometimes to a completely random value.

When the rotating plane is not horizontal, pitch stays small in some parts of the arc, while it changes rapidly in some other parts.

Can this be caused by the problematic orientation?
Can this be "expected" in any scenario?

答:
:EDIT:

Since the data is coming directly from the IMU itself, I would double check the startup parameters for the device and consider resetting it also. The datasheet gives information on selecting the style of fused data that is used (page 21), which is especially noteworthy as the data may be given as a relative orientation (relative to startup orientation) or absolute orientation (relative to the local/Earth magnetic field).

The output angles are selectable between degrees and radians, so I had briefly considered maybe you had set the unit to "relative orientation" and the output units to "radians" and then spun it on a turntable for a while. This might have caused the output angle to accumulate up to 145 radians, but in reviewing the datasheet it states the output angles are clamped to +/- 180 degrees for pitch, +/- 90 degrees for roll, and 0-360 degrees for yaw (page 30).

I would double check the initial configuration settings on the unit to be sure that what you think you're getting is what you're actually getting.

:Original post:

It looks like maybe you've got accelerometer data feeding into your angle estimate, which isn't necessarily bad, but I've seen some bad code out there for "converting" an accelerometer reading to an orientation. There are some solutions that work, but they're all based on this application note that gives "the absence of linear acceleration" as a precondition for using accelerometer output for estimating roll and pitch. If the sensor is traversing an arc then it is experiencing a linear acceleration.

Accelerometer output can't estimate yaw (heading) because the gravity axis is aligned with the yaw axis, so there is no projection of gravity to the yaw axis and thus there's nothing to measure.


问:
Calculate torque required to rotate and hold a platform
I wish to rotate a rectangular platform about its length. It is attached to a shaft that runs through the length of the platform at width/2. How can I compute the torque of the motor required to rotate and hold this platform. The platform has uniformly distributed weight on it. I want to rotate it upto 45 degrees only. I am not entirely sure if I should go fo a high torque DC motor or a stepper motor.</p>

答:
I have a hard time picturing your setup, but let us think about what torque is... the units can be foot X lbs or inch X lbs or N X M. The point is torque is weight multiplied by a distance. If your setup is super fancy then you will have to get into vectors; but if you simply have a platform at some distance from a shaft, here is how I would go about it:

weigh the platform, or at the very least get a ballpark weight.

measure the distance from the shaft to the wight

These two basic measurements should give you the torque value. Some other considerations are:

is your motor connected to the shaft through gearing? if you add gears (which you will need to do to transfer the power from the motor to the shaft) you might as well gear it to be able to get a smaller (cheaper/more common) motor.

You can buy motors from ebay that are already coupled to a gearbox, that will allow you to make crazy torque. Search for "right angle gear" on ebay, for ex: https://www.ebay.com/itm/DC-24V-50Rpm-Electric-Gear-Motor-Right-Angle-Reversible-High-Torque-for-DIY/172563602882?hash=item282d979dc2:g:FvkAAOSwGG5aJjUR

if you are holding the platform, a worm gearbox will hold the weight without the motor needing to eat power.

There are other things on my mind, like starting torque vs. running torque, vectors, gearing, footprint, and more, but I feel like I'm going off on a tangent. I keep doing that.

Good luck with your project.


问:
Path Planning code
I posted a question regarding robot path planning here now the question is mainly about the code and logic but still I shortly explain the initial situation.

So I tried to change the code so that the program is gonna work for my problem. My goal is to get my robot which is an Arlo robot to reach predefined points with the help of a beacon(A) and the plt 300 which is following the beacon with a laser. So that the beacon is right above the predefined point.

I decided to use the mathematical convention. So in the picture the coordinates of the point A would be:

A_x = M_x + cos(θ + 24)*r

A_y = M_y + sin(θ + 24)*r

Now I just want to know if the code would theoratically work or not.

Edit

I declared missing variables, fixed the float to binary operator error. Changed the code like Chuck suggested, changed destinationHeading not sure if it right.

```<code>//Here is the code
  #include <ArloRobot.h>
  #include <NewPing.h>
  #include <Servo.h>

 // Arlo and serial objects required
 ArloRobot Arlo;                               // Arlo object
 SoftwareSerial ArloSerial(12, 13);            // Serial in I/O 12, out I/O 13

 int countsLeft, countsRight;                  // Encoder counting variables

 //current points
 float xc = -300;
 float yc = 300;

 //target points

 float xt = -300;
 float yt = -300;

 //turning  angle
 float turnAngle;

 float startingHeading = 0;
 float beaconHeading = 24;
 float destinationHeading = 0;
 float effectiveHeading = startingHeading + beaconHeading;
 float currentHeading = startingHeading;
 float r = 12;

 float xm = 0;
 float ym = 0;

 float xn = 0;
 float yn = 0;

 float turnRight = 1;
 float turnLeft = -1;
 float wheelBase = 39.5;
 float tireRadius = 7;
 float speedModifier = 0;
 float vRightMotor = 0;
 float vLeftMotor = 0;
 float vMotor = 0;
 float theta = 0;
 float thetaDot = 0;
 float dT = 0.00104;
 float distance = 0;

 void setup() {
 // pin setup
 Serial.begin(9600);
 ArloSerial.begin(19200);                    // Start DHB-10 serial com
 Arlo.begin(ArloSerial);                     // Pass to Arlo object
 Arlo.clearCounts();                         // Clear encoder counts
 }

 void loop() {
 xm = xc - (cos(startingHeading + beaconHeading) * r);
 ym = yc - (sin(startingHeading + beaconHeading) * r);

 xn = xt - (cos(startingHeading + beaconHeading) * r);
 yn = yt - (sin(startingHeading + beaconHeading) * r);
 destinationHeading = atan2((yn - ym), (xn - xm))- startingHeading;
 //calculate turning angle
 destinationHeading = destinationHeading * 180 / 3.1415; //convert to degrees
 turnAngle = destinationHeading - currentHeading;

 if (turnAngle > 180)
 {
 turnAngle = turnAngle - 360;
 }

 if (turnAngle < -180)
 {
 turnAngle = turnAngle + 360;
 }

 if (turnAngle < 0)
 {
 speedModifier = turnRight;
 }

 if (turnAngle > 0)
 {
 speedModifier = turnLeft;
 }

 theta = 0;
 while(abs(abs(theta) - abs(turnAngle)) > 0)
 {

 vRightMotor = speedModifier * 50;
 vLeftMotor = -speedModifier * 50;
 vMotor = vRightMotor;
 thetaDot = (tireRadius * vMotor) / (wheelBase / 2);
 theta = theta + thetaDot * dT;
 }

 currentHeading = destinationHeading;
 distance = sqrt(((xn - xm)* (xn - xm)) + ((yn - ym) * ( yn-ym)));
 if (distance > 0)
 {
 Arlo.writeSpeeds(72, 72);                 // Go forward 72 counts/sec
 }
 xm = xn;
 ym = yn;

 }
</code>```

The main code is from the answer of this question here

答:
What you have implemented in the sourcecode is called steering behavior and was introduced by Craig Reynolds in the year 1999 in the paper Steering behaviors for autonomous characters The idea is to use a locomotion model (which is given in your sourcecode too and then calculate the angle of the car like robot. Implementing steering behavior in software is a bit tricky. As far as i can see from your previous postings, you are working hard on the subject. Mostly, the prototype doesn't work in the first trial and then reprogramming is needed (I'm talking with experience, my own steering project was a mess).

For reasons of simplification I can recommend to use a object oriented programming language. Your code right now was probably written in C. If this could be extended into the directions of structs and Python classes it is easier to modify. If the project is to complicated, it is a good idea to simplify the task first. This is possible by not controlling the robot autonomously, but the software is painting only the line from the robot to the goal and a human operator has to steer to the goal manually. This kind of setup is called in the literature a “head up display”. It is easier to program than a full blown steering control.

Title: Path Planning code


答:
I think your problem revolves around the line:

```<code>float currentHeading = startingHeading + beaconHeading;
</code>```

The beacon heading has nothing to do with the current heading of the robot. Instead, your current heading should just be initialized to the starting heading:

```<code>float currentHeading = startingHeading;
</code>```

The only time that the beacon heading comes into play is when you update your robot's position by taking a measurement of the beacon.

I don't see a beacon/position update section anywhere in your code, so right now it looks like the whole thing is running open loop. If that's the case, then you don't need the beacon angle offset anywhere.

If you do decide to incorporate a beacon position measurement somewhere in your code, then you would update your heading with the code I provided at the end of the other question:

$$
M_x = A_x - \sin{(\theta_{\mbox{heading}} + \theta_{\mbox{beacon offset}})}*r \\
M_y = A_y - \cos{(\theta_{\mbox{heading}} + \theta_{\mbox{beacon offset}})}*r \\
$$

But again, this requires you to measure $<A_x, A_y>$. If you don't measure the beacon, you can omit the beacon offset angle altogether.

:EDIT:

If you want to put the beacon on the target, consider the following graphic:

The robot faces in some direction and there's a target. In order to get the beacon on the target, you would want to end up like this:

That is, you want the robot to drive not quite the direct heading to the target. You want to modify the "target" heading by some amount in order to be able to end with the beacon on the target.

So, how much do you need to adjust your robot center $M$ to target heading in order to achieve the beacon $A$ to target heading? That depends on how far away the robot center is right now ($r$, the red line) and how far away the beacon is from the robot center ($dy$, in blue, and $dx$, in light orange.)

So now, if your heading is described as an angle that increases positive CCW from the +x-axis, you can calculate the naive heading (red) as $atan2(\mbox{target}_y - M_y, \mbox{target}_x - M_x)$, and then you can see that the heading offset to get the beacon at the target is $asin(dy/r)$.

Finally, the new distance you need to travel, $dS$, then length of the orange line, is $cos(\theta_{\mbox{heading offset}})*|r| - dx$. The length of $r$, $|r|$, is found with the Pythagorean Theorem $\sqrt{\left(\mbox{target}_x - M_x \right)^2 + \left(\mbox{target}_y - M_y \right)^2}$.

Title: Path Planning code

Body:
I posted a question regarding robot path planning here now the question is mainly about the code and logic but still I shortly explain the initial situation.

So I tried to change the code so that the program is gonna work for my problem. My goal is to get my robot which is an Arlo robot to reach predefined points with the help of a beacon(A) and the plt 300 which is following the beacon with a laser. So that the beacon is right above the predefined point.

I decided to use the mathematical convention. So in the picture the coordinates of the point A would be:

A_x = M_x + cos(θ + 24)*r

A_y = M_y + sin(θ + 24)*r

Now I just want to know if the code would theoratically work or not.

Edit

I declared missing variables, fixed the float to binary operator error. Changed the code like Chuck suggested, changed destinationHeading not sure if it right.

```<code>//Here is the code
  #include <ArloRobot.h>
  #include <NewPing.h>
  #include <Servo.h>

 // Arlo and serial objects required
 ArloRobot Arlo;                               // Arlo object
 SoftwareSerial ArloSerial(12, 13);            // Serial in I/O 12, out I/O 13

 int countsLeft, countsRight;                  // Encoder counting variables

 //current points
 float xc = -300;
 float yc = 300;

 //target points

 float xt = -300;
 float yt = -300;

 //turning  angle
 float turnAngle;

 float startingHeading = 0;
 float beaconHeading = 24;
 float destinationHeading = 0;
 float effectiveHeading = startingHeading + beaconHeading;
 float currentHeading = startingHeading;
 float r = 12;

 float xm = 0;
 float ym = 0;

 float xn = 0;
 float yn = 0;

 float turnRight = 1;
 float turnLeft = -1;
 float wheelBase = 39.5;
 float tireRadius = 7;
 float speedModifier = 0;
 float vRightMotor = 0;
 float vLeftMotor = 0;
 float vMotor = 0;
 float theta = 0;
 float thetaDot = 0;
 float dT = 0.00104;
 float distance = 0;

 void setup() {
 // pin setup
 Serial.begin(9600);
 ArloSerial.begin(19200);                    // Start DHB-10 serial com
 Arlo.begin(ArloSerial);                     // Pass to Arlo object
 Arlo.clearCounts();                         // Clear encoder counts
 }

 void loop() {
 xm = xc - (cos(startingHeading + beaconHeading) * r);
 ym = yc - (sin(startingHeading + beaconHeading) * r);

 xn = xt - (cos(startingHeading + beaconHeading) * r);
 yn = yt - (sin(startingHeading + beaconHeading) * r);
 destinationHeading = atan2((yn - ym), (xn - xm))- startingHeading;
 //calculate turning angle
 destinationHeading = destinationHeading * 180 / 3.1415; //convert to degrees
 turnAngle = destinationHeading - currentHeading;

 if (turnAngle > 180)
 {
 turnAngle = turnAngle - 360;
 }

 if (turnAngle < -180)
 {
 turnAngle = turnAngle + 360;
 }

 if (turnAngle < 0)
 {
 speedModifier = turnRight;
 }

 if (turnAngle > 0)
 {
 speedModifier = turnLeft;
 }

 theta = 0;
 while(abs(abs(theta) - abs(turnAngle)) > 0)
 {

 vRightMotor = speedModifier * 50;
 vLeftMotor = -speedModifier * 50;
 vMotor = vRightMotor;
 thetaDot = (tireRadius * vMotor) / (wheelBase / 2);
 theta = theta + thetaDot * dT;
 }

 currentHeading = destinationHeading;
 distance = sqrt(((xn - xm)* (xn - xm)) + ((yn - ym) * ( yn-ym)));
 if (distance > 0)
 {
 Arlo.writeSpeeds(72, 72);                 // Go forward 72 counts/sec
 }
 xm = xn;
 ym = yn;

 }
</code>```

The main code is from the answer of this question here

Body:
I think your problem revolves around the line:

float currentHeading = startingHeading + beaconHeading;

The beacon heading has nothing to do with the current heading of the robot. Instead, your current heading should just be initialized to the starting heading:

float currentHeading = startingHeading;

The only time that the beacon heading comes into play is when you update your robot's position by taking a measurement of the beacon.

I don't see a beacon/position update section anywhere in your code, so right now it looks like the whole thing is running open loop. If that's the case, then you don't need the beacon angle offset anywhere.

If you do decide to incorporate a beacon position measurement somewhere in your code, then you would update your heading with the code I provided at the end of the other question:

$$
M_x = A_x - \sin{(\theta_{\mbox{heading}} + \theta_{\mbox{beacon offset}})}*r \\
M_y = A_y - \cos{(\theta_{\mbox{heading}} + \theta_{\mbox{beacon offset}})}*r \\
$$

But again, this requires you to measure $<A_x, A_y>$. If you don't measure the beacon, you can omit the beacon offset angle altogether.

:EDIT:

If you want to put the beacon on the target, consider the following graphic:

The robot faces in some direction and there's a target. In order to get the beacon on the target, you would want to end up like this:

That is, you want the robot to drive not quite the direct heading to the target. You want to modify the "target" heading by some amount in order to be able to end with the beacon on the target.

So, how much do you need to adjust your robot center $M$ to target heading in order to achieve the beacon $A$ to target heading? That depends on how far away the robot center is right now ($r$, the red line) and how far away the beacon is from the robot center ($dy$, in blue, and $dx$, in light orange.)

So now, if your heading is described as an angle that increases positive CCW from the +x-axis, you can calculate the naive heading (red) as $atan2(\mbox{target}_y - M_y, \mbox{target}_x - M_x)$, and then you can see that the heading offset to get the beacon at the target is $asin(dy/r)$.

Finally, the new distance you need to travel, $dS$, then length of the orange line, is $cos(\theta_{\mbox{heading offset}})*|r| - dx$. The length of $r$, $|r|$, is found with the Pythagorean Theorem $\sqrt{\left(\mbox{target}_x - M_x \right)^2 + \left(\mbox{target}_y - M_y \right)^2}$.


问:
How to speed up robotic arm?
I need  my robotic arm to ring a desk bell. I one on the maplins site  usb robotic arm.

It does seem very slow.  What can I hack on it to boost the downwards and upwards speed. I need it hit the bell tip/platform quickly once or twice.

This is purely a LOL project for work. Ever time we get an order we want the arm to ring the bell. :)

-EDIT

This is the gearbox assembly - And it much much to slow - What can i change in here to speed up one gearbox by at least 4 times?

The grabber gearbox is different though. The gear marker P7 is white and seems to move the grabbers at a faster speed.

答:
Since the website for the arm doesn't provide useful technical specs. you will have to do some investigating yourself to figure out how to boost the speed. Some knowledge of electronics knowledge is required and it may not be a simple change.

The first thing to do would be to find out what is currently bottle-necking the speed.
It could be due to

the motors themselves (underated for the performance that you want)

current limiting circuitry on the control board (eg. low current voltage regulators)

current limiting power supply (eg. low current wall adapter)

The software that controls the arm

You can investigate by using a digital multimeter to measure the current at different parts of the control board to see where the bottleneck is. Doing a google search for the part(s) where the bottleneck occurs can get you more information so that you could buy a higher power version that will perform the same tasks. For example, swapping out a 5V 1A DC voltage regulator for a 5V 10A regulator.

If the motors are the bottleneck then you can just try and replace them with higher rated motors.

ContentLicense: CC BY-SA 3.0

Title: How to speed up robotic arm?


问:
DJI E310 Thrust Coefficient
I am reading Denis M. Filatov et al.'s paper "Parameters identification of thrust generation subsystem for small unmanned aerial vehicles" (https://www.semanticscholar.org/paper/Parameters-identification-of-thrust-generation-for-Filatov-Friedrich/9ec916f9907810e41368f1ac2a6885a0bf2c2ee4). I need to use their characterization data of the DJI E310 motors for my undergraduate research project dealing with a quadcopter. In Table I, their unit for torque is "mH m". I assumed that this was a typographical error since the symbol H represents the SI unit for inductance and that the authors meant "mN m".

With this assumption, I then took the torque-to-force ratio of their first data point in $\frac{N\cdot m}{N}$ and got $1.6\times10^{-03}$. The ratio that Mark W. Mueller et al. found in their paper "Stability and control of a quadrocopter despite the complete loss of one, two, or three propellers" (https://flyingmachinearena.org/wp-content/publications/2014/mueIEEE14.pdf) was $1.69\times10^{-2}$. This is more than ten times higher than from the ratio I computed in Filatov et al.'s data. I simulated a quadcopter using the same DJI E310 420s motors and F450 body frame that Filatov et al. used. The minimum settling time for the yaw PID control turned out to be $30s$ which is absurdly way too long compared with the settling time I observe in experience which is usually within $5s$. Did the authors mean "N m" or anything else? My analysis tells me that "mN m" would make their torque readings too low compared with what standard quadcopters using DJI E310 and DJI F450 would give. I tried emailing the authors to clarify this but I got no response. I hope someone with experience or who knows the answer can help me on this.

答: I found a new paper titled "Quadrotor Parameters Identification and Control System Design" (https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7910684) by the same authors published on the same year, presumably using the same quadcopter platform. They provided formulas relating torque in Newton-meters and PWM percentage from 0 to 100. The results in "Parameters identification of thrust generation subsystem for small unmanned aerial vehicles", using "mN m" or milliNewton-meter as a unit for the torque instead of the typographical error "mH m", match with their formulas in "Quadrotor Parameters Identification and Control System Design".</p>

Title: DJI E310 Thrust Coefficient


问:
Alternate perspective other than probabilistic perspective to implement slam
I am bother on some line which is written is Probabilistic Robotics book  by Dr.Sebestian Thrun From a probabilistic perspective, there are two main forms of the SLAM problem,which are both of equal practical importance. One is known as the online SLAM problem: and offline SLAM problem

I want to know that Is there any other perspective of slam? Because the author write that from a probabilistic perspective. If there any other perspective of slam please let me know.

Thank you

答: SLAM algorithms are generally application-specific implementations of the extended Kalman filter (EKF), in my opinion.  Because EKF relies on probabilistic estimates of model states given noisy data, I don’t know how to understand SLAM without also understanding the probabilistic underpinnings of EKF.   You might benefit from studying various presentations of EKF to see if any of those treatments describe the concepts with less reliance on the statistical framework. </p>


答:
You might be able to speed up the arm's movement in a purely mechanical way -- non-invasively.

For example, you could extend the arm and use the rotation of the base to ring the bell.  Or, you could coordinate the movements of all the joints to make the gripper pass the bell at a maximum speed.

Another way to do it could be to have the gripper pick up a long rod and use that to ring the bell.

Title: How to speed up robotic arm?

Body:
I need  my robotic arm to ring a desk bell. I one on the maplins site  usb robotic arm.

It does seem very slow.  What can I hack on it to boost the downwards and upwards speed. I need it hit the bell tip/platform quickly once or twice.

This is purely a LOL project for work. Ever time we get an order we want the arm to ring the bell. :)

-EDIT

This is the gearbox assembly - And it much much to slow - What can i change in here to speed up one gearbox by at least 4 times?

The grabber gearbox is different though. The gear marker P7 is white and seems to move the grabbers at a faster speed.


问:
Monobrick Communication Library-reading nxt sensors
In my program, I'm need to detect if the NXT touch sensor is pressed.

```<code>var nxt = new Brick<Sensor, Sensor, Sensor, Sensor>("usb");
nxt.Connection.Open();
nxt.Sensor1 = new TouchSensor();
nxt.Sensor1.Reset(false);
nxt.Sensor1.Initialize();
Console.WriteLine(nxt.Sensor1);
</code>```

When I start the program, the sensor value always reads 0. But I discovered that if I go into the "View" menu in the NXT and see the touch sensor value, the program value reads 1. I can't do that for my setup. Also, I can't use Bluetooth; my computer doesn't have it. Can someone help me?

EDIT: my full code

```<code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MonoBrick.NXT;
using MonoBrick;
using System.Windows.Forms;
using System.Reflection;
using System.Threading;

namespace MonoBrick
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            try
            {
                var nxt = new Brick<Sensor, Sensor, Sensor, Sensor>("usb");
                nxt.Connection.Open();
                nxt.Sensor1 = new TouchSensor();
                nxt.Sensor1.Reset(false);
                nxt.Sensor1.Initialize();
                Console.WriteLine(nxt.Sensor1.ReadAsString());
                nxt.Beep(500);
                System.Windows.Application application = new System.Windows.Application();
                application.Run(new Window1());
                nxt.Connection.Close();
            }

            catch (Exception e)
            {
                Console.WriteLine("Error: " + e.Message);
                Console.WriteLine("Press any key to end...");
                Console.ReadKey();
            }
        }
    }
}
</code>```

答:
For some reason MonoBrick is not able to force the NXT to configure the sensor, or it should be done in some other way, which I do not know of.

However, your program works, if you go to the "View" menu on NXT brick and select Touch sensor on Port1. NXT will be showing the value from the sensor, and your program as well.

Likewise, if you write a program for NXT in NXT-G for instance that will use a sensor read block to read value from touch sensor on Port1 first (and then do whatever else...), then your program will also read the value of the sensor, while the NXT program keeps running.

At least this is the way it worked for me.


问:
What limits the observer eigenvalues size?
IIUC, the recommendation here of increasing the absolute size of the real part of observer eigenvalues is based on two factors:

We want the observer to be updated as fast as possible (I suppose up to the point where it's so much faster than the controller that any further improvement of its update speed is pointless).

There's no saturation problem since it's all in software.

What then prevents us from increasing observer eigenvalues without limit, i.e., driving them towards minus infinity?

答:
Consider the state space controls equations:

$$
u = -K\hat{x} \\
\dot{\hat{x}} = A\hat{x} + Bu + L\left(y - c\hat{x}\right) \\
$$

The observer gain $L$ is essentially a measurement filter gain, where the observer is a "smart filter" in that it has the capability to predict (via $\hat{x}$) what the measurement should be.

If your observer gain $L$ is very large then your state estimate should converge faster, but you also can begin to feed all of your measurement noise through to your controller.

If your state estimate becomes too noisy and/or your state estimates change too quickly, then you begin to run the risk that your control signal $u$ will change so quickly that your plant/actuator can't keep up. This is called saturation.

This is a dangerous situation (from a controls perspective) because saturation causes your state estimate to diverge. Rewriting the controls equations:

$$
\dot{\hat{x}} = A\hat{x} + Bu + L\left(y - c\hat{x}\right) \\
$$

You can see that the control action $u$ will directly impact how your state estimates update. If your actuators aren't capable of keeping up with your control signal then you wind up "over reporting" the control action $u$ to your state estimator. This causes your state estimates to change more than they actually are, which can cause your observer to diverge because it is based on the difference between the measured output $y$ and the state estimate $x$.

The tl;dr here is that, even though observers are a software construct, they drive the plant on the basis that your control signal is driven by the observer output. Setting observer poles too "fast" results in actuator saturation because the plant/actuators can't keep up with the changes in the state estimates.

If you need more of an explanation then please let me know where you're unclear and I can try to add an edit. Hopefully this is enough.


问:
Why we want to write all linear system into form of first order differential equations?
It seems to be taken granted that when we deal with some control system, the first thing we want to do is to linearize the system and put it in form of first order differential equations like $\dot x = Ax + Bu$.

But why do we want to do this? And most importantly, why it is always first order? Why we don't want to write the dynamics like $\ddot x = A\dot x + Bx + Cu$?

答:
Using the first order differential equations allows you to have unique state variables in x in . This prevents redundancy that would otherwise exists if it were to be written in higher order differential equations.

Imagine having it written in 2nd order differential equations.  It would have this form: .  If it was represented in this form, there will be a redundancy in how each of the state equation is expressed in terms of the state variables.


问:
Is it possible for a CC-turn trajectory to not touch the inner circle?
I'm currently struggling with understanding how a continuous-curve path can be constructed in a specific context: A vehicle is supposed to do an 180 degree turn at the end of an agricultural field. Since the minimum turning radius is usually high, the so called omega-turn can be applied. An omega turn is an LRL/RLR-turn as described by Dubins.

As far as I understand it, the usual approach to compute a CC-turn is to calculate the first segment, the clothoid, based on the vehicle constraints, so that at the end of the clothoid the vehicle is driving with maximal curvature. The intersections of the outer circle of a CC-turn with the trajectory path determine the start/end of segments. The inner circle's radius is equal to the minimal turning radius of the vehicle.

Now, the paper that I'm currently reading [1], that describes different turning maneuvers, shows a figure where the trajectory of the vehicle doesn't touch the inner circle of the CC-circles $\Omega_1$ and $\Omega_2$:

How is this possible with the CC-path algorithm? Or am I not understanding their approach correctly? The explanation of the omega-turn construction in their paper is as follows:

The CC-turn circles for the start and end positions are computed first. The middle CC-turn circle affects these two circles tangential. The tangency is the entry/exit point out of the middle CC-turn circle so that the CC-path is an assembly of the single CC-turn circles.

Edit: Additionally, some pages before, the general CC-turn construction is described like this:

The pre- liminary segment is a clothoid arc with maximum curvature change, also known as sharpness, $\sigma = +\sigma_{max}$. The curvature increases from $\kappa = 0$ to $\kappa=\kappa_{max}$.

How is this not a contradiction to the trajectory not touching the inner circle that has curvature $\kappa_{max}$?

Thanks for any help!

[1]: Sabelhaus, D., Röben, F., Meyer zu Helligen, L. P., & Schulze Lammers, P. (2013). Using continuous-curvature paths to generate feasible headland turn manoeuvres. Biosystems Engineering, 116(4), 399–409. https://doi.org/10.1016/J.BIOSYSTEMSENG.2013.08.012

答:
Apparently it is indeed possible for the trajectory between the clothoids to have a curvature of less than $\kappa_{max}$. For example, if the difference of state orientations $\delta = \theta_s - \theta_g \text{mod } 2\pi$ (called deflection) is very low, the path would be laid around the whole inner circle, causing an intersection with itself. To prevent this, an elementary path was introduced, which consists of two clothoids only with curvature less than $\kappa_{max}$.

Sources:

Scheuer, A., & Fraichard, T. (1997). Continuous-Curvature Path Planning for Car-Like Vehicles. In Intelligent Robots and Systems, 1997. (Bd. 2, S. 8–12). IEEE. https://doi.org/10.1109/IROS.1997.655130

Fraichard, T., & Scheuer, A. (2004). From Reeds and Shepp’s to Continuous-Curvature Paths. IEEE Transactions on Robotics, 20(6), 1025–1035. https://doi.org/10.1109/TRO.2004.833789


问:
What servos are suitable for a robot like Boston Dynamics’ Atlas?
I have seen Boston Dynamics’ robot Atlas do some pretty impressive things, like a backflip, which must put quite large torques on the servomotors.

What servos are there that can generate torques like that, but are still small enough to fit in a humanoid robot? Which servos would be suitable? And what servos is it likely that Boston Dynamics use themselves in the Atlas robot?

答:
The Boston Dynamics’ Atlas robot doesn't actually use servo motors. It uses electrically-powered hydraulic actuation.

I saw a presentation by Boston Dynamics' Marc Raibert where (if I remember correctly) he said they used to use Moog actuators designed for the aerospace industry, but that they were now using a motor that they build in-house that is integrated into the body of the robots. (He said something similar in this interview with IEEE Spectrum).


问:
How to calculate my power supply voltage and current?
My stepper motor specifications:

Phase = 2

step angle = 200 step/rev

voltage = 12 V

current = 0.33A/phase

resistance = 34ohm/phase

Inductance = 46omh/phase

holding torque = 23N.cm min

detent torque = 4.6N.cm min

I am making a CNC machine so I need the power supply to power 3 of my stepper motor with these ratings. Can someone calculate the power supply voltage and the current I should get to power my CNC stepper motors?

答:
Current of Font = ((Vmotor / Vfont) * (Itotal) * Ms

Ms= margin of safety (can be set 2)

If you power the driver PWM with 24v

((12/24) * 0.66) * 2 = 0,66A

Its 24-volt supply should provide 0.66A for each motor

If you use 3 step motors:
0.66 x 3 = 1.98

Its electrical source should be 24v x 2A


问:
Get Yaw from quaternion
I found a formula online to extract yaw from a quaternion like so:

```<code>double x = quat[0];
double y = quat[1];
double z = quat[2];
double w = quat[3];

return atan2(2.0f * (w * z + x * y), 1.0f - 2.0f * (y * y + z * z));
</code>```

I wanted to verify if this is the right way to do it. I created a loop that gets the body's current rotation (i.e quat variable above), calculates the Yaw from it (as like the formula above) and prints it out. I then started rotating the body along all three axis. I was expecting the printed value to stay the same when I roll or pitch and only change when I yaw. However, when I roll or pitch I see that the value changes, so I assume that the formula above is not correct.

What is the right way to get the rotation around z-axis (i.e Yaw) from a quaternion? I don't care about pitch or roll but only the yaw.

Maybe the test I am doing is non-sense, but ideally what I would like to do is to observe the body's orientation only in terms of the z-axis. If I am given a quaternion of a body, how can I found out the theta value of the body in respect to itself or the world frame. Assuming that I can get the body's x, y position, I would also like to capture the theta value of that body, so I was thinking that I need to extract the Yaw from the quaternion. The result I am looking for is a value that I can use to represent the state of the body (x, y and theta). I already found the x, y and now I am only left with a quaternion that I need to find the theta of the body. I hope this make sense.

答:
The equation that you used requires that you have a unit quaternion, so $w^2+x^2+y^2+z^2 = 1$. If your quaternion is not of unit length, then you can either normalize it, or use the following expression instead:

```<code>return atan2(2.0f * (w * z + x * y), w * w + x * x - y * y - z * z);
</code>```

Another source for an error might be how a quaternion is defined in your software. Namely it could also be that the first element of the quaternion is $w$, which would mean that you would have to use this instead:

```<code>double w = quat[0];
double x = quat[1];
double y = quat[2];
double z = quat[3];
</code>```

Title: Get Yaw from quaternion

Body:
The equation that you used requires that you have a unit quaternion, so $w^2+x^2+y^2+z^2 = 1$. If your quaternion is not of unit length, then you can either normalize it, or use the following expression instead:

return atan2(2.0f * (w * z + x * y), w * w + x * x - y * y - z * z);

Another source for an error might be how a quaternion is defined in your software. Namely it could also be that the first element of the quaternion is $w$, which would mean that you would have to use this instead:

double w = quat[0];
double x = quat[1];
double y = quat[2];
double z = quat[3];


问:
Benfit of behaviors & benefit of hybrid systems
I have two questions that I think are closely related:

Why is it useful to introduce behaviors, e.g., goal-to-goal + obstacle avoidance? (The alternative would have been to just use a single behavior with the more complex cost function that rewards getting to the goal without hitting stuff)?

Why is it useful to analyze hybrid systems (instead of purely continuous systems that approximate switches and resets as continuous phenomena)?

I think know a naive answer: this makes system design & analysis more tractable, by splitting a very complex problem into smaller pieces that can be, to some extent, studied separately. But is there a more in-depth intuition behind these choices?

答:
The answer you have found out yourself is not naive but rather at the core of science and technology. In fact, when we are not good at tackling the problem as a whole, because it is way difficult or even intractable for us, or when we do not want to put too much effort into dealing with lots of details we are not interested in (think of your example of approximating continuous phenomena with discrete events), then we split it into pieces we are able to better manipulate, in the hope (sometimes we can get stronger guarantees though) that this new arrangement will help us solve the original problem.

A secondary reason underlying this methodology is to implement the composition of tools, which makes our lives much easier because allows us to reuse components that have been designed and realized for problems different from the one at hand. Therefore, by breaking down (analysis) a big goal into a list of smaller ingredients that can be combined together, we will be able later on to aggregate (synthesis) those units to solve other quests, maybe only loosely related to our starting point.


问:
WHY are there no operating torque specifications on steppers?
I have been looking online for a while, and I cannot seem to find any steppers without any torque ratings. (Operating torque, not holding torque.) I even looked on hobby sites that usually have all the ratings, including Adafruit and Sparkfun. I only have found one ever that said the operating torque, however, it didn't seem that reputable and it didn't have holding torque, so it might be likely that it's a mistake. I might contact them and ask.

Am I missing something? Can I calculate what it will run at with certain factors? (How long in between each step, etc.)

The reason that I say that is I found a tutorial saying how much torque (didn't specify which kind, but I kinda assume it isn't holding) you need for a CNC machine (what I'm building).

Equation (From this site):

```<code>Torque = ((weight)(inches/revolution))/2(pi)
</code>```

Also on the page:

By the way, we are talking about torque during a continual turning motion, not at a holding position.

That seems like operating torque, but what makes it the most confusing is they sell steppers and they only list the holding.

What am I missing?

答:
I have never seen a stepper motor manufacturer not specify the torque vs. speed.  I'm not sure where you've looked but a lot of people re-sell various random equipment to hobbyists without providing the same level of information.

These graphs look like this one (source)

The way you drive steppers has a large influence on their performance.  The DC bus voltage you use, whether or not it's a constant current driver and whether or not you're micro-stepping all have an influence.  The vendor will state the conditions under which this curve was measured.

If you're using a stepper in open loop (stepper motors can be used in closed loop servo just like their brushless DC cousins) you want to have adequate torque margin to ensure you never lose a step.  A rule of thumb is x2.

Examples of some vendors are: Oriental Motor, ElectroCraft (formerly Eastern Air Devices).


问:
18 MG996R servo motors control and power
I am currently working an a personal hexapod robot project. I am building it using 18 MG996R 4.8 to 7.2 V servo motors. I would like to use a Raspberry Pi 3 B+ to control it. I purchased a 7.4 V 8000 mAh Li-Po battery to power the motors. I am currently having trouble finding a servo motor controller that supports more than 16 servo motors that also would support a 7.4 V power supply. I am new to this and find myself with a lot more questions than answers.

Such as:

Are there any large servo controllers that can support more than 16 servos that would also work with a Raspberry Pi?

Is the battery I bought too big at 7.4 V?

Should I be using a voltage regulator to tone it down and how would that effect my current output?

Is it possible to stack two 16 channel servo controllers?

答:
Yes, there are servo controllers capable of even 24 servos. As example, check out Pololu Mini Maestro board. It communicates with RPi through USB or UART and You can find more information about that in this blog or Pololu Maestro user's guide.

These servos, as you said, are rated for max. 7.2V input voltage. 2S LiPo battery has a nominal voltage of 7.4V and maximum voltage of 8.4V, therefore it may damage your servos. You should rather use servos more capable for 2S LiPo batteries, change Your LiPo to NiMH packet with 6V output voltage, or, in case You bought them already, utilize some powerful voltage regulator.

Once again, Pololu saves the day with its 15A step-down converter. It has input voltage of 7.2-40V and output voltage of 6V, so it suits Your needs.

Using voltage regulator will limit Your max output current to a maximum of converter's capability. Why I linked 15A one here? Because Your servos can draw 500-900mA @6V each (MG996R documentation). Multiplying those values by 18 servos, all will draw between 9-16A fully loaded. However, in hexapod mobile platform hardly ever Your servos will be at full load all at once. Therefore, 15A converter is more than enough for Your robot.

You can use two separate 8 channel controllers connected to Your Raspberry. Pololu Mini Maestro may transmit data to other one, but that will require programming them in the Maestro Scripting Language.


问:
Does Someone have the Deco Cover Drill Template of the iRobot Create 2?
I am developing a robot with the iRobot Create 2, and I need to built a structure over it, because of that I am looking for the Drilling Template to help me. I already looked in the oficial webpage and it isn´t there, though one of you might have it and could share it here.

Thanks!

答:
From the main iRobot STEM Create 2 Projects page, there is a link to the Create 2 Deco Cover Modification. This link was accidentally broken while updating other content, but it's fixed, now.

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


答:
The reason we always look to linearize system is that we have a lot of results at hand for linear systems, and they are given for a "canonical form". We can assess stability, controllability and a lot of other property as well as robustness through proven results.

Then why choose a first order system ? Well because a second order system can be written as a first order, hence first order system are chosen as canonical form.

Consider $\ddot{x} = A \dot{x} + B x + C u$, it is equivalent to

$ \dot{ \begin{bmatrix} \dot{x} \\ x \end{bmatrix} } = \begin{bmatrix} A & B \\ 1 & 0 \end{bmatrix} \begin{bmatrix} \dot{x} \\ x \end{bmatrix} + \begin{bmatrix} C \\ 0 \end{bmatrix} u$

which is a first order system. So every linear system can be brought to a first-order system for which results have been proven.

Title: Why we want to write all linear system into form of first order differential equations?

Body:
It seems to be taken granted that when we deal with some control system, the first thing we want to do is to linearize the system and put it in form of first order differential equations like $\dot x = Ax + Bu$.

But why do we want to do this? And most importantly, why it is always first order? Why we don't want to write the dynamics like $\ddot x = A\dot x + Bx + Cu$?


问:
Trigger two usb cameras at the same time
I'm studyng stereo cameras, and I want to build one. I searched a lot in internet, and the opinions are quite different about this topic.

Basically, my question is:

Can I synchronize two usb cameras triggering them together, shooting
  at the same instant?

My answer (99% wrong) is:

Yes, with a multithread architecture and a parallel program, can I have two streams at the same instant.

but it seems too easy, and will never work.

Why?

what difference should I expect between the two images? (in millisecond I mean)

Is there a solution in order to have a real global shutter? (without buy another cameras)

I also see some solution for triggering one camera using Arduino. Could be extended to 2 cameras systems?

Hope these are not to many questions. Thanks
PS: books suggestion or papers are appreciated

答:
As you say, you can't trigger them at the exact same time without hardware capable of doing so. Some IMU's supply an external trigger pin, and I see no reason why you couldn't buy cameras that have a trigger pin.

Sure, your suggestion of using two threads and triggering them both at the same time that way would work, so long as you can send messages to both threads at the same time. Unfortunately, you cannot send messages to two threads at the exact same time, and you cannot ensure the processor is running those threads (the OS has thousands of threads it has to run) so you'll have to settle for a very small time difference between them. You'll also end up with all the normal multi-thread communication issues.....

Fortunately, there is a simpler solution. OpenCV provides multiple different ways to get images from a camera. The normal one is to use the function read(). This function actually does multiple things. First it tells the camera to start taking a photo. Then it waits until the camera has taken the photo, and finally, it reads the photo back. This whole process takes multiple milliseconds (on a 30FPS camera it takes ~32ms, on a 60FPS camera it takes ~17ms). You can drastically reduce this time by using the functions grab() and retrieve(). Grab tells the camera to take the photo, and retrieve waits for the camera and gets the data. So if you do (pseudo-code):

```<code>cam1.grab()  # very fast
cam2.grab()  # also very fast

img1 = cam1.retrieve()  # slow because it has to wait for the camera
img2 = cam2.retrieve()  # fast because when cam1 has finished, cam2 probably has as well
</code>```

Using this method you can retrieve the images from both cameras at the framerate of the cameras. This method is mentioned briefly in the opencv documentation where it says:

The primary use of the function [note: the grab() function] is in multi-camera environments,
  especially when the cameras do not have hardware synchronization. That
  is, you call VideoCapture::grab() for each camera and after that call
  the slower method VideoCapture::retrieve() to decode and get frame
  from each camera. This way the overhead on demosaicing or motion jpeg
  decompression etc. is eliminated and the retrieved frames from
  different cameras will be closer in time

Body:
As you say, you can't trigger them at the exact same time without hardware capable of doing so. Some IMU's supply an external trigger pin, and I see no reason why you couldn't buy cameras that have a trigger pin.

Sure, your suggestion of using two threads and triggering them both at the same time that way would work, so long as you can send messages to both threads at the same time. Unfortunately, you cannot send messages to two threads at the exact same time, and you cannot ensure the processor is running those threads (the OS has thousands of threads it has to run) so you'll have to settle for a very small time difference between them. You'll also end up with all the normal multi-thread communication issues.....

Fortunately, there is a simpler solution. OpenCV provides multiple different ways to get images from a camera. The normal one is to use the function read(). This function actually does multiple things. First it tells the camera to start taking a photo. Then it waits until the camera has taken the photo, and finally, it reads the photo back. This whole process takes multiple milliseconds (on a 30FPS camera it takes ~32ms, on a 60FPS camera it takes ~17ms). You can drastically reduce this time by using the functions grab() and retrieve(). Grab tells the camera to take the photo, and retrieve waits for the camera and gets the data. So if you do (pseudo-code):

cam1.grab()  # very fast
cam2.grab()  # also very fast

img1 = cam1.retrieve()  # slow because it has to wait for the camera
img2 = cam2.retrieve()  # fast because when cam1 has finished, cam2 probably has as well

Using this method you can retrieve the images from both cameras at the framerate of the cameras. This method is mentioned briefly in the opencv documentation where it says:

The primary use of the function [note: the grab() function] is in multi-camera environments,
  especially when the cameras do not have hardware synchronization. That
  is, you call VideoCapture::grab() for each camera and after that call
  the slower method VideoCapture::retrieve() to decode and get frame
  from each camera. This way the overhead on demosaicing or motion jpeg
  decompression etc. is eliminated and the retrieved frames from
  different cameras will be closer in time


问:
What's the difference between the term "pose estimation" and "visual odometry"?
I'm reading a paper:

Choi C, Trevor A J B, Christensen H I. RGB-D edge detection and
  edge-based registration[C]//Intelligent Robots and Systems (IROS),
  2013 IEEE/RSJ International Conference on. IEEE, 2013: 1568-1575.

which refers:

Visual features such as corners, keypoints, edges, and color are
  widely used in computer vision and robotic perception for applications
  such as object recognition and pose estimation, visual odometry, and SLAM

I previously assume pose estimation to be roughly equal to visual odometry, yet the text above seems to deny.

So what's their difference? I didn't find much info from google. IMHO, it seems pose estimation is estimating the pose of moving object with the camera static, while visual odometry is estimating the pose of camera in a static(mostly) scene, is that precise enough?

答:
There is this nice tutorial about Visual Odometry which I believe answer your question:

Visual Odometry, Part I: The First 30 Years and Fundamentals.

In case, you were not convinced, you may also have a look at this article:

Past, Present, and Future of Simultaneous Localization and Mapping: Toward the Robust-Perception Age


问:
How to maintain a robot's center of gravity
I am on a robotics team where our robot has to balance on an unstable beam.  However, at the same time, the robot must be able to reach to the side in order to grab field materials.

What possible ways are there to help the robot maintain balance as an arm extends to one side of the beam?  Is there any specific linkage that could help work this?

答:
Use a couterweight.

It could be a second arm, or a pendulum inside the robot body, or even two partially filled water resevoirs with a bi-directional pump in between.

You could also clamp onto the beam.

Or lower the center of gravity below the beam ....

Or something more exotic (Cubli)


问:
Is it better to have weight distributed over the wheels or the center of the robot?
When designing a standard 4 or 6 wheel robot, is it better to have the weight distributed primarily in the center of the robot, or over the wheels, or is there no difference?

Specifically, which weight distribution will make the robot less likely to tip over?

答:
Just to add a little to ronalchn's excellent answer:

Changing the weight distribution in the robot in a way that doesn't change the position of the centre of mass will affect the Moment of Inertia, which in turn will affect the robot's ability to accelerate its rate of rotation.

For most robots that trundle along, this is unlikely to be a problem. However, I could imagine that for an extremely dynamic robot, that travels very quickly and takes tight turns, being able to rotate its body rapidly might be an advantage, and might even be able to save itself from tipping in some extreme cases.

Therefore concentrating the mass near the centre would be best for this type of robot.


问:
In HRI, how is the "uncanny valley" experienced by people on the autism spectrum?
I'm familiar with the idea of the uncanny valley theory in human-robot interaction, where robots with almost human appearance are perceived as creepy. I also know that there have been research studies done to support this theory using MRI scans.

The effect is an important consideration when designing robotic systems that can successfully interact with people. In order to avoid the uncanny valley, designers often create robots that are very far from humanlike. For example, many therapeutic robots (Paro, Keepon) are designed to look like animals or be "cute" and non-threatening.

Other therapeutic robots, like Kaspar, look very humanlike. Kaspar is an excellent example of the uncanny valley, since when I look at Kaspar it creeps me out. However, people on the autism spectrum may not experience Kaspar the same way that I do. And according to Shahbaz's comment, children with autism have responded well to Kaspar.

In the application of therapeutic robots for people on the autism spectrum, some of the basic principles of human-robot interaction (like the uncanny valley) may not be valid. I can find some anecdotal evidence (with Google) that people on the autism spectrum don't experience the uncanny valley, but so far I haven't seen any real studies in that area.

Does anyone know of active research in human-robot interaction for people on the autism spectrum?  In particular, how does the uncanny valley apply (or doesn't it apply) when people on the autism spectrum interact with a humanlike robot?

答:
Actually at the University of Pisa, Centro Piaggio, Italy, we discovered this years ago while working with a human-like robot and presented it at the conference for Autism in Catania, Sicily in 2010.

Human-Robot Interaction in Autism (PDF)


问:
Machine Learning or Deep Learning libraries used in Robotics with FPGAs?
Question here opened the discussion on FPGAs on robotics applications. I would like to teach a LSTM RNN/CNN on border detection and feature detection on FPGA. Feature detection methods I would like to have contain image morphology algorithms and basic ML algorithms to start with.

What are the most common machine learning libraries or deep learning algorithms to be used on FPGAs? Is it feasible to use traditional ML libraries such as H2O on FPGAs?

答:
I cannot comment on 'most common', but I can definitely share several tools and research efforts towards using FPGA for deep-learning. See my survey paper on FPGA-based accelerators for CNN which reviews 75+ recent papers.
Some of these research projects have released their code, such as DNNWeaver. Also, see tools from companies such as Xilinx. Finally, see the code of top FPGA entries at DAC-System-Design-Contest 2018. This contest features embedded system implementation of neural network based object detection for drones.

FPGA development takes time and hence, sometime it may not catch up with the pace of progress in machine learning. Also, unlike tools such as caffe, tensor-flow etc., which are supported by big universities/companies/open-source-communities, a research group alone cannot take their tool/idea to product/maturity-stage. Hence, FPGA development tools are not so numerous as is the case for GPU/CPU. So, I believe understanding "key research ideas" is also important and my answer on state-of-the-art research/academic proposals has some value and others can add different answers.


答:
As @Ugo suggested, in the traditional optimal control theory, most (all?) interesting problems become intractable without decomposition / layered architecture.

For completeness, I wanted to link some excellent discussion of this topic from the perspective of an ML researcher (Sergey Levine of UC Berkeley).

TLDR: Sergey points out that deep learning offers an option to replace the traditional layered architecture by learned black-box components. Of course, while human engineers will no longer need to think about it, a deep network may (and likely will) do something roughly equivalent internally.

That said, Sergey isn't necessarily advocating in favor of letting DL handle the decomposition. He suggests that a more valuable benefit of DL is to propagate errors end-to-end (from the controls back through all the components -- regardless of whether the components are human-designed or learned).

Title: Benfit of behaviors & benefit of hybrid systems

Body:
I have two questions that I think are closely related:

Why is it useful to introduce behaviors, e.g., goal-to-goal + obstacle avoidance? (The alternative would have been to just use a single behavior with the more complex cost function that rewards getting to the goal without hitting stuff)?

Why is it useful to analyze hybrid systems (instead of purely continuous systems that approximate switches and resets as continuous phenomena)?

I think know a naive answer: this makes system design & analysis more tractable, by splitting a very complex problem into smaller pieces that can be, to some extent, studied separately. But is there a more in-depth intuition behind these choices?


问:
Polylactic acid - Can I drill into it?
For a school project, I'm creating a mechanical arm and I'm thinking about using a 3D printer to create some of the pieces. Obviously, This arm is dynamic, so I wanted to make the pieces as light as possible. Can I drill into polylactic acid without it cracking or losing structural integrity?</p>

答: The problem shouldn’t be cracking or losing structural integrity.  The challenge to drilling PLA is its low melting temperature.  You can find many internet posts about drilling PLA, but you have to manage the speed of the drill quite closely so as to not overheat the PLA.  I have made good holes in PLA with a very slow proces, but I have not tried to tap those holes.  Some say it works, but I prefer ABS if I am going to drill and tap.  I use ABS almost exclusively now.  </p>

Title: Polylactic acid - Can I drill into it?


答: From personal experience, drilling into PLA is a bad idea. Print the components after simulating their behaviour in a CAD software</p>

Title: Polylactic acid - Can I drill into it?

Body: For a school project, I'm creating a mechanical arm and I'm thinking about using a 3D printer to create some of the pieces. Obviously, This arm is dynamic, so I wanted to make the pieces as light as possible. Can I drill into polylactic acid without it cracking or losing structural integrity?</p>


答:
The benefit of a hybrid system depends on the goal of an academic work. If the aim is to prove that the robotic system doesn't work, than a purely continuous systems is the way to go. Ordinary differential equations ensure that apart from simple obstacle avoidance the robot can't do complex tasks. Especially from the perspective of philosophical foundations of AI it is important to show, that robots are harmless and that science is not able to build such machines.

Why is somebody interested in building machines who doesn't work? Because this is equal to demotivate the audience. It is the best practice method to use the own influence to hold down technology. Instead of arguing on facts, the debate can be biased into a philosophical one about the limits of Artificial Intelligence.

If the aim is to develop advanced robotics, a hybrid control system is the way to go. With multi-modal-planning and agent architectures, It is possible to implement human-like behavior. From a technical point of view such, such a control system will work very efficient and is able to not only follow a light, but pick up objects, doing complex tasks and parse textual commands. The disadvantage is, that the education situation becomes complicated. Because there is no limit and students could become motivated to think ahead. They will develop systems which break up the curriculum of the teacher.


问:
Orientation from magnetometer data
I saw lot of topics with the same title but answers are different.

I have a magnetometer in my phone which give me the components of magnetic field in direction of X, Y, Z.

If my phone lays on a table the 'z' axis points up. (see the picture below). The values of magnetometer are: ~15 microT in X direction, ~8 microT in Y direction and ~-55 microT in Z direction.

Which of the following angles can be determined using datas of magnetometer? Roll, pitch, yaw? And how?

Thank you, Robert

答:
Usually the magnetometer is used to find the yaw. It acts as a digital compass in this case. To calculate roll and pitch you need an accelerometer. But there are some techniques that can be used to calculate the roll and pitch using the magnetometer. For that you need to place a magnet close to the mobile phone and observe the sensor values. Using these values you can calculate the roll and pitch with respect to the position of the magnet. You may find the necessary equations from the following link.

https://www.dfrobot.com/wiki/index.php/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing

Title: Orientation from magnetometer data


问:
5 DOF robot - Velocity Inverse Kinematics
I am modelling an articulated robot arm with 5 degrees-of-freedom from igus (igus Robolink).

I deduced its direct kinematics equations using Denavit-Hartenberg parameters and homogeneous transformation matrices. I also calculated its Jacobian and inverse kinematics problem of position.

Now I am bit stuck with the problem of inverse velocity. Since the Jacobian is a [6x5] matrix and can't be inverted directly, could you tell me any way to invert it, i.e. Pseudo-Inverse matrix? Or is there a better way to solve inverse velocity problems for 5 DOF robots rather than with the Jacobian?

答:
I remember two possibilities:

As you already said: inversion of the Jacobi matrix. You can maybe look for Moore-Penrose on this topic.

derivation in joint space. If you already solved the inverse problem, and $q$ is known, you can just derivate the position signal:

$\dot q  = \frac{d q}{dt}$

I would prefer the second method. If you want to use the pseudo-inverse you have to check the condition of the matrix. Your pseudo-inverse may become singular. Since you usually have to solve the coordinate transformation of the position signal $q$ anyway, this is way more efficient. You need no matrix operations. For a discrete signal (with sample Time $T$) you can approximate the velocity signal with:

$ \dot q(i) = \frac{q(i+1) -q(i)}{T}$


问:
what specification required for quardcopter to pickup 5kg weight
For a college student project, I am designing a quadcopter with a payload of 3-4kg.

As I am new I don't know what are the implications of such a requirement on the quadcopter design.

In particular  to choose:
- the motor KV
- the propellers
- the ESCs and battery rating

答:
You will need some kind of iterative design to figure out the design of your multi-rotor.

You can consider quadrotor but maybe hexa is making more sense as it will require different kinds of motors...

First, you know the payload, assume a platform weight around 2-3 kg. So you need to have motors capable of producing a total thrust around 80-100N (typically people go for a maximum thrust double of the hovering one). From there you need to find the motors and propellers capable of producing that thrust, this will give you some idea about the ESCs rating (assume worst case, every motor drawign max current). Then based on how long you want to fly you will get your baterry. Once there check the total weight of your platform with respect the initial guess, and iterate....

You can have a look at a design helper https://www.ecalc.ch/


问:
Indoor GPS 3D for navigation
I'm looking Indoor GPS system for agriculture tasks in a greenhouse.
I want to make an autonomous robot who can navigate by "GPS", I want the system to be 3D (x,y,z) and allowing the I can use robotic arm. I thought using Marvelmind precise +/- 2cm Indoor GPS system but I'm not sure it's accurate enough. Has anyone experience with it.

What is best technology/system for that purpose?

Is anyone familier with RTK methods and can tell me if it can works inside greenhouses?

答:
Indoor operation  rules  out  the  use  of  GPS  due to signal attenuation and considerable inconsistency incorporated with localization drift. In such scenarios, simultaneous localization and mapping (SLAM) provides an appealing alternative to estimate the current state of robot and construct the map.

For indoor environments, depending on the accuracy needed, two popular methods are considered:

Visual SLAM:

Process of estimating the ego-motion of an agent (e.g., vehicle, human, and robot) equipped with a single or multiple cameras. Typical vision sensors are monocular, stereo and RGB-D cameras.

Visual-Inertial SLAM:

Dynamic motion, a lack of visible texture, and the need for precise structure and motion estimates reduce visual SLAM capabilities to construct accurate map and estimate the pose of the camera. The measurement from an inertial measurement unit (IMU) would be a good supplement for visual measurements to improve the result.

Please note that if revising the place is not required in your application (problem known as loop closure), the SLAM automatically reduces to odometry.

Title: Indoor GPS 3D for navigation


问:
RF-transceiver for real-time video streaming?
I'm working on an RC-controlled model aircraft. One of the features I'd like to implement is real-time video streaming from the drone's camera. Distance is going to be a few dozen, or better hundred meters.

Obviously, communication link bandwidth is a weak chain here.

How should I approach it? Are there communication protocols and hardware modules I could make use of?

答:
Drones typically use 5.8Ghz for FPV, you can pick up cameras, transmitters and receivers quite cheaply that are already integrated. Some newer models have OTG UVC support to plug directly into a smartphone.

https://www.banggood.com/Eachine-TX02-Super-Mini-AIO-5_8G-40CH-200mW-VTX-600TVL-14-Cmos-FPV-Camera-p-1088368.html?rmmds=search

https://www.banggood.com/Eachine-ROTG01-UVC-OTG-5_8G-150CH-Full-Channel-FPV-Receiver-For-Android-Mobile-Phone-Smartphone-p-1147692.html?rmmds=detail-top-buytogether-auto&ID=224


答:
BLE Bluetooth Low Energy beacons can be used for internal location, you will need a few distributed throughout your space.

https://www.banggood.com/JDY-08-4_0-Bluetooth-Module-BLE-CC2541-Airsync-For-IBeacon-Compatible-With-Arduino-p-1325934.html?rmmds=search

Title: Indoor GPS 3D for navigation

Body:
I'm looking Indoor GPS system for agriculture tasks in a greenhouse.
I want to make an autonomous robot who can navigate by "GPS", I want the system to be 3D (x,y,z) and allowing the I can use robotic arm. I thought using Marvelmind precise +/- 2cm Indoor GPS system but I'm not sure it's accurate enough. Has anyone experience with it.

What is best technology/system for that purpose?

Is anyone familier with RTK methods and can tell me if it can works inside greenhouses?


答:
Usually 3D printed objects are not 100% infill, you can easily drill PLA, however it can delaminate if you push too hard and go fluffy when hot, producing a rough surface and poor quality finish.
3D Printing is quite cheap and relatively fast, better to design your model with correct holes, the internal structure of the model will then offer better support as the holes will have proper walls.</p>

Title: Polylactic acid - Can I drill into it?


问:
What's the difference between feedback and feedforward control?
I'm reading from Astrom & Murray (2008)'s Feedback Systems: An introduction for scientists and engineers about the difference between feedback and feedforward.  The book states:

Feedback is reactive: there must be an error before corrective actions are taken.  However, in some circumstances, it is possible to measure a disturbance before the disturbance has influenced the system.  The effect of the disturbance is thus reduced by measuring it and generating a control signal that counteracts it.  This way of controlling a system is called feedforward.

The passage makes it seem that feedback is reactive, while feedforward is not.  I argue that because feedforward control still uses sensor values to produce a control signal, it is still reactive to the conditions that the system finds itself in.  So, how can feedforward control possibly be any different from feedback if both are forms of reactive control?  What really separates the two from each other?

A illustrative example of the difference between the two would be very helpful.

答:
I argue that because feedforward control still uses sensor values to produce a control signal

For a theoritical discussion, your pre-assumption is wrong. A feedforward control logic need not depend upon the sensor value. Rather it depnds on the desired value. For example, If we have a simple rod hung like simple pendulum with a torsional spring at the pivot. Let's say we are operating this rod with a motor at the pivot. If we give 30 degree desire angle, then feedforward logic will send a duty, accordingly, to balance torsional spring rotated for 30 degree. Whereas, feedback logic will take care the real world scenario of air resistance.


问:
Why Euler Angle is set to be in ZYZ order?
We have 3 DOF for rotation in 3D space. So to describe an arbitrary rotation, we need to describe its 3 DOF. Euler angle does this by dividing a rotation in 3 steps, first rotate along the Z axis of the world frame ($z_0$), then rotate along Y axis of current frame ($y_1$), and finally rotate along the Z axis of the current frame($z_2$).

And of course we have other conventions like z-x-z, x-y-x, y-z-y, x-z-x, y-x-y.

And my question is, why the euler angle is define in this "ZYZ" manner? Why the first and third rotation are about the same axis (of course the first Z and the last Z are in different frames) ? Why not to use ZYX?

答:
Euler angles are not zyz. Euler angles are zyx. This is known as a 3-2-1 rotation. It is standard within the aerospace /robotics field where a series of three rotations are used to describe a relative orientation. </p>

<p>A good reference for this is Aircraft Control and Simulation by Stevens and Lewis. I have the 2nd edition and it sits on my desk at work (among good company) because it is an invaluable reference. </p>

Body:
Euler angles are not zyz. Euler angles are zyx. This is known as a 3-2-1 rotation. It is standard within the aerospace /robotics field where a series of three rotations are used to describe a relative orientation.

A good reference for this is Aircraft Control and Simulation by Stevens and Lewis. I have the 2nd edition and it sits on my desk at work (among good company) because it is an invaluable reference.


答: Euler angles are not always consistently defined as ZYZ.  But this convention is common in robotics because many six-axis robotic manipulators have their fourth axis as a rotation about the forearm, then the fifth is a pitch about the wrist center, and then a final rotation along the Z axis of the end effector.   It maps most closely to the physical devices.  </p>

Title: Why Euler Angle is set to be in ZYZ order?

Body:
We have 3 DOF for rotation in 3D space. So to describe an arbitrary rotation, we need to describe its 3 DOF. Euler angle does this by dividing a rotation in 3 steps, first rotate along the Z axis of the world frame ($z_0$), then rotate along Y axis of current frame ($y_1$), and finally rotate along the Z axis of the current frame($z_2$).

And of course we have other conventions like z-x-z, x-y-x, y-z-y, x-z-x, y-x-y.

And my question is, why the euler angle is define in this "ZYZ" manner? Why the first and third rotation are about the same axis (of course the first Z and the last Z are in different frames) ? Why not to use ZYX?


问:
Practically implementing a torque controller
I'm currently working on a robotics project where i have to build a quadruped. i have somewhat finished the designing for the time being and now moving into simulations. I have followed a inverse dynamics approach to build the controller of the leg following this blog and i have added,

```<code>                       Torque = Jacobean' * force
</code>```

equation to the control equation in order to exert required reaction force and other forces. Meanwhile i have to order required parts to build a model early on due to delivery time. i selected PMDC to control the robot but have been restricted to cheap ones since the budget is low.

The problem is selecting a controller circuit. Since the control signal from the dynamics model outputs a torque value and since DC motor torque is proportional to current, i understand that i have to control the current of the motor. But all the motor controllers i found in USD 1-100 range only controls speed(Voltage) of the motor. The cheapest one i found is dual motor controller for USD 100. But it is out of my reach because i have to control 12 dc motors. what are the options i have?

1) can i achieve this by modifying a general motor controller? or is there a controller i can use in USD 1-50 range?

2) i looked in sparkfun, pololu sites for no success. but robotpower.com had a board called megamoto which i came across but doesn't say that i can current control using this. anyone who has experience with this?

3) Can anyone give me a schematic for a simple motor controller that can control the current. (i understand that i can achieve this by using mosfets, gate driver ics, shunt resistors and current sense amplifiers but doesn't have much knowledge regarding the selection of components or designing of motor controllers.

4) are there any other methods to approach this?

Thank you

答:
You can often find used or surplus industrial controllers capable of current control for good prices, including your range. Elmo Motion Control and Copley Control both have controllers with a small volume that are often surplused. There are even dual and triple drive products.

Ebay and Ali Express are easy places to start looking but more local sources can also be found if you look, no matter which country you are in.


问:
Help in Computing Inverse Kinematics of a 5 DOF Robot Config

Its is a robot config with 5 DOF. We are provided 2 offsets d1 and d2. d1 and d2 are both 0.04 meter.

It is confusing for me alittle bit. I am attending lectures online but I am having trouble figuring out the angle joint configs and their mappings.

Is there a simulation software I can use to visualize and understand its parameters.

答:
There is a beautiful man by the name of Chris Annin (beautiful as in what he did in the world of 6 axis robots). have a look at this video of his explaining inverse kinematics: https://www.youtube.com/watch?v=_rMUddhdk7o

His code is fully downloadable.

To explain my answer, Mr. Annin built an open source 6 axis robot! he explained how he achieved his inverse kinematics in the video I linked to, and the excel file he uses, is available to download. Like I said, Mr Annin is a beauty.

Good luck dude.


答:
You might solve the inverse kinematic problem using the derivation as above.
However, I would recommend to solve with Jacobians (Pseudo-inverse matrix). If you are modelling a robot arm, you might have to deal with the classical problems such as collision avoidance or joint-limit problem.
One big advantage of the Pseudo-inverse matrix is that you can easily modify it to solve these classical problems. </p>

Title: 5 DOF robot - Velocity Inverse Kinematics

Body:
I am modelling an articulated robot arm with 5 degrees-of-freedom from igus (igus Robolink).

I deduced its direct kinematics equations using Denavit-Hartenberg parameters and homogeneous transformation matrices. I also calculated its Jacobian and inverse kinematics problem of position.

Now I am bit stuck with the problem of inverse velocity. Since the Jacobian is a [6x5] matrix and can't be inverted directly, could you tell me any way to invert it, i.e. Pseudo-Inverse matrix? Or is there a better way to solve inverse velocity problems for 5 DOF robots rather than with the Jacobian?


问:
Inverse Kinematics - How to only find a unique joint angle solution in 4 dof robot?
I have to develop an algorithm to determine the necessary joint angles to achieve a desired TCP position and orientation in a 4 joint manipulator. I have come across a concept called "degeneracies", and I have to think of a scheme that will handle degenerate points so that only one joint angle solution exists for any TCP position and orientation. For example: keep the shoulder tilted up at all times. How can I go about this? I understand the equations, it's mainly the "only one joint angle solution" I'm having a hard time with.</p>

答:
You have a 4-Dof and want to find a set of joint angle values which fullfil the desired orientation and position. I doubt that you have multiple solution for this problem. Because you actually need 6-Dof for this task.
Otherwise you can build a nullspace to specify the shoulder movement while the TCP track the desired movement ( but with 4-Dof not worthy probably to use the nullspace...)</p>


问:
Calculate position of differential drive robot
How do you calculate or update the position of a differential drive robot with incremental sensors?

There is one incremental sensor attatched to each of the two differential wheels. Both sensors determine the distance $\Delta left$ resp. $\Delta right$ their wheel has rolled during a known time $\Delta t$.

First, let's assume the center between both wheels marks the position of the robot. In this case, one could calculate the position as:

$$
x = \frac{x_{left}+x_{right}}{2} \\
y = \frac{y_{left}+y_{right}}{2}
$$

"Deriving" those equations under the assumption that both wheels rolled in a straight line (which should be approximately correct for small distances) I get:

$$
\frac{\Delta x}{\Delta t} = \frac{1}{2}\left( \frac{\Delta left}{\Delta t} + \frac{\Delta right}{\Delta t}\right)cos(\theta) \\
\frac{\Delta y}{\Delta t} = \frac{1}{2}\left( \frac{\Delta left}{\Delta t} + \frac{\Delta right}{\Delta t}\right)sin(\theta)
$$

Where $\theta$ is the angle of orientation of the robot. For the change of this angle I found the equation

$$
\frac{\Delta \theta}{\Delta t} = \frac{1}{w} \left( \frac{\Delta left}{\Delta t} - \frac{\Delta right}{\Delta t}\right)
$$

Where $w$ is the distance between both wheels.

Because $\Delta x$ and $\Delta y$ depend on $\theta$, I wonder whether I should first calculate the new $\theta$ by adding $\Delta \theta$ or if I should rather use the "old" $\theta$ ? Is there any reason to use one over the other?

Then, let's now assume the center between both wheels does not mark the position of the robot. Instead I want to use a point which marks the geometric center of the robot's bounding box. Then $x$ and $y$ change to:

$$
x = \frac{x_{left}+x_{right}}{2} + l\, cos(\theta)\\
y = \frac{y_{left}+y_{right}}{2} + l\, sin(\theta)
$$

"Deriving" the first gives:

$$
\frac{\Delta x}{\Delta t} = \frac{1}{2}\left( \frac{\Delta left}{\Delta t} + \frac{\Delta right}{\Delta t}\right)cos(\theta) - l\,sin(\theta)\,\frac{\Delta \theta}{\Delta t}
$$

Now there is a dependance on $\Delta \theta$. Is this a reason to use the "new" $\theta$ ?

Is there any better method to do simulatenous update of position and orientation? May be using complex numbers (same approach as with quaternions in 3D?) or homogeneous coordinates?

答:
For a repeated calculation, it doesn't matter whether you find $\Delta\theta$ before or after you apply $\theta$ to the $\Delta{x}, \Delta{y}$ calculation.  You will always be alternating between a position and an orientation calculation.

In a practical sense, it might be better to calculate $\Delta\theta$ after you calculate $\Delta{x}, \Delta{y}$, since your first iteration through the loop requires an initial value of $\theta$.

Remember that this is an error-prone measurement method anyway -- it's a pair of 1D measurements feeding a 2D approximation of a 3D world.  Even if you are able to get a $\Delta{t}$ very close to $0$, it still won't account for wheel slippage and uneven terrain.


问:
Using pre multiply or post multipy for rotational matrix to get a new homogenous transformation matrix?
I am confused about how do I multiply the rotational matrix in this case.

I know that both T1 and T2 needs to be multiplied by a rotational matrix but I don't know how to multiply the rotational matrix. Do I use the post multiply or pre multiply?

Since from what I read that post multiply is used when the moving coordinate is rotated with the reference of its own coordinate, and pre multiply is used when the moving coordinate is rotated with the reference of the fixed coordinate. So I would like to know in this case which one is moving coordinate and which one is moving coordinate?

I have tried to find the new transformation matrix, but I'm not sure whether it is correct or not.

答:
When working with rigid-body transformations, it is crucial to understand which coordinate frame the transformation is defined in. Further, there are different notations for this, so it is important to know which is in use. Let's assume that $T_b^a$ describes the coordinate axes of frame $b$ with respect to the coordinate axes of frame $a$. (Note that this is the same transformation that transforms data in frame $b$ and expresses it in frame $a$.)

Observe that with this notation, the composition of transformations is clear and follows mnemonic that subscripts and superscripts that are next to each other cancel, as in $T_c^a = T_b^a T^b_c$.

In your case, $T_1$ is really the description of the cube's coordinate frame ($1$) w.r.t the camera's coordinate frame ($C$), written $T_1^C$.

Likewise, $T_2$ describes the base coordinate axes ($2$) w.r.t the camera ($C$), written $T_2^C$.

Now, considering the rotation of the camera, we have the new camera axes ($C'$) w.r.t the original camera:

$$
T_{C'}^C =
\begin{bmatrix} R_z(\frac{\pi}{2}) & 0 \\ 0^\top & 1 \end{bmatrix}
=
\begin{bmatrix}
\cos\frac{\pi}{2} & -\sin\frac{\pi}{2} & 0 & 0 \\
\sin\frac{\pi}{2} & \cos\frac{\pi}{2} & 0 & 0 \\
0&0&1&0 \\
0&0&0&1
\end{bmatrix}.
$$

Having defined all of our transformations, we can now easily calculate our desired quantity, $T_{C'}^2$, which can be composed as
$$
T_{C'}^2 = T_C^2 T_{C'}^C = (T_2^C)^{-1} T_{C'}^C.
$$


答:
If you have a 4 degrees of freedom system you will most probably solve the inverse kinematics equations for $X, Y$ and $Z$ position and, aditionally 1 orientation, let's call this $\alpha$. IFF the chosen orientation and the robot structure allows an analytical solution, you can proced as follows:

As you mentioned you will get more than 1 solution for one set of inputs, so you must have a strategy to select one of the solutions.

You can derive the equations to have the following form:

$q_{11} = f_{11}^{-1}(x, y, z, \alpha)$

$q_{12} = f_{12}^{-1}(x, y, z, \alpha)$

here you decide which value of $q_1$ to use, e.g. based on its sign.

$ q_1 =
\left\{ \begin{array}{c}
q_{11}  \text{ if } q_{11}>0;\\
q_{12} \text{ otherwise }
\end{array} \right.
$

usually, for an analytical solution the next angle which gets calculated is $q_{3}$. You can formulate the equations so that they are dependent on $q_1$ also. This way the $q_1$ choise made earlier will be pluged in the calculations for the remaining joint angles.

$q_{31} = f_{31}^{-1}(x, y, z, \alpha, q_1)$

$q_{32} = f_{32}^{-1}(x, y, z, \alpha, q_1)$

Also in this case you can make a choise which solution to use:

$
 q_3 =
\left\{
\begin{array}{c}
q_{31}  \text{ if } q_{31}>0; \\
q_{32} \text{ otherwise }
\end{array} \right.
$

You can continue solving the inverse kinematics problem by calculating $q_2$. Here there is are no multiple solutions expected if $q_3$ has already been chosen:

$q_3 = f_{2}^{-1}(x, y, z, \alpha, q_1, q_3)$

and you can continue this way until you have all angles.

Title: Inverse Kinematics - How to only find a unique joint angle solution in 4 dof robot?

Body: I have to develop an algorithm to determine the necessary joint angles to achieve a desired TCP position and orientation in a 4 joint manipulator. I have come across a concept called "degeneracies", and I have to think of a scheme that will handle degenerate points so that only one joint angle solution exists for any TCP position and orientation. For example: keep the shoulder tilted up at all times. How can I go about this? I understand the equations, it's mainly the "only one joint angle solution" I'm having a hard time with.</p>


问:
The biases in the state vector of Extended Kalman Filter(EKF)
I am reading one paper on observability Observability Analysis of Aided INS with Heterogeneous Features of Points, Lines and Planes.

The state vector contains the current IMU state and the feature state. The IMU state consists of a unit quaternion representing the rotation, current IMU velocity and position, and gyroscope and accelerometer biases. The velocity is the derivative of the position with respect to the time, so they are dependent. Do the parameters in the state vector need to be independent? Why are the biases considered as part of the state vector? What are the advantages to do so? Can this result in a better estimation?

答: Indeed position, velocity and acceleration (but also the unit quaternion and the angular velocity of the gyroscope) are related to each other. But the word "biases" refers to the measurement of these quantities, for example the gyroscope will measure the angular velocity plus a bias. Including these biases in the state space allows you the estimate the average value of each bias, which would improve your estimate of entire state vector.</p>


问:
What is the difference between a Robot and a Machine?
What is the difference between a Robot and a Machine? At what point does a machine begin to be called a robot?

Is it at a certain level of complexity? Is it when it has software etc?.

For instance: A desktop printer has mechanics, electronics and firmware but it is not considered a robot (or is it). A Roomba has the same stuff but we call it a robot. So what is the difference.

I have always believed that a robot is a robot when it takes input from it's environment and uses it to make decisions on how to affect it's environment; i.e. a robot has a feedback loop.

答:
As @Shahbaz points out this is a highly philosophical question though it does get to the core of the field of robotics. Dr. John Hollerbach begins his Intro to Robotics notes as follows:

What is a robot? In 1980, the Robot Institute of America (RIA), an industrial trade group, came up with the following definition:

"A robot is a reprogrammable multifunctional manipulator designed to move material, parts, tools, or specialized devices through variable programmed motions for the performance of a variety of tasks."

These days, this definition would be considered too restrictive, as it reflects the concentration of the RIA on robot manipulators on an assembly line. Robotics has broadened over the years in many ways: to include mobility platforms, to address the service sector as well as the manufacturing sector, and to incorporate man-machine interactions, not just autonomy, in telerobotic and virtual reality systems.

Ultimately he does not offer an alternative definition outright, that I recall. Instead he discusses the elements of a robot system which he lists as:

Mechanical Structure

Actuators

Sensors

Computer Controller

It is arguable whether the computer controller is even necessary because mechanisms can be built that respond to environmental stimuli without the explicit aid of a computer (see Dr. Robert Full's work). In AI we call such things reflex agents.

If we accept the first three elements (or all four) then our world is overrun by robots. This is a bit unsatisfying for many because we often envision the robots from SciFi. If we don't then the definition becomes arbitrary as @Ian points out because we cannot draw a distinction between two devices with the same components wherein we call one a robot (e.g. 3D printer) and another we don't (e.g. microwave) as you implicitly observe.

Regardless it is generally accepted that these are the elements of a robot. This of course gives rise to the question, did we have robots before we had the term "robot?" The answer to this question is yes (see What is the earliest concept of a robot?). However you shouldn't let this bother you, it is not uncommon for a field of research to come after the technology and/or ideas that define it.