问:
I wanna make a raspberry pi car using an RC car. I would like to know if the servo multiplexer is necessary?
So I'm working on a project and it involves making a raspberry pi car, be it from scratch or with the help of can rc car. I chose the latter. Now the problem is I don't really have servo multiplexers being sold anywhere in my country, Bangladesh, so I have no idea how to get a hold of them. I read that their main function was to convert radio signals to PWM signals so that it could be sent to either the servo or the servo driver which would than be sent to the servo. But my project really require the radio control portion of the car, as I would like to control it through wifi with the help of my computer.

So I wanna know firstly and clearly, what is the main function of a servo multiplexer?

Secondly, since I'm not planning on using any sort of radio communication with the car and the remote control but only plan on controlling the car using wifi and my computer, will I really need a servo multiplexer?

Thank you

答:
The thing that 'convert[s] radio signals to PWM signals' is usually called a receiver.

A servo multiplexer such as https://www.pololu.com/product/721 switches a bank of servos from being controlled by one source to being controlled by another source.

If the raspberry pi is mounted in the car and will be the only thing controlling it, you don't need either, but you will need something to allow the pi to control at least two servos. There are boards to do this, many based on PCA9685 chips, though for a simple car you only need two channels and could do it with a few components.

If you do want to be able to switch between the original RC controller and the raspberry pi on the fly, then you would need the multiplexer to do that, but it would only work if the controller has a spare channel to do so.

This assumes it's the sort of RC car with a receiver, and a proportional servo for steering, and a ESC for motor control, both controlled by PWM. Cheaper cars with integrated electronics will use an H-bridge to directly power the DC motor and often a second H-bridge for steering, where it only has left, right or straight ahead control. In that case a robot board with two H-bridges will suffice.


答:
Shot answer: no

It depends on how you want to control it.

main function was to convert radio signals to PWM signals

I don`t see the reason of converting radio signals to PWM, as long as it is RC car and you have remote control, you can control it directly using RC.

Possible solution:

If you wan`t to control the car (DC motors) using program running on RPi, you need 2 things:

H-bridge (motor’s spinning direction can be controlled by changing
polarity of its input voltage) like L298N (a dual-channel H-Bridge
motor driver)

any Raspberry PI library for PWM (for ex. RPi.GPIO)
for controlling speed of the rotation by setting duty cycles.

ContentLicense: CC BY-SA 4.0

Title: I wanna make a raspberry pi car using an RC car. I would like to know if the servo multiplexer is necessary?

Body:
So I'm working on a project and it involves making a raspberry pi car, be it from scratch or with the help of can rc car. I chose the latter. Now the problem is I don't really have servo multiplexers being sold anywhere in my country, Bangladesh, so I have no idea how to get a hold of them. I read that their main function was to convert radio signals to PWM signals so that it could be sent to either the servo or the servo driver which would than be sent to the servo. But my project really require the radio control portion of the car, as I would like to control it through wifi with the help of my computer.

So I wanna know firstly and clearly, what is the main function of a servo multiplexer?

Secondly, since I'm not planning on using any sort of radio communication with the car and the remote control but only plan on controlling the car using wifi and my computer, will I really need a servo multiplexer?

Thank you


问:
Multithreading on robot control
Is it wise / possible to use multithreading to handle control system on robot?
For example, a line follower robot with PID control flowchart would be:

read_sensor() -> calculate_control() -> set_actuator_value()

The control system will be much like this :

```<code>void calculate_control(){
last_error = error
error = reference - sensorval

//calculation
out_control = k1*error + k2*last_error + k3*last_out_control
last_out_control = out_control
//.. ...
//.. ..
}
</code>```

What if the sensor I'd be using has high reading delay (example : image processing based). Should it follow the same flowchart or should I use multithreading so that while the sensor value is not updated, control system keeps running with updated value (because last_out_control will keeps changing).

ps:
changing the procedure for calculating control value is not possible. I'm just looking for input and suggestion to optimally integrates the system.

答: For a simple PID control you don't need parallel threads, as a control rate of 50 to 100 Hz should be enough.</p>

Title: Multithreading on robot control


问:
Kinematics and dynamics analysis of manipulator in zero gravity
Is there any change in the analysis of kinematic and dynamic analysis of the manipulator which is working in zero gravity or microgravity?</p>

答:
Kinematics is based on geometry and joint constraints, so no change there at all. </p>

<p>Dynamic motion results from the sum of forces, so the only change to a dynamic analysis is that you don't include gravity, but all other forces would remain. </p>

Body:
Kinematics is based on geometry and joint constraints, so no change there at all.

Dynamic motion results from the sum of forces, so the only change to a dynamic analysis is that you don't include gravity, but all other forces would remain.


问:
Drive axis with slipping gear
I'm looking for a name of the mechanic part (axis-gear combination) with the following description to use it in an automatic window control. I can't find this online to get parts due to the lack of right keywords. I'm sorry if I did use some wrong words to describe the part – I'm not from this field of technology:

I have a remote motor and an effector gear that is at minimum placed 30 cm away from it alongside the motor axis. The axis has teeth on which the effector is grabbing on. The gear is not strongly mounted on the axis, though: When the motor turns, it turns as well but it can still freely slip up and down the axis.

What is this called?

答:
Thanks to the comment of @jsotola (pls. give him an upvote) with the manual transmission parts I found out that this is called the reverse sliding gear and the reverse sliding gear shaft when used in manual transmissions for, well, the reverse gear in cars.

More technically it is simply known as slide gear:

(Image source)

Title: Drive axis with slipping gear


问:
How to compute associated (partial) Jacobian matrix for each joint of a serial manipulator?
Given DH parameters of a serial manipulator, the forward kinematics gives me

T0n = T01*T12*T23*...*Tn-1n , n is the DOF of manipulator.

I can calculate the Jacobian matrix J for the end-effector by taking first order partial directives.

Then I know the relation between joint speed and end-effector speed

eeSpeed = J*jointSpeed or jointSpeed = J_inv*eeSpeed

Now my question is how to calculate the Jacobian for joints 1 to n-1, and how to derive the relationship between joint speed and speed of any point on a robot link?

答: I believe you refer to first order partial derivatives. It is as easy as to take the forward kinematics from T0n , where n is the point to where you want to take the partial jacobian matrix and do the same of the first order partial derivatives. </p>


问:
SLAM without landmarks?
First, is it possible to build map without landmarks for a robot in 2D? Let's say we have an aisle surrounded  by two walls. The robot moves in this environment. Now is it feasible to build such a SLAM problem? Or landmarks must be available to do so?</p>

答:
I think you misunderstand what a landmark is. It is a generic, catch-all term for anything that a robot can recognize and use as part of a map. In particular, "landmarks" are important for feature-based SLAM algorithms, such as EKF-based slam. What you use for "landmarks" depends on what sensors are available to the robot.

In your case, since you haven't specified any sensing, then we'll assume the robot knows when it hits an object. Then any "landmark" is simply any time the robot bumps into something. If you do this with pen and paper, you'd just wander around and put an X any time you hit something, then turn and keep wandering. As time goes to infinity, you'd have a reasonable map of where object boundaries are, and what the object shapes are, as long as everything is static.

In this case, the "map" can just be a bitmap, where each pixel is 0 or 1, depending on if it has an object in that space or not. Scaling is up to the application.

I suggest doing a bit more research on these topics:

Occupancy Grid representation

Feature-based mapping

ContentLicense: CC BY-SA 3.0

Title: SLAM without landmarks?


问:
How to calculate heading more accurately using dead wheels?
I am trying to figure out a more accurate way to calculate the change in the heading of a robot. I have two small omni wheels on either side of the robot facing forward and one on the right side facing sideways.

Currently the heading is calculated by subtracting the difference in position of the left encoder by the difference in position of the right encoder and dividing that by the distance between them every iteration of the loop (roughly every 5ms currently).

```<code>double angleChange = (leftDifference - rightDifference) / wheelBase;
</code>```

$\Delta \theta = \frac{\Delta L - \Delta R}b$

The dead wheels are 60mm in diameter and the encoders are 4000 counts per rotation. Using the calculation described it is fairly accurate but the heading drifts relatively quickly leading to the accumulation of positioning errors as well. Is there a way to do this better? I know of another group that changed their calculations to improve it but haven't figured out exactly how.

Interview with the group that improved their solution (their odometry is described near the end):
https://www.youtube.com/watch?v=zun--sNljks

Their robot driving autonomously (first 30 seconds):
https://www.youtube.com/watch?v=NQvhvYJXVMA

The encoders are used rather than an IMU for the lower response time.

答: You need to develop the differential kinematics of this mobile platform for all of the wheels then you can combine it in your model. Other way to do it is to implement an observer based technique to estimate more accurate the angular speed rather than having a time sample based differentiation. </p>


问:
BetaFlight sees motors working, but motors not spinning
I am using FlySky i6 Transmitter and a FS-iA6B receiver.

I have it set up using PPM and BetaFlight recognizes the motors in the Receiver section. All the values adjust according to the toggles and joysticks.

For some reason, though, the motors won't turn. I am not sure if I am missing a setting or a vital step, but this is vital for the quadcopter to fly. :)

Any thoughts? Suggestions?

Side Note: I have set the PPM value on the transmitter to on.

答: Check in betaflight go to motors take the props off and see if you can get them to run.</p>


问:
How do I add a tool to an inverse kinematic solver
This may be a very basic question, however I am having great difficulty to find the right answer.

I have a functioning python code for the inverse kinematics of a 6 axis UR Robot. For any transformation matrix in space I get the corresponding joint values. However: I do not know how I can add the TCP transformation to the calculation. I have a tool attached to the robot and the IK solution should of course account for that. How do I do this? can I simply transform the coordinates before I send them to the inverse kinematics function or does this need to happen inside of the IK function? This feels like it is super easy but I am drawing a blank for the last few days.

So far I have taken the dot product of the coordinates I want to approach and the TCP transformation. However this only works without any rotation as soon as rotation is added this doesn't work anymore what am I missing? My googling skills have failed me so far.

答:
A fixed (not dependent on any changing parameter) coordinate system transformation can be defined between the TCP and the "end of the robot" coordinate system. Depending on how you formulate CS transformations this can be a 4x4 transformation matrix or a double quaternion or any other form of expressing coordinate system transformations.

Two possibilities exist which are equivalent in results but one of them may be preferred based on current implementation:

Transform the TCP coordinates to "end of robot" coordinates using the fixed transformation. Since you probably want to transform also orientation not just position, the simplest would be to take the unit vectors of the desired TCP coordinate system axes and transform them to capture both position and rotation. That maps all unit vectors to the coordinate system you have the inverse kinematics for, you just need to rewrite the unit vector coordinates to the convention you use to describe orientation (e.g. Euler angles)

Add the fixed transformation to the inverse kinematics problem. You can just add another fixed transformation to the kinematics problem. This will not affect the math, since is is a matrix (if you used the 4x4 matrices) with all elements known.


问:
Model of two link rigid manipulator
I am working on parameter estimation of a rigid two-link manipulator as shown in the picture below.

Unlike the cylindrical links shown in the above image, my robot has links of oval shape.

So the centre of mass of links is not the midpoint of the link. I tried to search for the model equation but each one assumed the cylindrical shape of the links and the centre of mass as the centre of the link.

What I know till now is that we write Langragian equation
$$L=K E-P E$$
And then derive the torque equation using
$$
\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}}\right)-\frac{\partial L}{\partial q}=\tau
$$
I referenced these papers
2 Dof Manipulator Dynamics,
Parameter Estimation of Manipulator Robot Dynamics.

Even though both have considered the same robot structure with the same joint type and link shape, they both have different model equation. The former (page 6 to 9) has considered the length of the links while the latter (page 22) has considered the centre of mass of the links.

Which one is correct for my robot? How should I derive the model for a rigid two-link manipulator with oval-shaped links?

答:
the model would be different because of the location of the center of mass of the links, so maybe in one model is just the total length d while in others might only be d/2.

To calculate the center of mass of your oval kind shape link you have two options:
separate the shape of your link into the basic shapes like a trapezoid and two half circles https://www.youtube.com/watch?v=8jo8gVUmTEw

or take the data from a CAD program like solidworks/solid edge/catia etc.

and use that vector to get the kinetic and potential energy of your links and derived the model.

Title: Model of two link rigid manipulator


答:
Well, the answer is quite straight forward. With the given equation
$ T^n_0 = \ldots $ you calculate the transformation from the $n^\mathrm{th}$ coordinate frame (attached to the end effector) to the inertial coordinate frame.

Just imagine you want to know the Jacobian from the joint $n-1$, you do the exact same procedure. Calculate $T^{n-1}_0 = \ldots $ and calculate the first partial derivative.

You can do that for each coordinate frame, or point you wish for.

In other words, the Jacobian method is just the use of the chain rule from differentiation.
Given the translational velocity $v=\frac{\mathrm{d}}{\mathrm{d}t}p$ of any point $p$. Any point $p$, expressed in the inertial frame depends on the joint configuration $q(t)$, so $p(q(t))$. Therefore you can apply the chain rule
$$ \frac{\mathrm{d}}{\mathrm{d}t}p = \frac{\partial}{\partial q} p \frac{\mathrm{d}}{\mathrm{d}t}q ~.$$
The partial derivative $\frac{\partial}{\partial q} p $ is called the Jacobian of the point $p$. If $p$ describes the end effector position, the Jacobian is called the manipulator jacobian.

Note: $p$, $v$ and $q$ are usually vectors, therefore the partial derivative yields a matrix.

Title: How to compute associated (partial) Jacobian matrix for each joint of a serial manipulator?

Body:
Given DH parameters of a serial manipulator, the forward kinematics gives me

T0n = T01*T12*T23*...*Tn-1n , n is the DOF of manipulator.

I can calculate the Jacobian matrix J for the end-effector by taking first order partial directives.

Then I know the relation between joint speed and end-effector speed

eeSpeed = J*jointSpeed or jointSpeed = J_inv*eeSpeed

Now my question is how to calculate the Jacobian for joints 1 to n-1, and how to derive the relationship between joint speed and speed of any point on a robot link?


答:
Multithreading doesn't help a simple robot much. For example, if you have just a couple of sensors for line following, multithreading isn't necessary.

However, as the robot becomes more complex both electronically and in programming, multithreading makes sencpse.

Add more sensors to your line-follower, perhaps a lidar for distance measurements, audio for speech recognition for accepting new commands, and vision for object recognition. In this case multithreading really helps. Unlike a few quick sensor readings, the speech recognition takes more time and attention. A command, perhaps "Robot, stop," takes maybe a second to say. In a single-threaded robot everything else would have to stop while this command was parsed.

With multithreading, on thread could be used to listening, and the main thread might only be notified when the command was heard.

Yes, there is more overhead in a multithreaded program, but it can handle more complex cases more easily.

I would suggest that you use a framework to handle multithreading. That way most of the difficult part of multithreading will have already been done.

Title: Multithreading on robot control

Body:
Is it wise / possible to use multithreading to handle control system on robot?
For example, a line follower robot with PID control flowchart would be:

read_sensor() -> calculate_control() -> set_actuator_value()

The control system will be much like this :

```<code>void calculate_control(){
last_error = error
error = reference - sensorval

//calculation
out_control = k1*error + k2*last_error + k3*last_out_control
last_out_control = out_control
//.. ...
//.. ..
}
</code>```

What if the sensor I'd be using has high reading delay (example : image processing based). Should it follow the same flowchart or should I use multithreading so that while the sensor value is not updated, control system keeps running with updated value (because last_out_control will keeps changing).

ps:
changing the procedure for calculating control value is not possible. I'm just looking for input and suggestion to optimally integrates the system.


问:
Can you have a career in robotics if you hate mechanics?
I'm a first year electronics engineering student. I love almost all the aspects of robotics - the electronics, algorithms, control theory etc. I can't stand the mechanical aspect of robotics though.

Can I have a fulfilling career in Robotics if I hate mechanics but love all other parts of robotics? I'm ready to learn mechanics if I absolutely have to, but would strongly prefer not to learn any more than the absolute basics.

答:
Working in robotics doesn't mean that you must understand (or enjoy) all the relevant disciplines.  It simply means that you must understand that you are one part of a team that produces a robotic system.  On the other hand, what skills you have will determine which teams will find you valuable as a member -- smaller teams require everyone to bring multiple skills to the table, but in larger teams you can get extreme specialization.

At a minimum, you need only understand that the mechanical system will constrain what can be with the other systems (e.g. you may have a hard maximum or minimum acceleration, finite range of motion, limit on total battery current, etc).  You will work within those constraints.


答:
The FTC team I coach (Moderately Dangerous) uses the encoders on the motors rather than drag wheels, so I don't know if their solution will work as well for you.  They flip there problem.

Drive the the robot in a spin  for 500 counts on the left encoder. Record the number of counts on the right and number of degrees the robot turns 5-10 times. Do the same for several other counts on the left. You can now do a linear regression between the difference between the left and right counts and observed turn. If you get a good line fit the slope should give you the mapping.

Title: How to calculate heading more accurately using dead wheels?

Body:
I am trying to figure out a more accurate way to calculate the change in the heading of a robot. I have two small omni wheels on either side of the robot facing forward and one on the right side facing sideways.

Currently the heading is calculated by subtracting the difference in position of the left encoder by the difference in position of the right encoder and dividing that by the distance between them every iteration of the loop (roughly every 5ms currently).

```<code>double angleChange = (leftDifference - rightDifference) / wheelBase;
</code>```

$\Delta \theta = \frac{\Delta L - \Delta R}b$

The dead wheels are 60mm in diameter and the encoders are 4000 counts per rotation. Using the calculation described it is fairly accurate but the heading drifts relatively quickly leading to the accumulation of positioning errors as well. Is there a way to do this better? I know of another group that changed their calculations to improve it but haven't figured out exactly how.

Interview with the group that improved their solution (their odometry is described near the end):
https://www.youtube.com/watch?v=zun--sNljks

Their robot driving autonomously (first 30 seconds):
https://www.youtube.com/watch?v=NQvhvYJXVMA

The encoders are used rather than an IMU for the lower response time.


问:
Moving Sofa Problem with the help of 'Potential Field Method' and 'Navigation Functions'
I would like to move a piano. Having a mathematical background, I was trying to figure out whether I can get it into the new apartment.
In my research I stumbled upon the already explored "moving sofa problem" as illustrated below:

Now, my question is:

Is there a computational model that is able (or at least tries) to find solution for this problem for any (or at least some) arbitrary shape? By solution I mean a path along the object can be moved that brings it around the corner.

I stumbled on some interesting concepts in motion planing.
Most importantly on:
"Potential field method" in motion control and navigation functions

Now to my two new subquestions:

Exists a publicly available "Potential field model" for arbitrary movable object shapes, or something similiar?

Is there a method that lets me construct an (optimal) navigation function if I know the potential field and the shape of the movable object?

Keep in mind that my special interest is in cases where there is almost no "free space". Hence, where it is hard to move it around the corner.

Thank you!

答:
Potential field methods usually model the moving object as a point. There is another concept in robotics called configuration space, which allow condensing the moving object to a point while expanding obstacles "with the robots geometry" (to simplify the method to one sentence). This essentially allows you to plan a path for a point while making sure that the actually geometry of the robot is considered.

To solve the above problem with potential fields the combination of these methods would be needed. Similar to the approach detailed here. However tight corridors are not well suited for potential field planning, since the potential fields do not exactly represent the shape of the obstacles, they just approximate it. There are potential fields which can better approximate shapes (IIRC they are called harmonic potential fields, based on partial differential equations to describe the potential function), still potential fields methods are usually not well suited for tight corridors.

The advantage of potential field methods is in their "reactive" nature. They can react to changes in the environment (moving obstacles) with a low amount of required computation. These are also called online methods, because the path is planned online, as the robot/moved object advances in contrast to the offline problems where a full path is computed prior to any motion of the robot/moved object.

The piano (or ladder or sofa) movers problem, since it does not include changing environment, can be solved using offline planning (like the a* algorithm). More details are given here.


问:
How does this end effector work?
I've seen this linear actuator end effector on a few industrial SCARA 'bots but I am having trouble visualizing how it works internally:

It looks like a type of lead screw, but the nut must spin instead of the rod to cause motion. If this is the case would the end part of the effector not also spin with the rod? Does this end effector design have a specific name ? If you can explain how the mechanics of this joint works It would be very helpful.

All help appreciated.

Edit:
Sorry for the low res picture, more detail about the type of joint im looking at can be found at:

Models that have this type of joint include the Epson T3

Epson T3 Video

Fanuc SR-3iA

答:
The actuator has two raceways cut into it.

One is a screw thread, and engages with a rotary screw nut that is turned by a motor. Turning the nut moves the actuator linearly.

The other is a spline groove and is cut parallel to the actuator axis, and engages with a rotary spine nut that is turned by another motor. Turning the nut spins the actuator on its axis

https://duckduckgo.com/?q=BALL+SCREW+SPLINE+SPBR&iax=images&ia=images

https://euro-bearings.com/lin_SPBR.html

Title: How does this end effector work?


问:
Autonomous car steering using IR sensors
I want to steer a RC car in a straight line.The car has 4 sharp IR sensors on each corner of the car to help it steer the corridor.The corridor is irregular and looks something similar to the picture below.

The car needs to be stay exactly at the middle(shown by lighter line) and take help of the IR sensors to correct its path.

The car has a servo on the front wheel to steer and another that controls the speed.

I tried running it using a algorithm where it summed the values on each side of the car and took the difference.THe difference was then fed to a pid control the output of which went to steer the car.The greater the value from the pid (on either sides), the greater the value of the steering angle till it reaches the middle.

It works for the part where the walls are at similar distance from the center and even then it oscillates a lot around the center and fails miserably around the bumps in the corridor.

I need to make changes to the algorithm and need some help in steering me  in the right direction.

The IR sensors are too finicky and is there a way to filter out the noise and make the readings more stable?

Any help regarding the changes that needs to be implemented is much appreciated.

Currently the car only uses 4 IR sensors to guide.I can also use 2 ultrasonic sensors.

答: You could have it keep track of the last distance read from the IR sensors and if it changes more than a certain amount (2%? not sure what would work for you) calculate the difference between the measured distance and the expected distance. Save that difference as an offset, which you apply to the reading from that IR sensor until it returns to normal. If the sensor reads 'infinity' you could ignore the actual reading entirely and just give the PID loop the "expected" value. This is entirely untested.</p>


问:
Active Light Stereopsis: 1 Camera + Projector Vs. 2 Camera + Projector
What is the difference between using 1 Camera and a Projector and using 2 Cameras and a Projector for creating structure from motion?

Is it that if we use only 1 camera and a projector then we will have to move around the camera to create a stereo pair? But if we use 2 cameras and a projector then we can just get the stereo pairs at once? (1 image from 1 camera, and 1 from another)

答: It seems that the difference is not much, and mostly that having two cameras helps in overcoming the ambient effects of light that might otherwise pollute the scene, but otherwise perfectly interpretable results can be obtained from either of the two.</p>


问:
DJI on-board SDK vs. mini computer
I am planning to integrate a LIDAR sensor on my DJI Matrice 100 and I will use the data generated to control the height of my UAV. I was wondering if I would need to attach a separate processing unit such as raspberry pi/GPU to process the LIDAR data or would the onboard SDK suffice?</p>

答:
Yes, you can.

M100 has a separate power output plug to power the on-board computer, such as Raspberry pi and NUC.

You can use your on-board computer to do the lidar-related computing and send the final control movement command to the M100 sdk serial port.

Title: DJI on-board SDK vs. mini computer


问:
Visual-Positioning Method
I'm working on mobile manipulator and trying to do visual-positioning of the end-effector.

My camera will located around 1-2 meters from the robot.
I'm sure i cant use color tracking method because the color of end-effector not unique to the environment and i can't get the orientation of end-effector. If I'm using neural network, the computation cost will high (not reliable for high-speed control). What method of visual-positioning can i use for this case?

答:
So it sounds like you have an external camera system to track the end effector position and orientation?

In that case I would use QR codes or april tags. Stick a couple of these on your end effector, and make sure that you put enough of them that 1 is always visible from your camera. The apriltags library provides the ability to extract position and orientation.

Title: Visual-Positioning Method


问:
Motion Planning vs. Control
Often I see positions for robotics companies split into planning and controls engineers.

But motion planning and controls seem to have a lot of overlap.

As I understand in motion planning the planner produces a trajectory. But to make sure the trajectory is feasible the planner must also take into consideration information about the dynamics of the system and can output controls as well.

Similarly methods like MPC and optimal control output a trajectory of states and times with the controls. In fact in any control paradigm where you have a model or simulator you can produce a trajectory of states from your control inputs and initial condition.

Thus I have 4 questions:

How does motion planning differ from controls?

On a robotics team what is the problem the planning team seeks to solve? Once they solve it, what information do they give to the control module?

On a robotics team what is the problem the control team seeks to solve? How do they use the information from the planning module?

What sort of experience/classes do people on planning teams have? There's plenty of classes on control at my university but I have never seen any about planning. I took a robotics class this semester and it doesn't cover planning in depth and none of the syllabi for other robotics classes cover planning for more than a lecture.

Note here I'm assuming that the planning team works on motion planning instead of path planning. If they work on path planning then I understand 2 and 3.

答:
There is a saying in software engineering which states that your company structure is reflected in your software architecture (I cannot recall the exact phrase). This is true for a robot control software stack also.

Control is closed loop, planning (motion, trajectory or any other planning) is not (it is open loop). In a closed loop solution (i assume in all cases but it might be just the majority of cases) an error signal is built from the setpoint signal and a measured signal. The controller tries to minimize this error. In a planning problem the planner can receive an input (e.g.) current position, but the output is a "plan" how to get to the next point (and the problem is not formulated as how to minimize the distance to the next point, but how to build an polynomial which connects the points smoothly). It is open loop because the output of the planner is not in direct relation to its input. It does not want to minimize an error, all controllers (again I assume all controllers, there might be exceptions) try to minimize an error signal built as a difference between the setpoint and a current measured value. You can definitely build a closed loop controller which minimizes the distance to the next point and therefore generates a trajectory implicitly, but the goal of the trajectory planner is to respect geometrical constraints through planning which a controller could not respect (or only through a more complicated approach then the planner/controller). To have a very simplistic summary, the trajectory planner interpolates between the waypoints while respecting geometrical (and kinematic) constraints, while the controller follows the trajectory given by the series of interpolated points (not the far away waypoints).

In the application program of an industrial robot (manipulator) the waypoints for a motion are defined and the type of motion is specified. e.g. linear motion from the current pose to pose (x, y, z, a ,b,c). moreover, usually motions are flowed by other motion command, e.g. linear motion, circular motion, linear motion, spline motion, each with their own waypoints (an optionally target velocities and accelerations). Trajectory planning takes these motion types and waypoints and defines a (hopefully) smooth spline (incl. rounded edges if needed/allowed) and adds the velocity and acceleration components. Basically from a vector based description of the path (waypoints and target velocities and accelerations) you get a time dependent (smooth) curve, which respects the dynamic limits of the robot. Motion planning is sometimes used as a synonym of trajectory planning, sometimes it includes both path planning and trajectory planning. Path planning would find those waypoints, which I assumed where given in the application program. The planner might get the dynamic limits of the robot as parameters from the controls team (but usually there is a specification from which both teams work form)

The controls team is concerned mainly with designing, implementing and tuning control loops in order to get the best possible performance out of the hardware. They need to be prepared to get any trajectory and execute it (or stop with an error). After the controls module is finished the dynamic limits of the robot set (however, there is a design specification for target dynamic performance which the control team is seaking to accomplish). The control software module gets the curve from the trajectory planner.

CNC controllers are similar to robotics controllers, an in depth understanding of CNC controllers offers a good insight into robot controllers. Otherwise SE cannot comment on what classes are offered at your university and their technical depth. Maybe look trajectory planning topics, path generation, robot control systems, motion control. Otherwise differential equations, differential geometry, curves (polynome-, akima-, b-splines, bessier curves, lines, circles, polylines), interpolation, numerical optimisation, physics of motion, kinematics, higher order kinematics, differential kinematics are some of the topics needed for trajectory planning. Furthermore software engineering (mostly C/C++ related) topics are important for the implementation. The book Numerical Recipes comes into mind, with 1 relevant chapter about interpolation and one about ordinary differential equations.

Title: Motion Planning vs. Control


问:
What is the difference between multi-link flexible manipulators and continuum robots?
I read the review[1] on flexible manipulators, the modeling method of multi-link(even if single-link) flexible manipulators seems very different from the continuum robots like OctArm(multi-section), hyper-redundant manipulator and etc which based on the backbone curve or constant curvature model.

[1]Sayahkarajy, Mostafa, Z. Mohamed, and Ahmad Athif Mohd Faudzi. "Review of modelling and control of flexible-link manipulators." Proceedings of the Institution of Mechanical Engineers, Part I: Journal of Systems and Control Engineering 230.8 (2016): 861-873.
,

答: Continuum robots do not have rigid elements while multi-link flexible manipulators use "traditional" rigid links between flexible joints. One long continuous flexible material vs. a series of short flexible material segments interconnected with rigid material.</p>


问:
Very high value readings for light bumpers
I am reading out the values for the light bumpers on the Icreate2 robot. According to the manual, these values should be in the range 0-4095.

Whenever I read out these values, they start out as well-behaved values in the expected range. However, after a minute or so, the values jump up to very high values >20,000, for example.

I have attached a screenshot of a python-based utility I wrote to show the values of all sensors. You can see that some bumper values have very large values. Nothing is in front of the robot.

Does anybody have any idea about what's going on?

答: I have a similar issue where I get internal ascii debug messages from the roomba, which interfere with data that I expect to receive. You may just connect via serial port, switch to some mode and output everything you get from the roomba. If you see english ascii text messages within five minutes, you are probably affected too.</p>


答:
Robotics is by definition a subject rooted in mechanics and if you "hate" this subject then surely there will always be an large part of this industry that you "hate".  So I would suggest you review either:

a.  What you mean by "I hate mechanics" or "the mechanical side"
b.  Understand what you like about Robotics because in the end all of the work is translated into the mechanical side (electronics, algorithms, control theory etc.).  That is this work has to be implemented in the real world.  And this is where the real rewards, off seeing the results of your work, will come from.

Note:  My experience is that if you work hard at the mechanics side then ultimately you will learn to like it as your work translates into real things.

Title: Can you have a career in robotics if you hate mechanics?

Body:
I'm a first year electronics engineering student. I love almost all the aspects of robotics - the electronics, algorithms, control theory etc. I can't stand the mechanical aspect of robotics though.

Can I have a fulfilling career in Robotics if I hate mechanics but love all other parts of robotics? I'm ready to learn mechanics if I absolutely have to, but would strongly prefer not to learn any more than the absolute basics.


问:
Is it possible to list all runtime dependencies for ROS
I've read this link: http://wiki.ros.org/kinetic/Installation/Source and have known that the command rosdep install --from-paths src --ignore-src --rosdistro kinetic --simulate can list all necessary dependencies of ROS on a clean system.

Also, I've read this link: http://wiki.ros.org/catkin/package.xml

So I'm thinking if it is possible to list only the exec_depend of ROS?

答:
AFAIK, this is not currently possible through official functionality.

There is an open PR on rosdep which is meant for this very feature. I have not tested it personally, but looking at the code changes, it seems to allow for rosdep functionality to act only on certain dependency types through the --dependency-types flag.

https://github.com/ros-infrastructure/rosdep/pull/727


答:
I can speak to space robotics, and military-type robotics, and some commercial robots, but there isn't really a "typical" robot yet.

How does motion planning differ from controls?

A drunk person can plan a path or sequence of motions, but cannot follow it well. A drunk person has motion and path planning but suffers poor control (esp poor reaction time which creates a time-delay system which is notoriously difficult to control). Google maps gives you a plan, but your brain determines the motions (change lanes!) and your hands on the wheel gives the controls.

On the mars rovers, the scientists give the plan (go there), the rover drivers determine the motions (drive along this curve) but the rover determines the controls (the wheel speeds) ... often. Sometimes the rover drives determine even the wheel speeds / turns.

On a robotics team what is the problem the planning team seeks to solve? Once they solve it, what information do they give to the control module?

A planning team usually determines first actions (e.g., I should now mow the lawn), then motions (Mowing the lawn should mean turning on the mower and then outputting a sequence of waypoints that, if navigated to in straight lines, will cover all the un-cut grass.) Then, the output to one control module is those lines between waypoints, and the output from that module is wheel speeds.

On a robotics team what is the problem the control team seeks to solve? How do they use the information from the planning module?

It usually looks like this:

1: Goal (mow) -> 2. Actions (turn on blades, drive over all grass) -> 3. Discrete Path (seq of waypoints that covers the grass) -> 4. Continuous path (the curved path the robot can actually follow) -> 5. Wheel speeds to follow that path. Note, sometimes static obstacles are introduced at stage 3, and moving obstacles are considered at stage 4-5. This is just my experience.

Note, 4 and 5 are frequently recalculated based on where the robot is, 3 is infrequently recalculated if ever, and 1 or 2 are sometimes never recalculated (they may be hard-coded). 3-4 are sometimes called motion planning, and 5 is sometimes called controls. It's best to draw this pipeline out for each use case and get specific as quickly as possible.

What sort of experience/classes do people on planning teams have?

Typically, they may have heard of RRTs, MPC, PID loops, LQR, Visibility Graphs / Roadmap methods, velocity obstacles, artificial potential fields, and so on. If you want to work at stage 1/2 above, you should learn more about traditional AI and activity planning, which is better characterized as planning and scheduling. Decision trees, Game trees, classical dependency graphs and job-shop type problems, even vehicle routing literature fits here.

Title: Motion Planning vs. Control

Body:
Often I see positions for robotics companies split into planning and controls engineers.

But motion planning and controls seem to have a lot of overlap.

As I understand in motion planning the planner produces a trajectory. But to make sure the trajectory is feasible the planner must also take into consideration information about the dynamics of the system and can output controls as well.

Similarly methods like MPC and optimal control output a trajectory of states and times with the controls. In fact in any control paradigm where you have a model or simulator you can produce a trajectory of states from your control inputs and initial condition.

Thus I have 4 questions:

How does motion planning differ from controls?

On a robotics team what is the problem the planning team seeks to solve? Once they solve it, what information do they give to the control module?

On a robotics team what is the problem the control team seeks to solve? How do they use the information from the planning module?

What sort of experience/classes do people on planning teams have? There's plenty of classes on control at my university but I have never seen any about planning. I took a robotics class this semester and it doesn't cover planning in depth and none of the syllabi for other robotics classes cover planning for more than a lecture.

Note here I'm assuming that the planning team works on motion planning instead of path planning. If they work on path planning then I understand 2 and 3.


问:
How do I calculate the direction robot is facing, pose from velocity and yaw rate?
I have a simple car robot with four wheels moving relatively slowly (5~10 mph). The robot has a velocity magnitude and yaw rate sensor and the sensor samples about every 0.1 seconds. I want to map the location of the robot in the room in a global coordinates using these two values. What I am doing is robot starts out at location (x=0,y=0). I calculate the location by saying

```<code>x = velocity*cos(yaw_rate)*sample_interval
y = velocity*sin(yaw_rate)*sample_interval
</code>```

So far with this method, the location calculated is actually fairly good as long as the yaw rate is not so large. But if my understanding is correct, yaw rate is the rate of angle change and not the angle changed and to get a better model and the actual direction the vehicle is facing, I will need to say integrate the yaw rate. I want the angle the robot's face normal vector makes to vertical axis so I can figure out the direction robot is facing or it's pose.

Now this must be a very well known equation in robotics and mechanical engineering but my back ground is in programming and I have no idea where to start. I tried searching on google but my search words must not be right since I can't find a good page. Can you point me to the right direction, let me know of a starter page that I can look at?

答:
Close.

A simple solution is to first track the heading over time using the yaw rate sensors. If you're getting measurements every $\delta t$ seconds ...

$$
H(t+1) = H(t) + Yaw(t)*dt
$$

The, you can use basically what you had to track position relative to starting configuration, by:

$$
x(t+1) = x(t) + \cos(H(t))*v(t)*\delta t
$$
$$
y(t+1) = y(t) + \sin(H(t))*v(t)*\delta t
$$

Note, this assumes, $x(0)=y(0)=H(0)=0$, so you'll have to "seed" $x(0),y(0), H(0)$ to get the "real" position and heading at time $t$.

This will do OK, but confounding factors are:

The discrete heading is an approximation, the continuous yaw should ideally be integrated and a better movement model used

Wheels slip, producing motion not well modeled

You'll eventually want to fuse estimates of the robots actual location

Note, this is called ackerman steering! Use that for your google-foo.

But this'll do for simple projects.


问:
Implementation of Velocity Control Algorithm Based on PID
I'm very familiar with the traditional position form of PID. The error is just the difference between some setpoint encoder value and the current encoder value. Although this suffices for basic autonomous routines, it would definitely be more powerful to control the motors' velocities. Thus I'm here now trying to implement velocity PID.

Error is probably going to be the difference between some desired encoder value change over time and the current change of encoder values over some known time. However, as the motor reaches that desired velocity, the error goes down (who would've thought), but because the output is proportional to the error (again, who would've thought), the motors logically begin to slow down. That's one problem, the motors have to keep up their outputs to stay at a velocity, not slow down as they get closer.

My first idea was to implement some kind of feedforward to estimate the velocity then let I and D do the rest of the work to get the motors at the exact desired velocity. But is that really industry standard or something, like I would be eliminating P.

Another idea was to take the derivative of the position form of PID (found it at this site: https://www.controleng.com/articles/the-velocity-of-pid/)

I've tried looking for alternatives to these two methods (my possibly very jank way and the probably more formal and accepted way). And oh god, I still have filtering sensor data to think about.

So my question:

How do I implement velocity PID in order to control my motors' velocity? Which algorithm should I use?

答:
Why does the PID algorithm need to be different? You're basically describing robot cruise control. Your setpoint is your desired speed, your input is your current speed, and your output is an accelerator value ("throttle")

Your comment about motors keeping their outputs up to stay at velocity is really a conversation about how much overshoot you want -- you want to accelerate at some non-zero rate to achieve your target velocity, and then slow down your acceleration as you approach it.

The beauty of the PID is that it doesn't actually care about the system it's controlling - it just needs the input, the error and a single control value to adjust the input. You have all of those.

... Unless I'm massively missing something, which is possible.


问:
Paradox: I can't use accelerometer measurements to obtain information about my states in a quadcopter?
I'm currently developing an EKF to estimate the position and orientation of a quadcopter. My state vector is comprised of 3D position, 3D velocity, 3 euler angles and the angular velocity vector.

Right now I'm looking into the measurement equation for the accelerometer.

If I understood correctly, an accelerometer measures "proper acceleration", instead of coordinate acceleration, that is, it measures the acceleration of the body w.r.t to a free-falling coordinate system.

If this is the case, and supposing the only forces acting on the body are the upward thrust given by the propellers, $\vec{T}$, and earth's gravitational force, $m\vec{g}$, then I understand that the only acceleration that would be measured by the accelerometer is the one caused by $\vec{T}$ (since the free-falling frame has no way of measuring the acceleration caused by $m\vec{g}$, because it is also being accelerated by it).

If this also the case, then I note that the vector $\vec{T}$, when expressed in the body coordinate frame (i.e. a coordinate frame fixed at the center of mass of the body, and always aligned with the body's orientation) does not depend on any of the states whatsoever. For example, if the propellers are assembled such that $\vec{T}$ is always perpendicular to the plane where the propellers are, then $\vec{T}$ in the body frame is specified as $(0,0,\alpha)^T$, where $\alpha$ is the magnitude of the thrust given.

Which leads me to conclude that (since the measured acceleration doesn't depend on the states) I can't use accelerometer measurements to obtain more information about any of my states (??). This conclusion seems paradoxical to me, and that's why I ask this here. Could someone please point the mistake in my reasoning, or elucidate why this is not a paradox?

答:
I encountered the same puzzle. I had a clue at the beginning that the gravity information is contained within accelerometer measurements due to aerodynamic drag. Then I found a paper The True Role of Accelerometer Feedback in Quadrotor
Control, which had proved the idea.

My simulation also revealed the process of stabilization. As long as a quadcopter produces a thrust not counteracting gravity and therefore has a non-zero velocity, the acceleration measured by IMU is more or less different from the acceleration caused by the thrust because of aerodynamic drag, inclining to the inverse of gravity vector. That difference makes the controller aware of the instability and try to correct. After correction, the thrust gets closer to the inverse of gravity and is less able to counteract the aerodynamic drag, which result in a stronger effect of drag force on accelerometer measurements.

Note that the aerodynamic drag is so slight at low speed that a quadcopter knows little about gravity and thus depends mostly on gyro as well as human control or additional velocity/position information.


问:
Can I preload a mission into my drone (navio2) so it can execute it without being connected to a ground station by telemetry during flight
The question really speaks for itself. I don't have any way to connect with my navio2, running ardupilot, during flight (except a radio controller if things go wrong). Could I still make my drone autonomously follow a certain path, take pictures, etc. ? </p>

答:
Yes you can, see:

https://ardupilot.org/copter/docs/auto-mode.html?highlight=mission

https://ardupilot.org/dev/docs/learning-ardupilot-storage-and-eeprom-management.html

but you need to be careful to specific parameters in Ardupilot, so as not to terminate the flight inadvertently when you loss connections (caution only do this if you have a very specific reason for doing so, it can be dangerous to continue because you may loose control of your drone, i did NOT test these settings):

AFS_DUAL_LOSS:

AFS_RC_MAN_ONLY:

AFS_RC_FAIL_TIME:

AFS_MAX_COM_LOSS:

For explainations for the parameters refere to here:

https://ardupilot.org/copter/docs/parameters.html

I'am not liable about any damage you may cause by doing so!


问:
Quadcopter for modest payloads w/SDK?
I'm interested in attaching custom camera(s) to a quadcopter that can carry a modest (<0.25 kg) payload.

I prefer to write code to fly the quadcopter (e.g. traverse a region and image) rather than operate it manually.

Is this existing tech or do I need to build my own?

SDK's for quadcopters seem few and far between (DJI, Parrot, and a few others).  Most appear to be phone based, not Windows or Linux based.  I want to write code to either control from remote (e.g. PC interface) or run on the microcontroller to have it operate autonomously.  Again, is this existing tech or DIY?

Finally, most of the commercial options with SDK's don't carry custom payloads.  Only the DJI Matrice 100 seems designed for custom sensors.  Is this a proper assessment or are there more options?

答:
You need not write code unless you really want to (i would strongly advise against it), all platforms related to APM/PIXHAWK will do so, are opensource and proven to work, essentially you can get the information about these things here:

https://ardupilot.org/

https://github.com/ArduPilot

https://px4.io/

https://github.com/PX4/Firmware

Now you only need to chose an existing platform and integrate it, have fun and remember to be cautious about the documentation, it is not perfect and the learning curve can be steep, but for simple solutions you should find something for you, or create your own custom solution as countless have done. (it is linux, windows, mac, mobile, etc.)

Title: Quadcopter for modest payloads w/SDK?


问:
AprilTag vs Aruco markers
AprilTag and Aruco are both popular methods for vision-based fiducial marker pose estimation.

What are the pros and cons of each fiducial marker pose estimation systems?

答:
Aruco (as implemented in OpenCV)

pros

Easy to set up (with readily available aruco marker generator, opencv & ros implementation, etc.)

fewer false detection (with default parameters)

cons

Newer versions of aruco is GPL licensed, hence opencv is stuck on an old implementation of aruco when it was still BSD.

More susceptible to rotational ambiguity at medium to long ranges

More tuning parameters

More computationally intensive

AprilTag (as implemented in apriltag_ros)

pros

BSD license

Fewer tuning parameters

Works fairly well even at long range

Used by NASA

More flexible marker design (e.g. markers not necessarily square)

Less computationally intensive

Native support for tag bundles where multiple tags are combined to form 1 tag (using multiple tags at different orientations effectively eliminates the rotational ambiguity problem)

cons

less straight forward to setup (no opencv implementation AFAIK, only ros implementation, slightly more steps to obtain markers)

more false detection (with default parameters)

Title: AprilTag vs Aruco markers


问:
Model of two link rigid manipulator
I am working on parameter estimation of a rigid two-link manipulator as shown in the picture below.

Unlike the cylindrical links shown in the above image, my robot has links of oval shape.

So the centre of mass of links is not the midpoint of the link. I tried to search for the model equation but each one assumed the cylindrical shape of the links and the centre of mass as the centre of the link.

What I know till now is that we write Langragian equation
$$L=K E-P E$$
And then derive the torque equation using
$$
\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}}\right)-\frac{\partial L}{\partial q}=\tau
$$
I referenced these papers
2 Dof Manipulator Dynamics,
Parameter Estimation of Manipulator Robot Dynamics.

Even though both have considered the same robot structure with the same joint type and link shape, they both have different model equation. The former (page 6 to 9) has considered the length of the links while the latter (page 22) has considered the centre of mass of the links.

Which one is correct for my robot? How should I derive the model for a rigid two-link manipulator with oval-shaped links?

答:
Those two papers have a different equation for the same robot because they have taken different assumption. The first paper has considered the centre of mass to be at the end of the link, and the other paper has considered the centre of mass at the middle of the link.

Now the dynamics of any two-link manipulator irrespective of the link shape is
$$
    \tau = H(q)\ddot q + C(q,\dot q)\dot q + G(q)
$$
$$
    \begin{bmatrix}
    \tau_1 \\
    \tau_2 \\
    \end{bmatrix}
=  \begin{bmatrix}
    I_1 + I_2 + m_2l_1^2  + 2m_2l_1l_{c2}cos(q_2) & I_2 + m_2l_1l_{c2}cos(q) \\
    I_2 + m_2l_1l_{c2}cos(q) & I_2 \\
    \end{bmatrix}
    \begin{bmatrix}
    \ddot{q}_1\\
    \ddot{q}_2 \\
    \end{bmatrix} \\
+
    \begin{bmatrix}
     -m_2l_1l_{c2}\dot{q}_2sin(q_2) & -m_2l_1l_{c2}(\dot{q}_1 +
     \dot{q}_2)sin(q_2)\\
     m_2\dot{q}_1l_1l_{c2}sin(q_2) & 0
    \end{bmatrix}
    \begin{bmatrix}
    \dot{q}_1\\
    \dot{q}_2 \\
    \end{bmatrix} \\
+
    \begin{bmatrix}
    m_1gl_{c1}sin(q_1) + m_2g(l_1sin(q_1) + l_{c2}sin(q_1 + q_2))\\
    m_2gl_{c2}sin(q_1 + q_2) \\
    \end{bmatrix}
$$

Here $I_1$ and $I_2$ are the moment of inertia about the rotating axis of link-1 and link-2 respectively. $l_{c1}$ and $l_{c2}$ are the centre of mass of the two links.  Moment of inertia can be calculated by any CAD software or separating the shape of link into basic shape and finding the moment of inertia by the composite method as mentioned in the other answer.

Now, the derivation of this dynamic is simple. Proceed with the Lagrangian equation and differential equation as written in the question. The Kinetic and Potential energy should be about the centre of mass of the links.
For more information read this book Introduction to Robotics chapter 7.

Title: Model of two link rigid manipulator


答:
When you have an encoder with sufficient resolution, you can just take the first difference (to get a velocity measurement), and then use a PI or PID controller for velocity.

In my experience, because you're basically taking the derivative before you wrap the thing with control, just a PI controller will be plenty.  The only exception to this would be if you're driving something that's got complicated dynamics (and then things may get weird, because you'd essentially be taking the derivative twice).

Title: Implementation of Velocity Control Algorithm Based on PID

Body:
I'm very familiar with the traditional position form of PID. The error is just the difference between some setpoint encoder value and the current encoder value. Although this suffices for basic autonomous routines, it would definitely be more powerful to control the motors' velocities. Thus I'm here now trying to implement velocity PID.

Error is probably going to be the difference between some desired encoder value change over time and the current change of encoder values over some known time. However, as the motor reaches that desired velocity, the error goes down (who would've thought), but because the output is proportional to the error (again, who would've thought), the motors logically begin to slow down. That's one problem, the motors have to keep up their outputs to stay at a velocity, not slow down as they get closer.

My first idea was to implement some kind of feedforward to estimate the velocity then let I and D do the rest of the work to get the motors at the exact desired velocity. But is that really industry standard or something, like I would be eliminating P.

Another idea was to take the derivative of the position form of PID (found it at this site: https://www.controleng.com/articles/the-velocity-of-pid/)

I've tried looking for alternatives to these two methods (my possibly very jank way and the probably more formal and accepted way). And oh god, I still have filtering sensor data to think about.

So my question:

How do I implement velocity PID in order to control my motors' velocity? Which algorithm should I use?


答:
but because the output is proportional to the error (again, who
  would've thought), the motors logically begin to slow down. That's one
  problem, the motors have to keep up their outputs to stay at a
  velocity, not slow down as they get closer.

Theoretically and practically, even for simple systems, the error never really is exactly zero at all times, for nonzero setpoint.

If you are using a PID controller (not just P controller), then even if error $e = 0$ the other terms may be nonzero:
$\int e \neq 0 $ or $\frac{d}{dt}e \neq 0$.

If all the PID terms become zero, the input to the motor will be zero and the velocity will drop. But as soon as it deviates from the setpoint, the error becomes nonzero, and the PID will again come into action. There is some delay between the error computation and the output of the system. So error won't be zero at all times.

You can implement the PID controller as usual. Tune it such that the error minimizes. You can plot the setpoint velocity and the motor velocity to see the controller performance.


问:
How should i select motor and blades for my Hexacopter?
I'm designing a fluid sprayer Drone (HEXACOPTER) for Agriculture as my college final year project. The capacity of the fluid spraying unit including fluid & Sprayer around 2kg. I don't know how to select motor and blades. Can you suggest to me what motor and blade can be used for my project? within 30k. Thank you.

答:
Motor and blades must be selected on the basis of amount of thrust required. Estimation of thrust of a motor depends on battery voltage, prop size and motor choice. Changing one of these will change the amount of thrust generated.

Motors must be purchased from the manufacturers providing thrust tables that shows how many grams of thrust will be generated for different variables mentioned above.

Let us assume that there is a thrust value of 670 grams for a 1045 prop at 11.1 volts  and 490 grams for a 8045 props at 11.1 volts according to the thrust table of a specific motor. Further the required thrust to weight ratio for the aircraft to fly is 2:1 then, the total thrust produced by 8045 props will be 490×6=2940 grams and that by 1045 props will be 670×6=4020 grams.
Assuming the total weight of the aircraft to be 1.5 kilograms, a total thrust of 2940 would be pretty close to what is required for the craft to fly.

This is just an example to help understand the concept behind. You can adopt this approach to choose correct parts for the specifications provided by you.
Coming to the cost part which you want to be <=30k rupees is something no one can assure because the cost of the parts will differ from manufacturer to manufacturer and there might be other factors involved into it like customs. So, you will have to compare the prices on your own or you can check with various forums to get used parts for a cheaper price for overall cost reduction.

Hope this helped ;)
Happy flying!!


问:
CNC: Linear motion without timing belt or lead screw
Is it possible to build a CNC whose Linear motion system does not contain any timing belt(pulley) or lead screw(threaded rod).
I was wondering whether I could directly control the Linear motion by securing wheels of a slider onto aluminum rails & directly connecting the wheels to a stepper motor.

The main objective of this question is to find the cheapest method for controlled Linear motion.

答: Use a robot vacuum with mapping ability. Ramp up battery and find a friend than can code . That way you could get that sort of size for way under 4000$. Simple fix. Can be made accurate with RFID sensors and will give you limitless boundaries in theory.  Just a thought</p>


问:
Finding inverse kinematics algorithm for a specific manipulator
I need to find a way to solve invrese kinematics for Comau SMART-3 robot. Could you give me a few hints where to start looking? I have no idea about robotics and I couldn't find an algorithm for this specific robot.</p>

答:
From my side, I believe the Robotic toolbox provides a trajectory map and it might be useful with it to find the inverse kinematics of the manipulator.

MATLAB: https://ch.mathworks.com/help/robotics/ug/inverse-kinematics-algorithms.html


答:
Depending on how deep you want to dive in to this topic, I can recommend the book by Peter Corke (http://petercorke.com/wordpress/). It should be in stock in most universities. One may complain, that it simplifies some points every now and then, but for the entry level it is the weapon of choice, in my opinion.

Further, for modelling a robot, it might be valuable to understand Denavit–Hartenberg parameters (also covered in the previously mentioned book).

Title: Finding inverse kinematics algorithm for a specific manipulator

Body: I need to find a way to solve invrese kinematics for Comau SMART-3 robot. Could you give me a few hints where to start looking? I have no idea about robotics and I couldn't find an algorithm for this specific robot.</p>


问:
Can I use 3 blades instead of 2 blades with the same pitch and dia to increase the thrust of my motor?
Can I use 3 blades instead of 2 blades with the same pitch and dia to increase the thrust of my motor? Will it burn my motor? or it will damage my ESC? Some motors are having high torque but low rpm, others have low torque with high rpm. Is it possible to increase my thrust power without damaging the motor and ESC? will it efficient to hover my copter? </p>

答:
Increasing the number of  blades in the props increases the amount of thrust generated but at the cost of efficiency i.e. more current will be drawn as we increase the number of blades. This is due to addition of weight and also because of increased drag, as each blade will have to cut through the turbulent air from more preceding blades which will result into lesser flight time as the battery will be consumed very quickly.

The thrust is increased due to increased surface area by the addition of extra blades which means you can lift same amount of weight with shorter dia props.

Further addition of blades slightly improves the control over the aircraft which might be required for racing multi rotor crafts or for indoor flying of smaller UAVs.

But generally speaking a two blade prop is better option as compared to three blade because we do not want to overload the motor and make it draw more current which might result into heating issues and even burning of ESCs.

You can further read about props from here to get a better understanding of the concept.


问:
How to use artificial potential function in manipulator path planning?
The artificial potential method always takes robot as a point, if the manipulator is 6 degrees of freedom, how to use this method in path planning while six links can avoid the collision.</p>

答:
The artificial potential function correctly treats the robot as a point. It is the end-effector that is to be considered as the point object to be planned for while the rest of the manipulator kinematic chain is only considered to determine the free configuration space.

When the planning algorithm determines an end-effector's cartesian coordinate,  you should employ collision checking algorithms (like the  Gilbert–Johnson–Keerthi distance algorithm available in open-source packages like Flexible Collision Library(FCL) or Bullet) to determine if the pose lies in the free configuration space or not. If the pose belongs to C-free, then it is added to the path else a new point in the vicinity is proposed and same steps are repeated.


问:
Can I screw directly into the iRobot Create 2 chassis rather than using the mounting holes indicated on the green cover?
Hi I'm trying to mount a few things to the iRobot Create 2 and I wanted to secure it to the robot in a better way than the holes indicated on the green cover! Because once I drill does holes, how am I actually going to secure anything to the cover and not drill into the plastic chassis underneath? Maybe heatsets would work but I hope that's not the solution because the green cover is quite thin. So After tearing the whole thing down a few times, I thought of using the existing screw holes for the chassis. I know that they are meant to be self-tapping plastic screws (thanks iRobot!!!) but I'm pretty sure I found the thread size for them which is No. 4 (https://www.mcmaster.com/99461a140). I just wanted to see if anyone has done this before and what kind of results they got by mounting right to the chassis. </p>

答:
I think you may have answered your own question here, but in case you're looking for reassurance, I don't see any reason why you couldn't use the bosses that already exist; iRobot provides their locations here. I have seen projects where others use them, though I usually use inserts pressed into the cover, or else 3D-print a replacement bin. If you do use the existing bosses, be careful not to strip them, since as you pointed out, they're self-tapping screws. I suppose if you were feeling adventurous, you could take the top cover off and replace some of the bosses with heat set machine screw inserts...

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.


问:
Torque calculation for a shaft end effector
I would like to calculate the max torque and the rpm to select the right motor.
the application does not require a very fast rotation speed (rpm) however it should be accurately controlled.
I understand that the torque $T = L*m*g$, also it is $T = I*{\alpha}$
and if not mistaken the inertia in this case $I = 1/2 *MR^2$
but what would be the right way to implement these equations in this case, as the axis of rotation is about the shaft itself.

答:
I will try share some light in this matter.

Your understanding of the torque is only valid when the distance vector is not parallel with the axis of rotation (in your case is parallel). In your case that L is not the distance that you should consider for your problem, only the inertia generated by the added mass/payload.

Is the center of mass of the payload (7kg) aligned with the rotation axis of the shaft ? If not, then you should consider the parallel axis theorem to add the corresponding inertia. You can get these inertia parameters from a CAD software or by approximating the shape of your part with a basic shape like a cylinder or cube.

To consider the torque needed to move it also consider what is the position that it is mounted, like horizontal, vertical or other angle. Then, you can add the torque needed from the gravity payload.

You should also consider the reduction added by the gearbox which increase/decrease the torque in the shaft and decrease/increase the velocity depending on the configuration you have. The motor inertia in the shaft should be multiplied by the gearbox ratio ^2 .

Later you can consider acceleration and deceleration needed for your application.


问:
Autonomous car steering using IR sensors
I want to steer a RC car in a straight line.The car has 4 sharp IR sensors on each corner of the car to help it steer the corridor.The corridor is irregular and looks something similar to the picture below.

The car needs to be stay exactly at the middle(shown by lighter line) and take help of the IR sensors to correct its path.

The car has a servo on the front wheel to steer and another that controls the speed.

I tried running it using a algorithm where it summed the values on each side of the car and took the difference.THe difference was then fed to a pid control the output of which went to steer the car.The greater the value from the pid (on either sides), the greater the value of the steering angle till it reaches the middle.

It works for the part where the walls are at similar distance from the center and even then it oscillates a lot around the center and fails miserably around the bumps in the corridor.

I need to make changes to the algorithm and need some help in steering me  in the right direction.

The IR sensors are too finicky and is there a way to filter out the noise and make the readings more stable?

Any help regarding the changes that needs to be implemented is much appreciated.

Currently the car only uses 4 IR sensors to guide.I can also use 2 ultrasonic sensors.

答:
I had problems with servo jitter and power surges when the motors where running which reset the Arduino I was uisng.
I sorted the problem by using capacitors on my servo & main power rails. My thinking is that you have the same type of noise affecting the IR sensors.
Take a look at these posts on Let's Make Robots which should help you track down the source of the noise.

http://letsmakerobots.com/node/23297

http://letsmakerobots.com/node/5549

http://letsmakerobots.com/node/3880

If you use the ultrasonic sensors there is a good library for the Arduino called NewPing which has good function within as it can be set a maximum distance to scan for. So if you know the width of the corridor you could half it then set a flag when reading within or outside that range


问:
gazebo import robot gives error
I'm trying to import the tutorial robot given at this link

However this gives the following error:

```<code>Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov]
Error [Param.cc:181] Unable to set value [0,100000001] for key[near]
Error [parser_urdf.cc:2635] Unable to call parseURDF on robot model
Error [parser.cc:278] parse as old deprecated model file failed.
Error [parser_urdf.cc:2635] Unable to call parseURDF on robot model
Error [parser.cc:278] parse as old deprecated model file failed.

Error [parser.cc:278] parse as old deprecated model file failed.
</code>```

This sugest something is wrong with parsing but does not actually point towards any line of my code (the example is only 103 lines long).

```<code>    <link name='chassis'>
      <pose>0 0 .1 0 0 0</pose>
      <collision name='collision'>
        <geometry>
          <box>
            <size>.4 .2 .1</size>
          </box>
        </geometry>
      </collision>

      <visual name='visual'>
        <geometry>
          <box>
            <size>.4 .2 .1</size>
          </box>
        </geometry>
      </visual>

      <collision name='caster_collision'>
        <pose>-0.15 0 -0.05 0 0 0</pose>
        <geometry>
          <sphere>
          <radius>.05</radius>
        </sphere>
      </geometry>

      <surface>
        <friction>
          <ode>
            <mu>0</mu>
            <mu2>0</mu2>
            <slip1>1.0</slip1>
            <slip2>1.0</slip2>
          </ode>
        </friction>
      </surface>
    </collision>

    <visual name='caster_visual'>
      <pose>-0.15 0 -0.05 0 0 0</pose>
      <geometry>
        <sphere>
          <radius>.05</radius>
        </sphere>
      </geometry>
    </visual>
  </link>
  <link name="left_wheel">
    <pose>0.1 0.13 0.1 0 1.5707 1.5707</pose>
    <collision name="collision">
      <geometry>
        <cylinder>
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <cylinder>
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </visual>
  </link>

  <link name="right_wheel">
    <pose>0.1 -0.13 0.1 0 1.5707 1.5707</pose>
    <collision name="collision">
      <geometry>
        <cylinder>
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <cylinder>
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </visual>
  </link>
  <joint type="revolute" name="left_wheel_hinge">
    <pose>0 0 -0.03 0 0 0</pose>
    <child>left_wheel</child>
    <parent>chassis</parent>
    <axis>
      <xyz>0 1 0</xyz>
    </axis>
  </joint>

  <joint type="revolute" name="right_wheel_hinge">
    <pose>0 0 0.03 0 0 0</pose>
    <child>right_wheel</child>
    <parent>chassis</parent>
    <axis>
      <xyz>0 1 0</xyz>
    </axis>
  </joint>
  </model>
</sdf>
</code>```

This is on ubuntu 14.04. Is there any hint at what I'm doing wrong or what information can I provide to better come to a solution

答:
For someone who will investigate this issue.

If you created a model with two link but without joint between them, you will get parse issue:

```<code>Error [parser_urdf.cc:XXXX] Unable to call parseURDF on robot model
Error [parser.cc:XXX] parse as old deprecated model file failed.
</code>```

Title: gazebo import robot gives error

Body:
For someone who will investigate this issue.

If you created a model with two link but without joint between them, you will get parse issue:

Error [parser_urdf.cc:XXXX] Unable to call parseURDF on robot model
Error [parser.cc:XXX] parse as old deprecated model file failed.


问:
Dynamixels (AX-12A) no longer detected after id change
I have 8 dynamixels that are connected together. Everything worked fine until I changed all their ids to 200,201,202, ... To change their ids, I used this python library. Now, none of my motors are detected. I tried testing one motor at a time and I have the same results for all motors.

I tried running factory_reset.py from DynamixelSDK and the script returned:

Succeeded to open the port

Succeeded to change the baudrate Now the controller baudrate is : 1000000

[ID:001] Try factoryreset :

Aborted

[TxRxResult] There is no status packet!

Any idea why I have this error, and how I can fix this? Thank you.

答: Try a for loop with all possible ids until it is detected. </p>


问:
Connected battery, esc and motor does not power up the arduino
I am currently doing my first arduino project and i am having trouble finishing it.

I have a 3s lipo battery connected with an esc (120A) that is connected to a motor (270KV). From the esc i am connecting two jumper cables that goes to GND and pin 9.
I do not have a jumper cable on the red wire from the ESC.

This is how it looks:

Below you can see a link to a sketch that I found online. The only difference compared to my schematic is that I have an Arduino Uno.

When I insert the battery and switch the ESC to "on" the ESC starts up correctly and the fan starts to go. But the arduino does not get any power. It is still "OFF".

I also noticed that my motor has 4 cables. 3 "bigger" cables that goes to the ESC's 3 big cables. And then a 4th one hanging loose right now because i do not quite know what to do with it. I also noticed there is a hole in the ESC where I can insert this. The hole has 6 "inputs" however where as the loose wire from the motor has 5. Therefor I am a bit concerned if that should be connected there or not.

So to summarize, the problem is that the Arduino does not turn "ON" with my current schematic.
Any help, tips is very appreciated!!

答: You need the power for Arduino Uno which you could get it from the ESC's red wire and connect it with vin pin.</p>


问:
State-dependent Covariance in the Kalman Filter
When using a Kalman filter, one of the variables that must be defined is a matrix representing the covariance of the observation noise. In the implementations I have seen, this matrix is defined once, and that same matrix is then used throughout the algorithm, each time an update step is taken.

However, in my particular problem, I am able to get a state-dependent covariance of the observation noise. This is because instead of using the raw observation, I actually use the observation to predict the state (using some machine learning), and this prediction itself comes with a known uncertainty. This is effectively equivalent to treating the state prediction as my "observation", and the uncertainty from this prediction as the covariance of the observation noise.

So, in the update step of the Kalman filter, could I use this state-dependent noise covariance, such that each update would use a different covariance matrix? Or does this invalidate all the maths, and I really do need to use a fixed covariance matrix for the entire algorithm?

答:
The math is generally only done out for a fixed covariance matrix, so yes you would be invalidating the math. If you had an analytic solution, or at least bounds, for how your covariance changes it might be possible to redo the math to either prove the normal equations still have the same guarantees or give updated equations.

That said, in practice the covariance matrix is often treated as a tuning variable rather than real observation covariance. Even worse, nonlinear Kalman filters also invalidate the math. Both situations are very common, though, and have proved to work well when experimentally tuned. Generally all you are loosing is optimality and perhaps a narrower operation window.


问:
Angular velocity in terms of quaternions
Im reading Theory of Applied Robotics, 2nd edition by Jazar, specifically section 7.1, example 207 on page 390. The author is trying to express angular velocity by unit quaternions. Starting from quaternion representation of rotation
\begin{equation}
{}^G \mathbf r = e(t) {}^B \mathbf r e^*(t) \tag{1}
\end{equation}
where $e$ is unit quaternion and $e^*$ is its inverse. Using product rule for derivative and $(1)$ we get
\begin{align}
{}^G \dot{\mathbf r} &= \dot e {}^B \mathbf r e^* + e {}^B\mathbf r \dot{e}^*\\
&= \dot e e^* {}^G \mathbf r + {}^G \mathbf r e\dot{e}^*\\
&= 2\dot e e^* {}^G \mathbf r
\end{align}

Author states that 3rd equality comes from orthogonality property of unit quaternion $ee^* = 1$ which produces, using product rule
\begin{equation}
\dot e e^* + e \dot{e}^* = 0
\end{equation}
Using this we should get
\begin{align}
{}^G \dot{\mathbf r} &= \dot e {}^B \mathbf r e^* + e {}^B\mathbf r \dot{e}^*\\
&= \dot e e^* {}^G \mathbf r + {}^G \mathbf r e\dot{e}^*\\
&= \dot e e^* {}^G \mathbf r - {}^G \mathbf r \dot e e^*\\
\end{align}
so apparently to get $2\dot e e^* {}^G \mathbf r$ in the end it should be that
\begin{equation}
- {}^G \mathbf r \dot e e^* = \dot e e^* {}^G \mathbf r \tag{2}
\end{equation}
I'm looking for an answer that explains how do we derive $(2)$

答:
This is given:
\begin{align}
{}^G \dot{\mathbf r} &= 2\dot e e^* {}^G \mathbf r
\end{align}

And also:

\begin{align}
{}^G \dot{\mathbf r} &= \dot e e^* {}^G \mathbf r - {}^G \mathbf r \dot e e^*\\
\end{align}
Equating both one has:
\begin{align}
2\dot e e^* {}^G \mathbf r &= \dot e e^* {}^G \mathbf r - {}^G \mathbf r \dot e e^*\\
\end{align}

\begin{align}
\dot e e^* {}^G \mathbf r &= - {}^G \mathbf r \dot e e^*\\
\end{align}
The last equation is $(2)$.


问:
How to open a sliding window?
I live in an apartment that has sliding windows in it. The apartment is naturally warm because we live above a mechanical room, such that we either opened the windows or ran the air conditioning through the winter. I want to create a device than can open and close the windows in the apartment depending on temperature. The software and electronics are already figured out, I just need to figure out how to move the windows.

This is a sample of the window. It takes about 4 lbs of force to pull it open, and they only open 6 inches(since I'm 16 stories high).

Ultimately, I want to make this cheap enough that I could replicate it on 6 windows.

My first thought was a linear actuator, but most of the ones I have seen are designed for moving 100+lbs and cost several hundred dollars. Pneumatic actuators are cheaper, but I'd have to run a network of air lines and solenoids, and would have a compressor that would randomly kick in. A double winch system would be very complicated to set up and prone to failure. Lastly, I was thinking of a cheap metal gear servo(dealextreme has 15kg/cm servos for under $15.00), but it would be somewhat difficult to use a series of turnbuckles and arms to translate into 6 inches of linear movement.

Any help would be appreciated.

答:
You could try this:
Using wire cable; mount pulleys at each corner of window; then get a suitable motor for your pull requirement (4lbs). wind the cable around the motor shatft then power forward/backward to Maybe use a block and tackle arrangement for increased torque. Don't forget the need for limit stop switches.

This could be cheaper than screw method but might not have same look and feel

Title: How to open a sliding window?


问:
In a Kalman filter, what should be included in the state, and what should be included in the control?
Let's say I am controlling a robot using a velocity controller. This involves specifying a target velocity for the motors, which is achieved using a PID controller (the low-level details of this PID controller are hidden from me, since it is built into the robot). I now want to use a Kalman filter to estimate the true position of the robot. In a Kalman filter, you need to define your state vector, and optionally your control input vector. What should I use as my state vector, and what should I use as my control vector?

The reason why I am unsure is due to the fact that I am using a velocity controller. So, the robot's velocity could be part of its state -- but it could also be part of the control vector.

One option is that I could define the state vector as [robot_position, robot_velocity], where robot_position is the estimated position, and robot_velocity is the target velocity from the velocity controller. And I would not use a control vector. The prediction of the next state would be (robot_position + robot_velocity * time).

Another option is that I could define the state vector as [robot_position], and then define the control vector as [robot_velocity]. The prediction of the next state would be similar to above, but that robot_velocity would come from the control vector, rather than the state vector.

A third option would be to define the state vector as [robot_position, robot_velocity], and then define the control vector as [robot_velocity]. So, both the state and control vectors include the robot's velocity. But I'm not sure how the prediction step would then be calculated -- would the robot's velocity in the next step be based on the control velocity, or the previous robot velocity? Or both?

Can somebody please explain which of these is the right approach? I'm just generally quite confused about the difference between the state and the control input, for the case where you have a controller in the loop which directly controls one of the components of the state vector.

答:
There are many valid ways to approach this. I think the most straight forward way is to have a kalman filter that has a state vector of position and velocity. The control input is used within the kalman filter propagation step. Assume that the tracking controllers will follow your command with some time constant t. Using your commanded velocity, you will be able to propagate the estimated position and velocity across dt using the commanded control input.

The design of the control input should be separate for now. The kalman filter does not need to know how you calculated the commanded velocity, all it needs is the commanded velocity and how that will change the states being estimated.


答:
The maths of the Kalman filter depend on a dynamic Ricatti equation. Under some assumtions about the covariance matrices, this dynamic equiation is stable and converges to a solution. The Kalman filter implementation that you must likely know, obtains the filter gain (also known as Kalman gain) by using the solution of the Ricatti equation for the (user) given convariance matrices.Ths produces a simpified steady state filter implementation which is the most widely used version of the Kalman filter.

As @ryan0279 mentioned, the simplified steady state solution has certain mathematical properties that make the filter have some very nice stability and performace characteristics. If you implement the filter differently, these characteristics might no longer hold. You might end up with an unstable filter.

Nevertheless, this does not mean that you cannot implement the filter using a time-varying model or covariance matrices. Heck, the widely used version of the nonlinear version of the Kalman Filter (Extended Kalman Filter kind of does that. Of course stability is not guaranteed for these kind of implementations, but people use them any way because in many use cases they just work.

A way to implement what you want is to solve the dynamic ricatti equation of the Kamlan filter along with your filter dynamics, similar to how the Hybrid Kalman Filter is implemented. Then on each iteration of the ricatti equation solution, update your convariance matrices however you like. Just beware that you are entering the nonlinear domain and you might endup getting weird results and unstable estimates. But maybe after some tuning and testing all your operating conditions you are able to make it work fine.

Title: State-dependent Covariance in the Kalman Filter

Body:
When using a Kalman filter, one of the variables that must be defined is a matrix representing the covariance of the observation noise. In the implementations I have seen, this matrix is defined once, and that same matrix is then used throughout the algorithm, each time an update step is taken.

However, in my particular problem, I am able to get a state-dependent covariance of the observation noise. This is because instead of using the raw observation, I actually use the observation to predict the state (using some machine learning), and this prediction itself comes with a known uncertainty. This is effectively equivalent to treating the state prediction as my "observation", and the uncertainty from this prediction as the covariance of the observation noise.

So, in the update step of the Kalman filter, could I use this state-dependent noise covariance, such that each update would use a different covariance matrix? Or does this invalidate all the maths, and I really do need to use a fixed covariance matrix for the entire algorithm?


答:
A definition of the cross product for quaternions is $$p \times q = \frac{1}{2}(pq - qp)$$

We also have the identity (3.167) in Jazar $$pq = -p \cdot q + p \times q$$

Apparently the vectors $ \dot{e}\overset{\ast}{e} $ and ${}^Gr$ are orthogonal, so their dot product is zero and we have: $$\dot{e} \overset{\ast}{e}{}^Gr = \dot{e} \overset{\ast}{e} \times {}^Gr = \frac{1}{2}(\dot{e}\overset{\ast}{e}{}^Gr - {}^Gr \dot{e}\overset{\ast}{e})$$ which can be rewritten as $$ 2\dot{e}\overset{\ast}{e}{}^Gr =  \dot{e}\overset{\ast}{e}{}^Gr - {}^Gr\dot{e}\overset{\ast}{e}$$ and thus $\dot{e}\overset{\ast}{e}{}^Gr = - {}^Gr\dot{e}\overset{\ast}{e}$.

(footnote: I found this PDF somewhat helpful.)

Title: Angular velocity in terms of quaternions

Body:
Im reading Theory of Applied Robotics, 2nd edition by Jazar, specifically section 7.1, example 207 on page 390. The author is trying to express angular velocity by unit quaternions. Starting from quaternion representation of rotation
\begin{equation}
{}^G \mathbf r = e(t) {}^B \mathbf r e^*(t) \tag{1}
\end{equation}
where $e$ is unit quaternion and $e^*$ is its inverse. Using product rule for derivative and $(1)$ we get
\begin{align}
{}^G \dot{\mathbf r} &= \dot e {}^B \mathbf r e^* + e {}^B\mathbf r \dot{e}^*\\
&= \dot e e^* {}^G \mathbf r + {}^G \mathbf r e\dot{e}^*\\
&= 2\dot e e^* {}^G \mathbf r
\end{align}

Author states that 3rd equality comes from orthogonality property of unit quaternion $ee^* = 1$ which produces, using product rule
\begin{equation}
\dot e e^* + e \dot{e}^* = 0
\end{equation}
Using this we should get
\begin{align}
{}^G \dot{\mathbf r} &= \dot e {}^B \mathbf r e^* + e {}^B\mathbf r \dot{e}^*\\
&= \dot e e^* {}^G \mathbf r + {}^G \mathbf r e\dot{e}^*\\
&= \dot e e^* {}^G \mathbf r - {}^G \mathbf r \dot e e^*\\
\end{align}
so apparently to get $2\dot e e^* {}^G \mathbf r$ in the end it should be that
\begin{equation}
- {}^G \mathbf r \dot e e^* = \dot e e^* {}^G \mathbf r \tag{2}
\end{equation}
I'm looking for an answer that explains how do we derive $(2)$


问:
Doubt on artificial potential field
I am studying motion planning, and I am focusing on artificial potential fields. I have seen that it consists in having a repulsive field for obstacles, and an attractive field toward the goal.

But what I don't understand is if this motion planning method creates a path which can be tracked, or it is just a matter of potential fields, and so the robot moves accordingly to them and not on a path.

Can somebody help me understand this?

答:
It is a bit of both. The repulsive potentials help create a way to represent an environment that is conducive to planning. In the area of repulsive potentials, a simple gradient descent from a point will take you to the minimum, i.e., some collision free point.

At the same time, the attractive potential increases as you move away from the goal, so attempting to minimize that function will eventually lead you towards the goal. For any given goal state, minimizing both these potentials will result in a path that can then be tracked using a controller of your choice. For a more intuitive understanding, you might want to look at a sample implementation:

Potential fields from the PythonRobotics repository

Howie Choset's slides

Title: Doubt on artificial potential field


问:
Yaw from IMU acceleration
When IMU is gravity aligned, yaw is not observable from linear acceleration data.

However, when IMU has non null pitch, the sensor is not gravity aligned anymore and the gravity acceleration gets remapped on other axes.

Question: how do you compute the yaw angle from linear acceleration data when the pitch is not null (and therefore yaw is observable)?

Thank you in advance

答: Yaw is not observable from gravity regardless of pitch.</p>

Title: Yaw from IMU acceleration


问:
Construct Configuration-Space with Obstacles for arbitrary Object/Robot in Motion Planning
I found that a configuration-space approach is a elegant way to describe problems in motion planning.
However, I was not able to find a known general way to construct configuration-spaces.
By general I mean: arbitrarily shaped object, arbitrary amount of degrees of freedom.

To give an example:
Lets assume I can parameterise an object and a space which includes obstacles. Assuming that this object is rigid we have 6 degress of freedom. (Idealy I would like to also include non-rigid object, i.e. with  additional joints). This object now moves in a space which is partially blocked by arbitrary obstacles

Now:
How can I construct the configuration space which only includes allowed configurations (not reachable, but allowed)?

For simple problems, one can construct them "by hand".
However, I expect there to be a general way how to do this.

My best idea, so far, was to sample all possible (discretised and hence finite) configurations and check whether they are overlapping with any obstacle i.e. with the help of point clouds. However, I feel like there should be a better way.

How is this handled in modern robotics?

Thank you!

答: The Minkowski sum is used to generate the configuration space in many applications. On Slide 45 of this presentation you can find an example for using the Minkowski sum to generate the configuration space for the piano mover problem. </p>