问:
Using 3D graphics animate the robot in Matlab GUI
I have seen this example ( http://in.mathworks.com/matlabcentral/fileexchange/14932-3d-puma-robot-demo/content/puma3d.m) in file exchange and want to do similar thing with 4 dof rootic arm. I follow below steps. 1. Create a very simple 4 dof roots links using Solid Works and convert it into .stl file (ASCII) by using cad2matdemo.m file and store all data manually. 2. Alter the code according to my requirements. But I'm unable to create 3d model in Matlab GUI. My code is given below.

```<code>function rob3d
    loaddata
    InitHome
        function InitHome
            % Use forward kinematics to place the robot in a specified
            % configuration.
            % Figure setup data, create a new figure for the GUI
            set(0,'Units','pixels')
            dim = get(0,'ScreenSize');
            % fig_1 = figure('doublebuffer','on','Position',[0,35,dim(3)-200,dim(4)-110],...
            % 'MenuBar','none','Name',' 3D Puma Robot Graphical Demo',...
            % 'NumberTitle','off','CloseRequestFcn',@del_app);
            fig_1 = figure('doublebuffer','on','Position',[0,35,dim(3)-200,dim(4)-110],...
                'MenuBar','figure','Name',' 3D Puma Robot Graphical Demo',...
                'NumberTitle','off');
            hold on;
            %light('Position',[-1 0 0]);
            light                               % add a default light
            daspect([1 1 1])                    % Setting the aspect ratio
            view(135,25)
            xlabel('X'),ylabel('Y'),zlabel('Z');
            title('Robot');
            axis([-1000 1000 -1000 1000 -1000 1000]);
            plot3([-1500,1500],[-1500,-1500],[-1120,-1120],'k')
            plot3([-1500,-1500],[-1500,1500],[-1120,-1120],'k')
            plot3([-1500,-1500],[-1500,-1500],[-1120,1500],'k')
            plot3([-1500,-1500],[1500,1500],[-1120,1500],'k')
            plot3([-1500,1500],[-1500,-1500],[1500,1500],'k')
            plot3([-1500,-1500],[-1500,1500],[1500,1500],'k')
            s1 = getappdata(0,'Link1_data');
            s2 = getappdata(0,'Link2_data');
            s3 = getappdata(0,'Link3_data');
            s4 = getappdata(0,'Link4_data');
            s5 = getappdata(0,'Link5_data');
            a2 = 300;
            a3 = 300;
            a4 = 300;
            d1 = 300;
            d2 = 50;
            d3 = 50;
            d4 = 50;
            %The 'home' position, for init.
            t1 = 0;
            t2 = 0;
            t3 = 0;
            t4 = 0;
            % Forward Kinematics
            % tmat(alpha, a, d, theta)
            T_01 = tmat(90, 0, d1, t1);
            T_12 = tmat(0, a2, d2, t2);
            T_23 = tmat(0, a3, d3, t3);
            T_34 = tmat(0, a4, d4, t4);
            % Each link fram to base frame transformation
            T_02 = T_01*T_12;
            T_03 = T_02*T_23;
            T_04 = T_03*T_34;
            % Actual vertex data of robot links
            Link1 = s1.V1;
            Link2 = (T_01*s2.V2')';
            Link3 = (T_02*s3.V3')';
            Link4 = (T_03*s4.V4')';
            Link5 = (T_04*s5.V5')';
            % points are no fun to watch, make it look 3d.
            L1 = patch('faces', s1.F1, 'vertices' ,Link1(:,1:3));
            L2 = patch('faces', s2.F2, 'vertices' ,Link2(:,1:3));
            L3 = patch('faces', s3.F3, 'vertices' ,Link3(:,1:3));
            L4 = patch('faces', s4.F4, 'vertices' ,Link4(:,1:3));
            L5 = patch('faces', s5.F5, 'vertices' ,Link5(:,1:3));
            Tr = plot3(0,0,0,'b.'); % holder for trail paths
            setappdata(0,'patch_h',[L1,L2,L3,L4,L5,Tr]);
            %
            set(L1, 'facec', [0.717,0.116,0.123]);
            set(L1, 'EdgeColor','none');
            set(L2, 'facec', [0.216,1,.583]);
            set(L2, 'EdgeColor','none');
            set(L3, 'facec', [0.306,0.733,1]);
            set(L3, 'EdgeColor','none');
            set(L4, 'facec', [1,0.542,0.493]);
            set(L4, 'EdgeColor','none');
            set(L5, 'facec', [0.216,1,.583]);
            set(L5, 'EdgeColor','none');
            %
            setappdata(0,'ThetaOld',[0,0,0,0]);
            %
        end
        function T = tmat(alpha, a, d, theta)
            % tmat(alpha, a, d, theta) (T-Matrix used in Robotics)
            % The homogeneous transformation called the "T-MATRIX"
            % as used in the Kinematic Equations for robotic type
            % systems (or equivalent).
            %
            % This is equation 3.6 in Craig's "Introduction to Robotics."
            % alpha, a, d, theta are the Denavit-Hartenberg parameters.
            %
            % (NOTE: ALL ANGLES MUST BE IN DEGREES.)
            %
            alpha = alpha*pi/180;    %Note: alpha is in radians.
            theta = theta*pi/180;    %Note: theta is in radians.
            c = cos(theta);
            s = sin(theta);
            ca = cos(alpha);
            sa = sin(alpha);
            T = [c -s*ca s*sa a*c; s c*ca -c*sa a*s; 0 sa ca d; 0 0 0 1];
        end
        function del_app(varargin)
            delete(fig_1);
        end
        function loaddata
            % Loads all the link data from file linksdata.mat.
            % This data comes from a Pro/E 3D CAD model and was made with cad2matdemo.m
            % from the file exchange.  All link data manually stored in linksdata.mat
            [linkdata1]=load('linksdata.mat','s1','s2','s3','s4','s5');
            %Place the robot link 'data' in a storage area
            setappdata(0,'Link1_data',linkdata1.s1);
            setappdata(0,'Link2_data',linkdata1.s2);
            setappdata(0,'Link3_data',linkdata1.s3);
            setappdata(0,'Link4_data',linkdata1.s4);
            setappdata(0,'Link5_data',linkdata1.s5);
        end
    end
</code>```

Below figure shows desired and actual comes out model.

All others thing, which may be useful (like linksdata file, sw model etc.) I shared on dropbox. Anybody can accesss from there. Dropox link:
   https://www.dropbox.com/sh/llwa0chsjuc1iju/AACrOTqCRBmDShGgJKpEVAlOa?dl=0

I want to know to connect two components in 3d model in Matla gui. Any study about this will be very helpful. Thanks.

答:
STL Files have an internal coordinate system relative to which the vertices of the mesh are expressed. You are transforming these vertices with the transformation matrix that is correct, however only in the case when the origin coordinate system of the STL file (the coordinate system relative to which the vertice coordinates are expressed correspond to the DH coordinate system attached to the linkage.

Make sure to define a coordinate system in SolidWorks which has the same origin point and orientation relative to the linkage as the Dh coordinate system has. In other words, orient the z axis towards the motion axis, etc. After this, when you export the STL file, make sure to select this coordinate system as the origin. Furthermore, make sure not to select the translate all vertices to positive option. (SolidWorks offers both these option and AFAIK the default options are not the required ones.)


问:
A sensor that can see glass/transparent objects and surfaces
I am currently thinking about making a robot that will autonomously drive around the place. The place I want this robot to drive in however contains quite a few glass walls. When mapping the area I would need to be able to see the glass. For this reason I am in need of a sensor that can see the glass, and not see through it. What kind of sensor would be the best for me? I need it to have a maximum range of about 2-10 meters and a minimum range of about 0.25 meters (preferably as small as possible). I was thinking about maybe using ultrasonic, but I was told that a laser-based sensor would probably be best. I could however only find industrial grade laser sensors that could see glass/transparent objects.</p>

答:
Do you maybe have some examples of laser-based sensors too?

I will recommend this Mini Lidar sensor that only costs $39.9

Also,you do need the ultrasonic distance sensor

ContentLicense: CC BY-SA 3.0

ContentLicense: CC BY-SA 4.0


问:
PID control while desiring steady state offset
I have a rather niche application of PID control, and I am looking for ideas on how to solve it.

Design

Temperature sensor is externally mounted on a liquid vessel's body --> T_surface

Goal is to control the liquid temperature to a variable setpoint around 35°C --> T_liquid

There are stick-on heaters mounted to the liquid vessel's body --> ability to heat the liquid --> heater_power

The liquid is cooled by just letting the vessel cool down

PID Set Up

I have a PID control algorithm with:

Feedback: T_surface

Output: heater_power

Setpoint: T_liquid

The vessel wall is thick enough that T_surface != T_liquid.

Temperature Offset

The difference in temperature is: dT = T_liquid - T_surface

Note: dT is a function of T_liquid.  For example, if:

T_liquid = ~30°C --> dT = ~1

T_liquid = ~40°C --> dT = ~2

My Implementation

I roughly mapped dT to be linearly related with T_liquid --> offset_value

I set the feedback sensor's value to be T_surface - offset_value. In other words, my input signal is a biased value of the feedback

I tuned my PID loop based on this and it works okay

Question

I realized I am basically trying to tune a PID algorithm to have a steady state offset.  The offset is a function of T_liquid.  Let's assume I know what I want offset to be.  Here are my questions:

How can I tune a PID algorithm to have a steady state offset?

Can you think of a better way to go about this?  (Assume an inability to change the mechanical design)

答: Perhaps you could encode a positive feedback system into your programming. This system would analyze the output of the PID. If the water heater is heating and the water heater was actually heating the water, the water heater would automatically draw more power, and therefore, heat more.  </p>


问:
Explanations about inverse kinematic
I am currently designing a 2D simulation of a 3DOFs robotic arm in order to develop a better understanding of inverse kinematic (so as to avoid breaking more components than necessary) but despite my numerous readings I still cannot figure out how apply it to my arm.

I tried to represent my arm joints as a combination of three circle radiuses, or using complex exponential form (I did a very simple modelization using Geogebra), but no matter the method I can't figure out how to constrain my problem.

During my research I came across this blog: Inverse kinematics of 3-link arm with constrained minimization in Python and I found the solution really elegant, but even if it feels logical, I don't understand it.

What's the math behind it? Is it based on Lagrange multiplier?

What I understand is that we want to find the appropriate combination of three angles so that the end effector of our robot ends up at the right position. I understand there are infinitely many solutions among which we want to pick the one that suits us the best, but I don't understand how.

Could you please explain me the method used in this blog?

答:
The referenced blog is called studywolf, and apart from the inverse kinematics problem ,it provides a large variety of robotics tutorials and i have it own my own watchlist as well. To the problem of the IK solver itself: the question goes into the right direction. Creating a model and visualizing it, is the first important step in robotics engineering. What the studywolf blog has described is a sequential least squares method, which was introduced in a forum post at robotics.SE a while ago.[1] The goal is to find the minimum of a function.

Another option for approaching the IK problem is the mentioned Lagrange technique.[2] It is similar to Gradient Descent [3] an optimization method for solving a system of equations.

[1] Least square method https://robotics.stackexchange.com/a/15451/14283

[2] Lagrange https://robotics.stackexchange.com/a/10258/14283

[3] Gradient Descent Solving Inverse Kinematics with Gradient Descent

Title: Explanations about inverse kinematic


问:
control DC motor by Atmega and L298 code in Atmel Studio
I'm new to Atmel Studio. I used BASCOM-AVR until now. I know my question is very basic but I couldn't solve my problem by searching internet.

I wrote a code in BASCOM (Basic laguage) to control two DC motors using ATmega32 and L298n. Here is a part of it:

```<code><span class="math-container">$regfile = "m32def.dat"
$</span>crystal = 1000000

Config Timer1 = Pwm , Pwm = 10 , Compare_A_Pwm = Clear_Up , Compare_B_Pwm = Clear_Up , Prescale = 1

'D.0 and D.1 for right, D.2 and D.3 for left
Config PortD.3 = Output
Config PortD.2 = Output
Config PortD.1 = Output
Config PortD.0 = Output

'pwm1a for left motor, pwm1b for right motor

Do
    reset portd.1
    reset portd.2
    set portd.0
    set portd.3
    pwm1b = 500
    pwm1a = 1023
    waitms 2000

    reset portd.0
    reset portd.3
    set portd.1
    set portd.2
    pwm1b = 1023
    pwm1a = 500
    waitms 2000
Loop
End
</code>```

Now I want to convert it to "C" for Atmel Studio but I can't understand syntax for PWM in C.

Also, I didn't understand the way to set just a pin to 0 or 1 (not a port). I mean, if I write (in Atmel Studio):

```<code>PORTD = 0b00001001;
</code>```

pind0 and pind3 are high and pind1 and pind2 are low but I'm worried if setting pind4...7 to 0 affects PWM (Because PD4 and PD5 are for PWM).

Could you please explane me syntax of PWM in C and answer my second question?

It would be very good if you convert my code to C and explane C by comparing it to Basic! :)

Thanks!

答:
OK. After many researches and reading some books, I found the way. Here is my code:

```<code>#include <avr/io.h>
#define F_CPU 8000000UL     //8MHz CPU frequency
#include <util/delay.h>     //To use _delay_ms()

void pwm_init()     //to initialize PWM
{
    TCCR1A = 0b10100011;     //register TCCR1A
    TCCR1B = 0b00000001;     //register TCCR1B
    DDRD = 0b11111111;     //set portd as output
}

int main(void)
{
    pwm_init();     //to initialize PWM
    //D0 and D1 for right motor, D2 and D3 for left motor
    while(1)
    {
        PORTD = 0b00000101;
        OCR1A = 1023;     //maximum
        OCR1B = 500;
        _delay_ms(2000);

        PORTD = 0b00000110;
        OCR1A = 500;
        OCR1B = 1023;     //maximum
        _delay_ms(2000);
    }
}
</code>```

In my code, because I want to control a DC motor using L298, I must use "10-BIT Phase correct PWM" mode, prescale 1 and non-inverted PWM; So that I must set register TCCR1A in this way:

COM1A1 & COM1B1: 1

COM1A0 & COM1B1: 0

FOC1A & FOC1B: 0

WGM11 & WGM10:1

And TCCR1B in this way:

CS10: 1

All other bits: 0

According to the structure of TCCR1A and TCCR1B registers, you must set them like this:

```<code>TCCR1A = 0b10100011;
TCCR1B = 0b00000001;
</code>```

And you can set PWM duty cycle by setting OCCR1A and OCCR1B variables. It's clear that minimum value is always 0! But maximum value depends on resolution of your PWM (8,9 or 10-BIT).

Note: I didn't test it using real parts yet. Just simulations show me the correct result. If there is any mistake in my code, please post it in the comments!

Body:
OK. After many researches and reading some books, I found the way. Here is my code:

#include <avr/io.h>
#define F_CPU 8000000UL     //8MHz CPU frequency
#include <util/delay.h>     //To use _delay_ms()

void pwm_init()     //to initialize PWM
{
    TCCR1A = 0b10100011;     //register TCCR1A
    TCCR1B = 0b00000001;     //register TCCR1B
    DDRD = 0b11111111;     //set portd as output
}

int main(void)
{
    pwm_init();     //to initialize PWM
    //D0 and D1 for right motor, D2 and D3 for left motor
    while(1)
    {
        PORTD = 0b00000101;
        OCR1A = 1023;     //maximum
        OCR1B = 500;
        _delay_ms(2000);

        PORTD = 0b00000110;
        OCR1A = 500;
        OCR1B = 1023;     //maximum
        _delay_ms(2000);
    }
}

In my code, because I want to control a DC motor using L298, I must use "10-BIT Phase correct PWM" mode, prescale 1 and non-inverted PWM; So that I must set register TCCR1A in this way:

COM1A1 & COM1B1: 1

COM1A0 & COM1B1: 0

FOC1A & FOC1B: 0

WGM11 & WGM10:1

And TCCR1B in this way:

CS10: 1

All other bits: 0

According to the structure of TCCR1A and TCCR1B registers, you must set them like this:

TCCR1A = 0b10100011;
TCCR1B = 0b00000001;

And you can set PWM duty cycle by setting OCCR1A and OCCR1B variables. It's clear that minimum value is always 0! But maximum value depends on resolution of your PWM (8,9 or 10-BIT).

Note: I didn't test it using real parts yet. Just simulations show me the correct result. If there is any mistake in my code, please post it in the comments!


问:
Can ROS workspace safely exist in an external HDD?
Is it safe to create and operate a ROS workspace from an external hard drive? Are there any limitations or issues I should be aware of?

Tutorials and manuals typically suggest that the workspace should be created in the home directory, but I would like to have my ROS workspace external so it can be mobile.

I'm using ROS Melodic on Ubuntu 18.04.2 LTS

I have a large HDD (formatted to ExFat) that I have intentions to use as a general mass storage drive for whatever use I intend. This drive potentially can connect to macOS, Windows 10, and Linux (I've installed compatibility software for ExFat).

Could you explain in detail if/why ExFat would not work? Are there solutions to any potential permissions problems?

答:
The use of the home directory is merely a recommendation, and is not a strict requirement, only for convenience (and convention). You can set it up anywhere that you have read and write access.

See also Workspace on USB or Package on USB

This should be perfectly possible, provided that your medium is
  formatted with a compatible file system, as permissions (on fi dynamic
  reconfigure and other executable files) are important in a Catkin
  workspace.

File systems like FAT, FAT32 and ExFat are not suitable for this.
  Something like Ext3 or Ext4 or some other FS that supports regular
  Linux file permissions should work fine.

If you use a "Windows" formatted drive, then your "Ubuntu" permissions may probably be lost, as drives formatted for Windows can not support that information. Execute and ownership permissions issues would/could arise.

It would all depend on whether you need portability in order to be able to access the workspace from a Windows machine, or if you consistently use [different] Ubuntu/Linux machines.

If you really want use an ExFAT formatted drive, then I'm not entirely au fait with the situation, as I do not use Windows at all. You probably could/would run into issues. A solution might be to delete the devel and build directories and re-run catkin_make before accessing it on the new machine1.

The use of an external drive is a good idea, portability wise. You may need to reconfigure paths when you move to another host machine though.

Another option is to have a separate user for ROS, whose entire home directory is on the external disk. You would log in as that user to have your environment ready to go. This is the method that I use. However, this requires admin access to set up your login to point to the externally mounted disk containing the home directory, prior to your logging in as the ROS user. You may not have that ability, or access.

1 See How to migrate a catkin workspace? and cannot source workspace.


问:
Stepper drive resolution
I'm asking for help on understanding stepper motor + gearbox solution, as I've got totally confused during my research on topic.

Story:

Trying to make a sort of precise turning table (at least 1°/step), I've found out that stepper motors may be a good choice, given enough step resolution.

At this point steppers with a gearbox might step in, but info on Web is somewhat different, thus messing everything up.

So, I would like to get straight answers for straight questions:

Questions:

What is the real gearbox ratio for stepper like this -
5V Stepper Motor 28BYJ-48 With Drive Test Module Board ULN2003 5 Line 4 Phase? And others, as this 1/64 (for ex.) ratio notation is quite frequent.

Reasoning: My knowledge from university correlates with Wiki article on gearbox ratio. If I'm not mistaken, ratio is usually denoted this way:

```<code>[Input Gear] : [Output Gear]
</code>```

So, if specs are true, 1 revolution of the motor shaft is 64 revolutions of the gearbox output shaft. Who would ever want such stepper?

But, my search on the Arduino forums, Geared Stepper Motor, revealed that somehow it's just the opposite.

Is it possible to get such resolution for a stepper motor? Or even higher?

Reasoning: After all, if gearbox ratio is 64:1, and motor shaft step is, say 5°, you have 360°/5°*64=4608 steps, or 360°/4608=0.078° per step overall device, haven't you?

答:
G'day,

For question 1, your knowledge of the standard convention for notation is correct. However, it's worth noting that the listing for the gearbox ratio isn't 1:64, it's 1/64, which is a slightly different notation. My understanding of this notation is the form:
 $\begin{equation}
\frac{\text{Output}}{\text{Input}} \end{equation}$. So, in order to make a full revolution at the output (1), there are 64 turns of the input.

To your second question, yes, it's definitely possible to get these resolutions, in theory. The problem is in the transmission from theory to practice. Interestingly, the people in the arduino forum post you linked are actually discussing this. It appears the motor is most commonly used for air conditioner vent actuation, and has a great deal of slop, as well as not Actually having 4096 steps per revolution. If you are intending on using this motor and gear train combination for an application that requires precise movements of the output shaft to within a degree, this may not be a good solution, especially if you're going to be applying any sort of load to it.

Title: Stepper drive resolution


问:
Should you learn assembly language for robotics?
I ask this since assembly language is really close to the micro-controller hardware, and what micro-controller would you reccomend.

The bot has to search for object that I show it before and then I 'lose' the object. Note, I do not know anything about micro-controllers.

答:
This is one of those "open-ended" questions that the moderator doesn't like.  So I'm going to leave you with some short, general answers.  These are based on over 20 years in industry designing various bits of hardware and software for embedded systems:

Learning enough about microprocessors so that assembly language programming comes naturally will be a big plus, but is not necessary.  Just knowing assembly language programming for some processor or another because you've memorized it isn't going to be very useful.

There is no one microcontroller to recommend.  There is such a huge number of factors that come into play that the correct processor for your project could be anything from a slow 8051 clone to a super-fast bazzilion-core desktop processor with liquid cooling.


问:
Lifting robot that moves like a plotter
I'm looking for what a robot that moves like a plotter but can grab a load up to 1kg with a claw, lift, rotate and place in another location within its range.  What is this type of robot called?

答: The picture is of a Gantry robot, but for your workcase you can use manipulator like ABB pick and place robot for more dexterity. </p>

Title: Lifting robot that moves like a plotter


答: Cartesian robots have the characteristic that their axes move in Cartesian (x-y-z) directions. </p>

Title: Lifting robot that moves like a plotter

Body: I'm looking for what a robot that moves like a plotter but can grab a load up to 1kg with a claw, lift, rotate and place in another location within its range.  What is this type of robot called?


问:
What parts of the flight system could you remove if you only care about flying up/down?
If you only need a drone to fly up/down, how could you simplify the flight system? What parts/propellers could you remove for instance? Could you enable a drone to fly vertically with only one propeller?

Are there any examples of drones that only fly vertically?

答:
Being honest, If I wanted to achieve this, I would get myself an open source quad-copter, and adjust the control system to apply some "Input Constraints". Basically allowing the built in stabilization system to keep the drone stable and level, while only allowing me to modify the desired altitude. Depending on how advanced the system is, it should also be able to maintain its position in the world frame and eliminate  any drift that occurs. You will not be able to create a drone that only flies up and down by removing parts from a standard quad-copter, as these sources of thrust are relied upon to keep the quad-copter stable, which is a deceptively complicated task.

To your question of  "Could you enable a drone to fly vertically with only one propeller?", to which the answer is yes, but good luck with sorting out the rotational forces from the propeller without some other source of thrust to cancel it out.

As for drones that only fly vertically, sure, there are a few. The most obvious is a Hot Air balloon, if you decide to build your own and automate it. A cheap R/C Helicopter may also do the trick (From memory, some of the old cheap ones can only fly up/down, and rotate on the spot), but they can also be quite unstable, and certainly won't maintain their horizontal position.

If you are willing to stretch your definitions a bit, a Rocket kind of counts, but you probably shouldn't make one of those.


答:
In my understanding, you are already tuning your PID to have a steady state offset, through your usage of DT, assuming your usage is similar to the first diagram here: PID Theory. Note that the feedback is subtracted from the "set point", which is very similar to what you're doing currently, by creating an offset in the sensors readings to create a kind of offset in the "set point". In theory, this should be sufficient for your current application. Perhaps more tuning of the PID parameters may help improve the plants response from "okay" to "Better than okay".

As for other methods for approaching the problem, I am personally a very big fan of State Space control. Assuming you can find a way to accurately model the system, it is a relatively simple endeavor to find the optimal control gains for your desired state. Although, this can be a bit challenging to properly grasp depending on your background, and creating a model of your plant may be difficult.

Title: PID control while desiring steady state offset

Body:
I have a rather niche application of PID control, and I am looking for ideas on how to solve it.

Design

Temperature sensor is externally mounted on a liquid vessel's body --> T_surface

Goal is to control the liquid temperature to a variable setpoint around 35°C --> T_liquid

There are stick-on heaters mounted to the liquid vessel's body --> ability to heat the liquid --> heater_power

The liquid is cooled by just letting the vessel cool down

PID Set Up

I have a PID control algorithm with:

Feedback: T_surface

Output: heater_power

Setpoint: T_liquid

The vessel wall is thick enough that T_surface != T_liquid.

Temperature Offset

The difference in temperature is: dT = T_liquid - T_surface

Note: dT is a function of T_liquid.  For example, if:

T_liquid = ~30°C --> dT = ~1

T_liquid = ~40°C --> dT = ~2

My Implementation

I roughly mapped dT to be linearly related with T_liquid --> offset_value

I set the feedback sensor's value to be T_surface - offset_value. In other words, my input signal is a biased value of the feedback

I tuned my PID loop based on this and it works okay

Question

I realized I am basically trying to tune a PID algorithm to have a steady state offset.  The offset is a function of T_liquid.  Let's assume I know what I want offset to be.  Here are my questions:

How can I tune a PID algorithm to have a steady state offset?

Can you think of a better way to go about this?  (Assume an inability to change the mechanical design)


问:
What is Natural Navigation?
While going through this Page on different types of navigations used in AGV's for Industrial Environments. I came across natural navigation which claims to reduce installation time and cost for the AGV by getting rid of reflectors, localization markers.

So what is Natural Navigation? How does it work? How does it handle Localization and Path Planning? what kind of sensors does it need?
Are there any open source implementations of this method.

Any links to research papers/tutorials are welcome

答: What they describe is normally called (markerless) SLAM. Mostly implemented with laser scanners (from Sick, Velodyne, Pepperl&Fuchs,...). Classic implementations are gmapping, cartographer or hector-slam. </p>

Title: What is Natural Navigation?


答:
In general you don't need to learn assembly to be able to program a microcontroller. As long as you know C, it's enough for you.

Knowledge of assembly of course would help. Specifically, it would help in writing optimized code (or rather, not writing stupid code) as well as having a good estimate of how fast or slow a piece of code could be. Sometimes in very performance critical sections manipulating the assembly may also be needed, but again, in general you wouldn't be needing any of this.

Specially if you are a beginner.

Regarding microcontrollers, there is a wide variety of them, almost all of which are good and useful. Choosing a microcontroller really depends on what you want to attach to it and how complicated its software is going to be. With similar microcontrollers among different brands, I would personally pay attention to how well the microcontroller is documented and how good its compiler/IDE is. Little-explained data-sheet is a headache and a bad IDE an annoyance you don't want to deal with.

Title: Should you learn assembly language for robotics?

Body:
I ask this since assembly language is really close to the micro-controller hardware, and what micro-controller would you reccomend.

The bot has to search for object that I show it before and then I 'lose' the object. Note, I do not know anything about micro-controllers.


问:
ICP for LiDAR point cloud data in two frames
I am currently using the ICP to register Lidar point clouds in two frames. The problem is that the translation value calculated by the difference of average point values of utilized points in two frames seems not precise enough. Is there any alternative solutions to calculate the translation?</p>

答: If you are trying to register two point clouds without a proper initial guess on the alignment (6dof) than it is a global registration problem. The simplest way is combining 3D feature matchings with ICP. Find the initial guess by 3D feature matching and refine it by point-to-point or point-to-plane ICP. Open3D has some example code on that.</p>


问:
How to handle multi-sensors data?
I am new to the sensor data fusion world. I want to find room vacancy using ultrasonic, PIR, and sound sensors.

These sensors deliver binary information about the occupancy. How can I combine the decision making from these three sensors? How can I calculate a good delay time for each sensor?

答:
That is not an easy task to do. There are SLAM methods that can optimize the time delay as well. Theory can be applied in your case but you should make your own implementation.

This paper describes the basic theory that you need.

Title: How to handle multi-sensors data?


答: I think doing things probabilistically is a good approach.  You have to realize that your sensors aren't perfect.  You have to contend with things like noise, false positives, false negatives, limited field of view, etc.  Changing your view of the data from binary to probabilistic will make it easier to combine.  And you should be able to find a good book on probabilistic robotics.  </p>

Title: How to handle multi-sensors data?

Body:
I am new to the sensor data fusion world. I want to find room vacancy using ultrasonic, PIR, and sound sensors.

These sensors deliver binary information about the occupancy. How can I combine the decision making from these three sensors? How can I calculate a good delay time for each sensor?


问:
I have to implement my own SLAM algorithm
I'm studying robotics and one practice that I have to do is to implement my own SLAM system on ROS.

I need some advice about where to start.

Where do I start?

答: Where to start will very depending on your current skill-set, as well as the specifics of the course you're studying. My recommendation is start with the Extended Kalmann Filter as well as Bayesian Filtering. These will form a foundation for your SLAM (Depending on how to want to approach it). From there, I guess all you can do is have a look at what resources there are online for implementing it. I would recommend either Here or, if you can, Here. I can personally vouch for the Probabilistic robotics textbook being a fantastic resource.</p>


答:
Take some of the robotics courses of burgard wolfram. You can easily find his video lectures on his homepage. You don't need to watch all of the videos. Just watch and try to understand optimization and graph-based slam part.

I recommend you to implement graph-based slam in matlab first. Don't go for Extended Kalman Filter slam. They are outdated. The robotics courses of the above have some toy graph slam examples. Run that first, analyze the code, and make your own.

Once you are confident with the theory start to implement it in ROS. Don't try to implement something you are not 100% sure in c++ because the debugging is hell with c. Or the best way is to start with open source slams such as LOAM.

Title: I have to implement my own SLAM algorithm

Body:
I'm studying robotics and one practice that I have to do is to implement my own SLAM system on ROS.

I need some advice about where to start.

Where do I start?


问:
What is the definition of `rollout' in neural network or OpenAI gym
I'm relatively new to the area. I run into several time the term ``rollout'' in training neural networks. I have been searching for a while but still not sure what it means.

For example, the number of rollout for running the hopper environment. I'm not sure what it means.

答:
The definition of "rollouts" given by Planning chemical syntheses with deep
neural networks and symbolic AI (Segler, Preuss & Waller ; doi: 10.1038/nature25978 ; credit to jsotola):

Rollouts are Monte Carlo simulations, in which random search steps
  are performed without branching until a solution has been found or
  a maximum depth is reached. These random steps can be sampled
  from machine-learned policies p(a|s), which predict the probability
  of taking the move (applying the transformation) a in position s, and
  are trained to predict the winning move by using human games or
  self-play


问:
Drone Mapping Project
I'm mapping my college campus with a drone (as part of an approved science project). I want to film, measure the temperature, and take infrared video at the same time. What drones are good for interfacing with multiple sensors at once?</p>

答:
Autonomous drones all have a built-in GPS module, but if you need a variety of sensors, then buying a consumer grade prebuilt drone such as DJI drones aren't an option, you'll need to consider building yourself a drone.

The fundamental components that make-up a drone are the following:

Flight Controller (FC) - This is the brain of the drone, it controls the major aspects that allows the drone to fly and function properly

Power Distribution Board (PDB) - This component distributes and supplies electricity to all the components

Electronic Speed Controller (ESC) - This component plugs a motor into the flight controller (one ESC can only be utilised on one motor) the ESC converts the digital signals from the FC to analogue signals that specify how fast the motors should spin

Motors - Brushless DC motors are used to spin propellors to make the drone fly

Propellors - Attaches to the motors and provides lift as it is spun

Transmitter (TX) / Receiver (RX) - The TX is the handheld remote that communicates with the RX which is connected to the FC. You use this to communicate with the drone e.g. tell it where to go.

Frame - This is where all the components are attached to.

Battery - Most drones use Lithium Polymer (LiPo) batteries to provide power

As I'm sure about the specifics of what you require, here are broad things to look out for:

Only some FCs are compatible with GPS modules. There are many FCs and GPS modules out there but their compatibilities with each other varies.

Make sure you decide what types of sensors you'll be using so you can estimate the payload, based on the payload you'll need to decide what config you need e.g. quadcopter/hexacopter/octocopter so you know what type of frame you need.

Again, based on your payload you need to choose motors and propellers. Normally motors with lower KV ratings provide more torque than higher KV motors, but higher KV motors spin faster. When choosing motors, websites such as AliExpress includes a data sheet stating the thrust of the motors with different propeller and battery configurations.

LiPo batteries are rated by 1s, 2s, 3s, 4s, etc... each 's' provides different voltages, based on the datasheet, find the config of battery and propellers for your required thrust

Once you've chosen the motors and propellers and battery, you'll need to find out the maximum load current that the motors will draw, this is on the datasheet. And when choosing the ESCs, make sure you buy ESCs that are rated for a load current a little higher than than the load current of the motors.

Based on your set-up and requirements, you might need some sort of automation. You could make your drone autonomous by using a specific TX/RX setup with ground control so that you could create flight plans for the autonomous flights on your computer, remember only specific TX/RX and FC modules are compatible with this.

To connect your sensors and log data, a Raspberry Pi computer could be used as they are low cost and low form factor, this can be connected to a 5V output of the PDB with the rest of your sensors.

I hope this somewhat helped, try narrowing your question so that you can get more specific answers.

Title: Drone Mapping Project


问:
Why my robot is lying down in gazebo simulator?
this is my first post about ROS and Gazebo also I am new in ROS.
I spawn KUKA robot in Gazebo using urdf file from KUKA github repository
following answer from this question I spawned my urdf file in gazebo simulator and KUKA robot appeared in simulator but problem is that is lying down like is attached on floor for some reason.
Here is picture in Gazebo:

This is my launch file:

```<code><launch>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="<span class="math-container">$(find gazebo_ros)/launch/empty_world.launch">
  <arg name="paused" value="false"/>
  <arg name="use_sim_time" value="true"/>
  <arg name="gui" value="true"/>
  <arg name="headless" value="false"/>
  <arg name="debug" value="false"/>
</include>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $</span>(find kuka_kr210_support)/urdf/kr210l150.urdf -urdf -z 1 -model baxter" />
</launch>
</code>```

EDIT:
I fixed base link for the world, added transmission, controllers for each axis and gazebo plugin. now my urdf file looks like this:

```<code><?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from kr16_2.xacro                   | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<!--Generates a urdf from the macro in kr16_2_macro.xacro -->
<robot name="kuka_kr16_2" xmlns:xacro="http://wiki.ros.org/xacro">
  <!-- LINKS -->

  <!-- base link -->
  <link name="base_link">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/base_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/base_link.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- link 1 (A1) -->
  <link name="link_1">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/link_1.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/link_1.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- link 2 -->
  <link name="link_2">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/link_2.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/link_2.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- link 3 -->
  <link name="link_3">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/link_3.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/link_3.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- link 4 -->
  <link name="link_4">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/link_4.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/link_4.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- link 5 -->
  <link name="link_5">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/link_5.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/link_5.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- link 6 -->
  <link name="link_6">
    <inertial>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <mass value="2"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/visual/link_6.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://kuka_kr16_support/meshes/kr16_2/collision/link_6.stl"/>
      </geometry>
    </collision>
  </link>
  <!-- tool 0 -->
  <!-- This frame corresponds to the $FLANGE coordinate system in KUKA KRC controllers.
  <link name="tool0"/> -->

  <!-- END LINKS -->
  <!-- JOINTS -->
  <!-- joint 1 (A1) -->
  <joint name="joint_a1" type="revolute">
    <origin rpy="0 0 0" xyz="0 0 0.675"/>
    <parent link="base_link"/>
    <child link="link_1"/>
    <axis xyz="0 0 -1"/>
    <limit effort="0" lower="-3.22885911619" upper="3.22885911619" velocity="2.72271363311"/>
  </joint>

   <transmission name="trans_joint_a1">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a1">
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a1">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission>

  <!-- joint 2 (A2) -->
  <joint name="joint_a2" type="revolute">
    <origin rpy="0 0 0" xyz="0.26 0 0"/>
    <parent link="link_1"/>
    <child link="link_2"/>
    <axis xyz="0 1 0"/>
    <limit effort="0" lower="-2.70526034059" upper="0.610865238198" velocity="2.72271363311"/>
  </joint>

   <transmission name="trans_joint_a2">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a2">
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a2">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission>

  <!-- joint 3 (A3) -->
  <joint name="joint_a3" type="revolute">
    <origin rpy="0 0 0" xyz="0.68 0 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
    <axis xyz="0 1 0"/>
    <limit effort="0" lower="-2.26892802759" upper="2.68780704807" velocity="2.72271363311"/>
  </joint>

   <transmission name="trans_joint_a3">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a3">
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a3">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission>

  <!-- joint 4 (A4) -->
  <joint name="joint_a4" type="revolute">
    <origin rpy="0 0 0" xyz="0.67 0 -0.035"/>
    <parent link="link_3"/>
    <child link="link_4"/>
    <axis xyz="-1 0 0"/>
    <limit effort="0" lower="-6.10865238198" upper="6.10865238198" velocity="5.75958653158"/>
  </joint>

   <transmission name="trans_joint_a4">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a4">
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a4">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission>

  <!-- joint 5 (A5) -->
  <joint name="joint_a5" type="revolute">
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
    <axis xyz="0 1 0"/>
    <limit effort="0" lower="-2.26892802759" upper="2.26892802759" velocity="5.75958653158"/>
  </joint>

   <transmission name="trans_joint_a5">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a5">
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a5">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission>

  <!-- joint 6 (A6) -->
  <joint name="joint_a6" type="revolute">
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
    <axis xyz="-1 0 0"/>
    <limit effort="0" lower="-6.10865238198" upper="6.10865238198" velocity="10.7337748998"/>
  </joint>

   <transmission name="trans_joint_a6">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a6">
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a6">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission>

  <!-- tool frame - fixed frame
  <joint name="joint_a6-tool0" type="fixed">
    <parent link="link_6"/>
    <child link="tool0"/>
    <origin rpy="0 1.57079632679 0" xyz="0.158 0 0"/>
  </joint>

   <transmission name="trans_joint_a6-tool0">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="joint_a6-tool0">
        <hardwareInterface>EffortJointInterface</hardwareInterface>
      </joint>
      <actuator name="motor_joint_a6-tool0">
        <mechanicalReduction>1</mechanicalReduction>
        <hardwareInterface>EffortJointInterface</hardwareInterface>
      </actuator>
   </transmission> -->

  <!-- END JOINTS -->
  <!-- ROS base_link to KUKA $ROBROOT coordinate system transform -->
  <link name="base"/>
  <joint name="base_link-base" type="fixed">
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <parent link="base_link"/>
    <child link="base"/>
  </joint>

  <!-- Gazebo world joint -->
  <!-- Used for fixing robot to Gazebo 'base_link' -->
  <link name="world"/>

  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
  </joint>

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/kr16_2_gazebo</robotNamespace>
  </plugin>
</gazebo>

</robot>
</code>```

This is controller yaml:

```<code># Publish all joint states -----------------------------------
joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50

# Position Controllers ---------------------------------------
joint1_position_controller:
  type: effort_controllers/JointPositionController
  #joint: base_link__link_01
  joint: joint_a1
  pid: {p: 100, i: 100, d: 500.0}
joint2_position_controller:
  type: effort_controllers/JointPositionController
  #joint: link_01__link_02
  joint: joint_a2
  pid: {p: 100.0, i: 100, d: 2000.0}
joint3_position_controller:
  type: effort_controllers/JointPositionController
  #joint: link_02__link_03
  joint: joint_a3
  pid: {p: 100.0, i: 50, d: 1000.0}
joint4_position_controller:
  type: effort_controllers/JointPositionController
  #joint: link_03__link_04
  joint: joint_a4
  pid: {p: 100.0, i: 50, d: 200.0}
joint5_position_controller:
  type: effort_controllers/JointPositionController
  #joint: link_04__link_05
  joint: joint_a5
  pid: {p: 100.0, i: 50, d: 70.0}
joint6_position_controller:
  type: effort_controllers/JointPositionController
  #joint: link_05__link_06
  joint: joint_a6
  pid: {p: 100.0, i: 50, d: 70.0}
tool0_position_controller:
  type: effort_controllers/JointPositionController
  joint: link_06__tool0
  #joint: joint1
  pid: {p: 100.0, i: 50, d: 70.0}
</code>```

and this is my launch file:

```<code><?xml version="1.0"?>
<launch>

  <arg name="paused" default="false"/>
  <arg name="gazebo_gui" default="true"/>
  <arg name="urdf_path" default="$(find kuka_kr16_support)/urdf/kr16_2_gazebo.urdf"/>

  <!-- startup simulated world -->
  <include file="<span class="math-container">$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" default="worlds/empty.world"/>
    <arg name="paused" value="$</span>(arg paused)"/>
    <arg name="gui" value="$(arg gazebo_gui)"/>
  </include>

  <!-- send robot urdf to param server -->
  <param name="robot_description" textfile="$(arg urdf_path)" />

  <!-- Load controllers -->
  <rosparam ns="/kr16_2_gazebo" command="load" file="$(find kuka_kr16_moveit_gazebo)/config/joints.yaml" />

  <!-- push robot_description to factory and spawn robot in gazebo at the origin, change x,y,z arguments to spawn in a different position -->
  <node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -x 0 -y 0 -z 0"
    respawn="false" output="screen" />

  <!-- Controllers -->
  <node name="controller_spawner" pkg="controller_manager" type="spawner"
    respawn="false" output="screen" ns="/kr16_2_gazebo"
    args="--namespace=/kr16_2_gazebo
    joint_state_controller
    joint1_position_controller
    joint2_position_controller
    joint3_position_controller
    joint4_position_controller
    joint5_position_controller
    joint6_position_controller
    --timeout 60">
  </node>

</launch>
</code>```

And when I launch it in terminal this is output:

WARNING: Package name "KUKA_KR16_moveit_Luka1" does not follow the
  naming conventions. It should start with a lower case letter and only
  contain lower case letters, digits, underscores, and dashes. ...
  logging to
  /home/gazebo/.ros/log/133adcf4-5e8d-11e9-8069-000c2911adc8/roslaunch-ubuntu-3085.log
  Checking log directory for disk usage. This may take awhile. Press
  Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

WARNING: Package name "KUKA_KR16_moveit_Luka1" does not follow the
  naming conventions. It should start with a lower case letter and only
  contain lower case letters, digits, underscores, and dashes. started
  roslaunch server http://ubuntu:35047/

SUMMARY

PARAMETERS  * /gazebo/enable_ros_network: True  *
  /kr16_2_gazebo/joint1_position_controller/joint: joint_a1  *
  /kr16_2_gazebo/joint1_position_controller/pid/d: 500.0  *
  /kr16_2_gazebo/joint1_position_controller/pid/i: 100  *
  /kr16_2_gazebo/joint1_position_controller/pid/p: 100  *
  /kr16_2_gazebo/joint1_position_controller/type: effort_controller...
  * /kr16_2_gazebo/joint2_position_controller/joint: joint_a2  * /kr16_2_gazebo/joint2_position_controller/pid/d: 2000.0  *
  /kr16_2_gazebo/joint2_position_controller/pid/i: 100  *
  /kr16_2_gazebo/joint2_position_controller/pid/p: 100.0  *
  /kr16_2_gazebo/joint2_position_controller/type: effort_controller...
  * /kr16_2_gazebo/joint3_position_controller/joint: joint_a3  * /kr16_2_gazebo/joint3_position_controller/pid/d: 1000.0  *
  /kr16_2_gazebo/joint3_position_controller/pid/i: 50  *
  /kr16_2_gazebo/joint3_position_controller/pid/p: 100.0  *
  /kr16_2_gazebo/joint3_position_controller/type: effort_controller...
  * /kr16_2_gazebo/joint4_position_controller/joint: joint_a4  * /kr16_2_gazebo/joint4_position_controller/pid/d: 200.0  *
  /kr16_2_gazebo/joint4_position_controller/pid/i: 50  *
  /kr16_2_gazebo/joint4_position_controller/pid/p: 100.0  *
  /kr16_2_gazebo/joint4_position_controller/type: effort_controller...
  * /kr16_2_gazebo/joint5_position_controller/joint: joint_a5  * /kr16_2_gazebo/joint5_position_controller/pid/d: 70.0  *
  /kr16_2_gazebo/joint5_position_controller/pid/i: 50  *
  /kr16_2_gazebo/joint5_position_controller/pid/p: 100.0  *
  /kr16_2_gazebo/joint5_position_controller/type: effort_controller...
  * /kr16_2_gazebo/joint6_position_controller/joint: joint_a6  * /kr16_2_gazebo/joint6_position_controller/pid/d: 70.0  *
  /kr16_2_gazebo/joint6_position_controller/pid/i: 50  *
  /kr16_2_gazebo/joint6_position_controller/pid/p: 100.0  *
  /kr16_2_gazebo/joint6_position_controller/type: effort_controller...
  * /kr16_2_gazebo/joint_state_controller/publish_rate: 50  * /kr16_2_gazebo/joint_state_controller/type: joint_state_contr...  *
  /kr16_2_gazebo/tool0_position_controller/joint: link_06__tool0  *
  /kr16_2_gazebo/tool0_position_controller/pid/d: 70.0  *
  /kr16_2_gazebo/tool0_position_controller/pid/i: 50  *
  /kr16_2_gazebo/tool0_position_controller/pid/p: 100.0  *
  /kr16_2_gazebo/tool0_position_controller/type: effort_controller...  *
  /robot_description:

NODES   /kr16_2_gazebo/
      controller_spawner (controller_manager/spawner)   /
      gazebo (gazebo_ros/gzserver)
      gazebo_gui (gazebo_ros/gzclient)
      spawn_gazebo_model (gazebo_ros/spawn_model)

auto-starting new master process[master]: started with pid [3096]
  ROS_MASTER_URI=http://localhost:11311

setting /run_id to 133adcf4-5e8d-11e9-8069-000c2911adc8 WARNING:
  Package name "KUKA_KR16_moveit_Luka1" does not follow the naming
  conventions. It should start with a lower case letter and only contain
  lower case letters, digits, underscores, and dashes.
  process[rosout-1]: started with pid [3107] started core service
  [/rosout] process[gazebo-2]: started with pid [3110]
  process[gazebo_gui-3]: started with pid [3119]
  process[spawn_gazebo_model-4]: started with pid [3124]
  process[kr16_2_gazebo/controller_spawner-5]: started with pid [3125]
  WARNING: Package name "KUKA_KR16_moveit_Luka1" does not follow the
  naming conventions. It should start with a lower case letter and only
  contain lower case letters, digits, underscores, and dashes. WARNING:
  Package name "KUKA_KR16_moveit_Luka1" does not follow the naming
  conventions. It should start with a lower case letter and only contain
  lower case letters, digits, underscores, and dashes. WARNING: Package
  name "KUKA_KR16_moveit_Luka1" does not follow the naming conventions.
  It should start with a lower case letter and only contain lower case
  letters, digits, underscores, and dashes. WARNING: Package name
  "KUKA_KR16_moveit_Luka1" does not follow the naming conventions. It
  should start with a lower case letter and only contain lower case
  letters, digits, underscores, and dashes. [INFO] [1555229566.121403,
  0.000000]: Controller Spawner: Waiting for service /kr16_2_gazebo/controller_manager/load_controller [ INFO]
  [1555229567.920658309]: Finished loading Gazebo ROS API Plugin. [
  INFO] [1555229567.922362082]: waitForService: Service
  [/gazebo_gui/set_physics_properties] has not been advertised,
  waiting... [ INFO] [1555229567.927517546]: Finished loading Gazebo ROS
  API Plugin. [ INFO] [1555229567.928969037]: waitForService: Service
  [/gazebo/set_physics_properties] has not been advertised, waiting...
  [INFO] [1555229569.090114, 0.000000]: Loading model XML from ros
  parameter robot_description [INFO] [1555229569.100970, 0.000000]:
  Waiting for service /gazebo/spawn_urdf_model [INFO]
  [1555229569.708130, 0.000000]: Calling service
  /gazebo/spawn_urdf_model [ INFO] [1555229569.740163120, 0.023000000]:
  waitForService: Service [/gazebo/set_physics_properties] is now
  available. [INFO] [1555229570.489737, 0.159000]: Spawn status:
  SpawnModel: Successfully spawned entity [ INFO] [1555229570.502446729,
  0.159000000]: Physics dynamic reconfigure ready. [ INFO] [1555229570.679725950, 0.159000000]: Loading gazebo_ros_control plugin
  [ INFO] [1555229570.680028318, 0.159000000]: Starting
  gazebo_ros_control plugin in namespace: /kr16_2_gazebo [ INFO]
  [1555229570.680620454, 0.159000000]: gazebo_ros_control plugin is
  waiting for model URDF in parameter [/robot_description] on the ROS
  param server. [spawn_gazebo_model-4] process has finished cleanly log
  file:
  /home/gazebo/.ros/log/133adcf4-5e8d-11e9-8069-000c2911adc8/spawn_gazebo_model-4*.log
  [ INFO] [1555229570.868346785, 0.159000000]: Loaded
  gazebo_ros_control. [INFO] [1555229570.971088, 0.255000]: Controller
  Spawner: Waiting for service
  /kr16_2_gazebo/controller_manager/switch_controller [INFO]
  [1555229570.980829, 0.257000]: Controller Spawner: Waiting for service
  /kr16_2_gazebo/controller_manager/unload_controller [INFO]
  [1555229570.987506, 0.263000]: Loading controller:
  joint_state_controller [INFO] [1555229571.017423, 0.294000]: Loading
  controller: joint1_position_controller [INFO] [1555229571.106571,
  0.377000]: Loading controller: joint2_position_controller [INFO] [1555229571.162822, 0.424000]: Loading controller:
  joint3_position_controller [INFO] [1555229571.229486, 0.475000]:
  Loading controller: joint4_position_controller [INFO]
  [1555229571.288503, 0.515000]: Loading controller:
  joint5_position_controller [INFO] [1555229571.361675, 0.563000]:
  Loading controller: joint6_position_controller [INFO]
  [1555229571.418728, 0.607000]: Controller Spawner: Loaded controllers:
  joint_state_controller, joint1_position_controller,
  joint2_position_controller, joint3_position_controller,
  joint4_position_controller, joint5_position_controller,
  joint6_position_controller [INFO] [1555229571.426332, 0.612000]:
  Started controllers: joint_state_controller,
  joint1_position_controller, joint2_position_controller,
  joint3_position_controller, joint4_position_controller,
  joint5_position_controller, joint6_position_controller

From output I can see that all controllers are loaded,to confirm it here is output of rostopic:

```<code>/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/kr16_2_gazebo/joint1_position_controller/command
/kr16_2_gazebo/joint1_position_controller/pid/parameter_descriptions
/kr16_2_gazebo/joint1_position_controller/pid/parameter_updates
/kr16_2_gazebo/joint1_position_controller/state
/kr16_2_gazebo/joint2_position_controller/command
/kr16_2_gazebo/joint2_position_controller/pid/parameter_descriptions
/kr16_2_gazebo/joint2_position_controller/pid/parameter_updates
/kr16_2_gazebo/joint2_position_controller/state
/kr16_2_gazebo/joint3_position_controller/command
/kr16_2_gazebo/joint3_position_controller/pid/parameter_descriptions
/kr16_2_gazebo/joint3_position_controller/pid/parameter_updates
/kr16_2_gazebo/joint3_position_controller/state
/kr16_2_gazebo/joint4_position_controller/command
/kr16_2_gazebo/joint4_position_controller/pid/parameter_descriptions
/kr16_2_gazebo/joint4_position_controller/pid/parameter_updates
/kr16_2_gazebo/joint4_position_controller/state
/kr16_2_gazebo/joint5_position_controller/command
/kr16_2_gazebo/joint5_position_controller/pid/parameter_descriptions
/kr16_2_gazebo/joint5_position_controller/pid/parameter_updates
/kr16_2_gazebo/joint5_position_controller/state
/kr16_2_gazebo/joint6_position_controller/command
/kr16_2_gazebo/joint6_position_controller/pid/parameter_descriptions
/kr16_2_gazebo/joint6_position_controller/pid/parameter_updates
/kr16_2_gazebo/joint6_position_controller/state
/kr16_2_gazebo/joint_states
/rosout
/rosout_agg
</code>```

and robot is just like hanging on base link, because base link is only one which has type=fixed and all other have type=revolute.

here is picture of hanging robot:

When I lift and release robot in gazebo using mouse, robot just fall down and axis are just shaking like there is no motor or any force which keeps them fixed.

答:
Reason why robot is laying down is because in urdf file gravity is not turned off. When I add this part of the code to my urdf then robot is loaded in some position and is not falling down.

```<code>  <!-- Gazebo-specific link properties  -->
  <gazebo reference="<span class="math-container">${prefix}base_link">
    <material>Gazebo/Yellow</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="$</span>{prefix}link_1">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="<span class="math-container">${prefix}link_2">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="$</span>{prefix}link_3">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="<span class="math-container">${prefix}link_4">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="$</span>{prefix}link_5">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_6">
    <material>Gazebo/Black</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
</code>```

I am not sure that I want turned off gravity in simulation.

Body:
Reason why robot is laying down is because in urdf file gravity is not turned off. When I add this part of the code to my urdf then robot is loaded in some position and is not falling down.

  <!-- Gazebo-specific link properties  -->
  <gazebo reference="${prefix}base_link">
    <material>Gazebo/Yellow</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_1">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_2">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_3">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_4">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_5">
    <material>Gazebo/Orange</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
  <gazebo reference="${prefix}link_6">
    <material>Gazebo/Black</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>

I am not sure that I want turned off gravity in simulation.


问:
Which is a good and cheap 3D LIDAR or other options?
Our team is planning to go for European Rover Challenge (ERC) 2018 for which we are designing an Autonomous rover. In order to implement SLAM, we need a way of mapping (with a range of atleast 2-4 meters) for which we considered using a LIDAR or a stereo cam. Could anyone suggest a good, cheap and accurate enough LIDAR, Stereo cam or some other option by which we could achieve this?</p>

答:
If you are looking for a cheap solid state Lidar for a Rover perhaps the Terabee TeraRanger Evo in the 8 x 60m configuration could work for you: TeraRanger Tower

This version can work outdoor within the range you are looking for and it costs €599 so about $ 670 usd


问:
Electronic Speed Controller
What should be the specification of ESC that I should use for a 320KV 1820W brushless DC Motor?. Is it necessary to use an 80A ESC?, Basically, How can I choose the required ESC for a motor?</p>

答:
There are a couple motor metrics that will help you decide:

Motor voltage: Your motor has a range of voltages that it will run effectively at. Pick an ESC whose output voltage(usually the same as battery voltage) is in this range.

Stall current: This is the current the motor will draw when the load is so high it can't spin. Most motors will list this specification; you want your ESC's current rating to be higher than stall current.

Kv: This determines rpm per volt of the motor at 0 load. It is usually inversely proportional to torque; the higher the Kv the faster the motor will spin, and the less torque it can provide at that rpm.

You haven't given the motor voltage and stall current, so there's no saying what exact ESC you should pick, but the information above will help you decide.

Title: Electronic Speed Controller


问:
Blender a good robotic simulator for quadcopters / swarm simulations?
I'm interested in simulating Quadcopter control and Swarm co-ordinations. Was wondering if Blender or specifically MORSE was going to be good enough? According to the limitations of MORSE, it states:

MORSE was never meant to be a physically accurate simulator: while we rely on a state-of-the-art physics engine (Bullet), do not expect to accurately simulate robot arm dynamics or fine grasping. Other projects are doing that much better (like OpenGrasp for grasping).

While on-going efforts try to tackle this issue, we do not consider MORSE to have a good enough temporal accuracy and time synchronization capabilities for application like hybrid simulation (where some robots are simulated while others are physically operated).

Was wondering if anyone has experience in using blender for these types of applications.

答: You might look at v-rep. They say that the program is specifically designed to simulate any robot and support dynamic particles allowing for the creation of engines and propellors. The program even comes with a pre-made quadcopter model.</p>


问:
What does it actually mean by Task Planning?
According to the research paper Parallel process decomposition of a dynamic manipulation task: robotic sewing (D. Gershon, DOI: 10.1109/70.56654):

Abstract - ... The task planner approach, as promoted by  the Al community,  is  unsuited  to tasks  involving  interaction with  a  dynamic  environment.  ....

  ... ... ...

  Task  planning  is  essentially  an  off-line  activity,  based
  on  a  "snap-shot"  of the  world,  and  is  therefore  incompati-
  ble  with  dynamic  tasks  and  environments.  Task  planners  re-
  quire  a  single model  of the world,  whereas  different models
  may  be  appropriate  for  different  objectives,  e.g.,  an  octree
  representation  is  efficient  for  obstacle  avoidance,  whereas  a
  RAPT-style model  [36]  is  better suited to  planning  compliant
  motion  tasks.  Attempts  to develop  experimental  task planner
  systems  revealed  additional difficulties,  such as  image  under-
  standing,  sensor  fusion,  error  recovery,  and  the  potential  for
  catastrophic  failures  [29]....
  ..... ..... ....

Many control  schemes,  such  as  adaptive  control  [15],  [27]  and
  sliding-mode control  [41],  can  accommodate bounded uncertainties  in  the model of  the controlled system. However,  these controllers are  not generally  robust  to  disturbances generated by  a dynamic  interacting  environment.

Now, Multi-arm robot control system for manipulation of flexible materials in sewing operation seems to be implementing a multi-arm robot system on the basis of "Task Planning" approach. And, this paper implemented a robot system using adaptive control.

So, what is the catch here? Why does the 1st article say that use of task planning and adaptive control aren't possible in case of dynamic tasks?

答:
I think what you are seeing here is a decade advancement in microprocessor and robotic control technologies.

By the time the second and third papers were written, in 2000 & 1998, the definition of 'task planning' had switched from static pre-planning to dynamic reactive planning.

The difference in microcomputer speeds between 1990 and 1998 is enormous. In 1990 typical CPUs included the 80486 & i860. They were clocked at double digit MHz, and didn't have the power to do the complex floating point operations required for doing task planning in real time.

By the late 90's microprocessors were significantly faster, GHz chips were going into production and CPUs were doing more per cycle. Significantly, SIMD (Single Instruction Multiple Data) pipelines like SSE were being implemented so the big matrix manipulations needed to do dynamic task planning were starting to become efficient enough to use in near real time.

This all made enough difference that suddenly things which were inconceivable at the start of the decade were now viable.


问:
Are these parts compatible to build a quadrone?
I want to build a quaddrone from scratch, without using ready made controllers. I've read a lot about drones, how they fly and what essential parts they should have.

So I decided to make my own quaddrone with arduino micro-controller, Are the following parts compatible and good to build a quadrone ?

Brushless DC motor RacingEdition (KV=2600,Weight: 28 grams,Battery: 2-4S lipo battery,Max.current: 23.2A, Max.power: 710W) link

ESC (Continuous current: 30A,Instantaneous current (10 seconds): 35A,frequencies up to 48MHz) link

Propellers (4730F Folding Propeller Blades,Material: plastic) link

IMU sensor (Nine-axis module (three-axis gyroscope + three-axis acceleration + three-axis magnetic field) link

Carbon Fiber/Aluminium frame link

Arduino UNO

Lipo Battery (3S 11.1 V, 4200mAh, 30C) link

Also what about the RC controller (RC transimtter and receiver) could it be done using android mobile app and wireless module ?

I really appreciate your help ♥, thanks in advance

答:
I've not used an arduino for quadcopter so I'll leave that to someone else to answer. However given that flight controllers are so cheap maybe it would be worth starting with one just to make sure everything else works and to gain experience.

For the rest of the components.

Frame looks good, I started with one of those. Easy to put together, quite robust and lots of space (although an UNO is much bigger than a normal flight controller, so that might be a challenge)

Motors look good for the frame size

ESCs look good

Not sure about the propellers. I've not used folding ones before. Probably fine but check how they mount to the motors. They might be DJI specific mounting.

Battery is about twice the size I would expect on a quad of this size. I'd look at something in the 1.8 - 2.2Ah range.

For the RC control there are lots of options which would work. It depends what you need in turns of range and latency. If you use a standard RC model's radio equipment then you get good range and good latency. Android with wireless module would be less range and higher latency but could still be find for your needs.

Edit:

Also checkout https://www.arducopter.co.uk/what-do-i-need.html good source on info on arduino based n-copters.


问:
Building a stationary robot. ROS the right tool for me?
I'm wondering if ROS is the right system for me. I'm currently involved in a project which consists of building a device that has the purpose to take spectroscopic measurements using a laser and a spectrometer, controlling servos and reading outputs of many different sensors.

The project involves

Bring the laser to the right spot using a proximity sensor and a servo

Firing the laser and doing a measurement with the spectrometer

Continuously monitor various temperature, vibration, flow etc sensors

The devices are either ethernet connected or send out voltage/current signals. All devices can be communicated to using Python and libraries.

The software will run on a single Linux PC.

From what I gather then ROS should be great for this. F.x. by creating python scripts for each device, which connect to a "mother" script through the publisher/subscriber method.

But before I dive into coding this, it would be great to get someone's opinion on in ROS is the right system for this?

Cross-Post at answers.ros.org

答: Check already ROS supported sensors; you might find code for some of your sensors already existing. Check this link http://wiki.ros.org/Sensors</p>


答:
The major disadvantage of assembly language is that it is different for each processor that you use.  Therefore there is a big learning curve whenever you change processor.

Clearly, if you only ever plan on using a single processor (or family of processors) then this is less of an issue; however, life is rarely that simple.

Equally, assembler allows you to really get things wrong, unless you are very careful. I speak as someone with lots of years commercial experience writing flight-critical assembly code!!

On the other hand, pretty much every processor comes with a suitable C compiler (as @Shahbaz suggests) and porting C from one processor to another is a lot more straightforward than porting assembler.

Unless you already have good assembler experience, I'd be minded to learn C, and leave assembly language for those (very rare) occurrences when C just isn't up for it.

As for which processor... how long is your piece of string?


问:
Is Fuzzy logic applicable for robotics research
I found some papers that use fuzzy logic to solve robotics algorithmic problems. But I have recently been told by a few roboticists that fuzzy logic should not be used in robotics because it has recently been proven by some theoreticians to be a mathematically dubious field. And so any results that you generate using fuzzy logic in robotics will not get published. Is that true?

I find it hard to believe. Is fuzzy logic dubious with respect to applications on real-world problems, say robotics? I have talked to mathematicians and they surely believe that fuzzy logic is a robust and clever field. But then mathematicians do a lot of abstract stuff that is completely irrelevant to the real world and must not be touched. Is fuzzy logic one of those things?

答:
Fuzzy logic is definitely used in many of the control systems including but not limited to robotics. See this paper for an example:

https://pdfs.semanticscholar.org/b9a7/332b03d46b3ee08b9d113e64714e6b668601.pdf

and this:

https://ieeexplore.ieee.org/document/1678143

If we consider fuzzy logic as dubious then we should do the same to probabilities. Both Fuzzy logic and Probabilities range between 0 and 1; fuzzy logic uses degrees of truth as a mathematical model of vagueness, while Probability uses mathematical model of ignorance.


答:
Short answer: Fuzzy logic (FL) isn't applicable for robotics research, The long answer is, that in the 1980s as part of the fifth computer generation fuzzy logic was researched in Japan with the attempt to build intelligent advanced parallel computers, but the Japanese researchers have failed. Fuzzy logic isn't a technical idea but a philosophical description of the world and a marketing term used for selling rice cookers and washing machines.

After a short time, the consumers have noticed, that Fuzzy stabilized camcorders doesn't have any improvements over a normal camcorder and multi-value logic was repressed into obscurity. If a robot contains of a so called fuzzy controller, it's a clear sign, that's a non-academic project which can't be proven if it's working or not.[1] The term fuzzy has it's origin in a clumsy cowboy character in western film produced in black/white recording decades ago. It's a synonym for a failed project which doesn't fulfill the minimum standards in academia.

[1] Elkan, Charles, et al. "The paradoxical success of fuzzy logic." IEEE expert 9.4 (1994): 3-49.

Title: Is Fuzzy logic applicable for robotics research

Body:
I found some papers that use fuzzy logic to solve robotics algorithmic problems. But I have recently been told by a few roboticists that fuzzy logic should not be used in robotics because it has recently been proven by some theoreticians to be a mathematically dubious field. And so any results that you generate using fuzzy logic in robotics will not get published. Is that true?

I find it hard to believe. Is fuzzy logic dubious with respect to applications on real-world problems, say robotics? I have talked to mathematicians and they surely believe that fuzzy logic is a robust and clever field. But then mathematicians do a lot of abstract stuff that is completely irrelevant to the real world and must not be touched. Is fuzzy logic one of those things?


问:
Task oriented robot language?
So, what I understood by the term "Task Planning" is, "to implement a task to be done by a robot by mimicking a real-world scenario".

This article is also using the term "Task" but it is saying something different.

... To enable user-friendly operation of the system operation, particularly in the phase of preparing new tasks, the original Multi-arm Robot Control (MRC) system has been developed. It incorporates a task-oriented robot language and graphical user interface ...

So, is this article talking about the same thing or different?

I am confused. Coz, their description is unclear.

Are they creating a new programming language and embedding it into the robot, or are they planning a task using an "off-the-shelf" programming language?

答:
In contrast to motion planning, task planning operates on a symbolic higher level. Often, it's connected to natural language descriptions like “open door” and “stand-up”. This makes it a natural choice for a domain specific language. The words in the new language are equal to the actions a robot can execute.

The alternative would be, to realize the tasks in a normal programming language like C++. But then, the actions are also equal to high-level words which are defined in a class. In both cases the idea is to build on top of the low level primitives an elaborated natural language layer which makes it easier to author longer robotics action sequences. A single task command is equal to many low level actions of the robot.

If the tasks are embedded in a simulation the resulting symbolic task simulator is called qualitative physics engine. The model accepts instructions in natural language and predicts the outcome of the action.

Title: Task oriented robot language?


答: If all you want from ROS is the publish/subscribe architecture, then I would caution that using ROS probably has non-negligible overhead, especially if you are unfamiliar with it. In particular, the build environment is definitely geared towards C++, and if you are already planning on using Python, I would suggest looking for alternatives -- paho-MQTT might be more inline with your needs.    </p>

Title: Building a stationary robot. ROS the right tool for me?

Body:
I'm wondering if ROS is the right system for me. I'm currently involved in a project which consists of building a device that has the purpose to take spectroscopic measurements using a laser and a spectrometer, controlling servos and reading outputs of many different sensors.

The project involves

Bring the laser to the right spot using a proximity sensor and a servo

Firing the laser and doing a measurement with the spectrometer

Continuously monitor various temperature, vibration, flow etc sensors

The devices are either ethernet connected or send out voltage/current signals. All devices can be communicated to using Python and libraries.

The software will run on a single Linux PC.

From what I gather then ROS should be great for this. F.x. by creating python scripts for each device, which connect to a "mother" script through the publisher/subscriber method.

But before I dive into coding this, it would be great to get someone's opinion on in ROS is the right system for this?

Cross-Post at answers.ros.org


问:
A Delivery Drone
I'm building a delivery drone as my final year project. A drone that can deliver a package to offices around my small town autonomously, for my final year project.

I would like to know how this drone can find the exact location of these offices, since I couldn't find them on Google map?

答:
Most of the outdoor drones use GPS for autonomous navigation. Even the flight controllers like Ardupilot and Naza need to be given the GPS coordinates of the destination for autonomous flights. The best way to do this is go to the exact location and get the GPS coordinates and then program the flight controller.

Apart from this approach there are image and point cloud based approaches to localize the drones but they are a bit complex methods and require a considerable time to implement.

Title: A Delivery Drone


问:
Should you learn assembly language for robotics?
I ask this since assembly language is really close to the micro-controller hardware, and what micro-controller would you reccomend.

The bot has to search for object that I show it before and then I 'lose' the object. Note, I do not know anything about micro-controllers.

答:
I think the answer here is "that's the wrong question".  (It's a bit like asking "what spoken language should I learn if I want to write detective novels?")  But it does have an answer: it depends.

I can't speak for everyone, but when I was just starting out in programming it seemed to me that learning assembly language would help my programs run faster.  This is not necessarily true, because it was based on a faulty assumption: that my writing assembly code (at a beginner level) would produce more efficient code than today's sophisticated compilers.  Furthermore, I assumed that I could pull off complicated algorithms in assembly in the first place -- look at how a simple algorithm like bubble sort becomes very intimidating in assembly.

You should have a good command of the algorithms themselves that are required for robotics.  With that knowledge, the specific language is irrelevant; you will use the language most appropriate to the platform, even if you have to learn a new language to do so.    In some cases this will be assembly, in other cases it will be a variant of C/C++ (like in Arduino), and in still other cases it could be a high-level language.

But learn the theory first, before you get bogged down in the implementation.  In other words, before you choose a language you should think about what you're going to say.


问:
Rotation at SerialLink.teach Robotic Toolbox
Im using robotic toolbox to simulate my robot, but i always confused when i see the value of rpy. It always different if i compare with tr2rpy and tr2eul. What kind of rotation used in SerialLink.teach?

```<code>a = 40/1000;
b = 81/1000;
c = 130/1000;
d = 18/1000;
e = 166/1000;
f = 31/1000;
g = 95/1000;
%MDH
p = SerialLink([...
Revolute('d',b,'a',0,'alpha',0,'modified');...
Revolute('d',0,'a',a,'alpha',deg2rad(90),'offset',pi/2,'modified');...
Revolute('d',0,'a',c,'alpha',0,'modified');...
Revolute('d',e+f,'a',d,'alpha',deg2rad(90),'modified');...
Revolute('d',0,'a',0,'alpha',deg2rad(-90),'modified');...
Revolute('d',g,'a',0,'alpha',deg2rad(90),'modified');],...
'name','6 DOF')
p.teach([0 deg2rad(90) 0 deg2rad(20) deg2rad(10.8) 0]);
tr2rpy(FK,'deg')
tr2eul(FK,'deg')
</code>```

In Simulation = -159.669 -10.142 3.733

tr2eul = -160 10.8 0

tr2rpy =    0 10.8 -160

Or what am i missed?

答:
By default teach() displays orientation using XYZ order roll-pitch-yaw angles, since this is compatible with older textbooks on arm robots, eg. Paul, Spong, Siciliano.  By default tr2rpy() uses ZYX order.  You can pass the 'xyz' option to tr2rpy() to make the two angular representations agree.

Alternatively you can pass the option 'rpy/zyx' to teach().

It's unfortunate that the term roll-pitch-yaw angles is underspecified, many sources just use the term without giving the details.  To add to the confusion, different areas of robotics seem to adopt different conventions. Check out the implementation of rpy2tr() to see the difference.


问:
Home position of robot created using modified DH Parameters doesn't match the real robot
I have created a 6-DOF robot using RigidBodyTree() method and modified D-H parameters using robotics toolbox in MATLAB.

The modified DH parameters for the robot are as follows:

I have followed the example here: https://www.mathworks.com/help/robotics/ref/robotics.rigidbodytree-class.html#bvet6e8

To bring the robot to its actual home position (position of the real robot when encoder values read 0), I have to pass specific theta (DH Parameter) values: [0 -pi/2 0 0 0 pi].

However, there are discrepancies in the joint values for home position of robot created using DH parameters and that of the actual robot.

For actual robot and its simulators, passing a joints value of [0 0 0 0 0 0] gets to the home position.

The visulaization of robot created using robotics toolbox using DH parameters and that of the simulator are shown below:

This creates problems during inverse kinematics. For the same home position (4X4 transformation matrix), the joint angles are different for real robot simulator and robot created using modified DH parameters ([0 0 0 0 0 0] vs [0 -pi/2 0 0 0 pi]).

The DH parameter method ignores theta values when creating robot. How can I match the home configuration of the robot to the real robot?

答:
To bring the robot to its actual home position (position of the real robot when encoder values read 0), I have to pass specific theta (DH Parameter) values: [0 -pi/2 0 0 0 pi].

Correct; that's what it looks like in the last column of your table:

The DH parameter method ignores theta values when creating robot. How can I match the home configuration of the robot to the real robot?

Write a simple adapter to convert to and/or from the configurations you want to use.

For example, you could do something like:

```<code>function outputAngles = ABBInverseKinematics(desiredPose, initialThetas)
    rawOutputAngles = InverseKinematics(desiredPose);
    outputAngles = rawOutputAngles + initialThetas;
end
</code>```

Your problem ultimately just boils down to the fact that the default position in your robot's frame (all zeros) doesn't correspond to the default position in your DH frame (your theta list). They're only (and always) separated by the initial values, so you either add or subtract the initial values appropriately, for forward or inverse kinematics, and you're done.

Body:
To bring the robot to its actual home position (position of the real robot when encoder values read 0), I have to pass specific theta (DH Parameter) values: [0 -pi/2 0 0 0 pi].

Correct; that's what it looks like in the last column of your table:

The DH parameter method ignores theta values when creating robot. How can I match the home configuration of the robot to the real robot?

Write a simple adapter to convert to and/or from the configurations you want to use.

For example, you could do something like:

function outputAngles = ABBInverseKinematics(desiredPose, initialThetas)
    rawOutputAngles = InverseKinematics(desiredPose);
    outputAngles = rawOutputAngles + initialThetas;
end

Your problem ultimately just boils down to the fact that the default position in your robot's frame (all zeros) doesn't correspond to the default position in your DH frame (your theta list). They're only (and always) separated by the initial values, so you either add or subtract the initial values appropriately, for forward or inverse kinematics, and you're done.


答:
I would like to mention that Fuzzy logic is still an active control system used in many industry applications.

In garbage fired power plants, concrete aggregate firing, hydraulics, and the control of flow of powdered 'fluids' in foundries to name a few. However, I will admit, I've only seen them used in 'one off' difficult to model projects, such as power plants and the such. However I have read papers like you that use it in robotics....

I would say it most certainly has it's place in research, and it is certainly used in many control areas that are near impossible to control in more traditional methods. However much like you'll see Neural Networks being sticker'd and used on/in everything under the sun.

Fuzzy logic suffered the same fate, but fell out of interest because of it...It was thought that you could throw away all the old tools and 'save the world'. But it became a marketing failure and other methods became (stayed?) the norm.

I don't think Fuzzy logic is 'dubious' in any way. I think it goes against the methods of many designers to be exact and well...not so fuzzy, and has a poor history of being used in junk machines, and lots of burnt memories.

It's an interesting field, one you should learn about, maybe even play around with in matlab or your flavour and learn about....if not for anything else than to say you like something else more.

Some reading materials:

NOE TS Fuzzy Modelling of Nonlinear Dynamic
Systems with Uncertainties using Symbolic
Interval-valued data

Advances in Industrial Control
^this is more about PIDS and MPCs

Fuzzy Logic, Identification and Predictive Control

and just for sources sake, a list (in german anyways) of successful applications of Fuzzy logic (maybe just scroll through the pictures to get an idea if you can't read german). As I said, it has it's place....it's just not very big.


问:
What is the typical intro example for control systems for a spherical joint?
I have been studying Acrobot and Cart-Pole. Both of these systems I can both work out the equations of motion and linear manipulator equations for how to maintain the poles vertically.

The problem is both of these examples are revolute joints. And I'm interested in developing a control system using a spherical joint.

What is a typical example used to explain how to create a control system for holding a rod vertically with a spherical joint?

答:
The best example I can think of would be the spherical pendulum. Albeit, this is not exactly the easiest thing to regulate as you have two degrees of freedom and a frictionless contact (well depending on your design)

Here is a youtube of such an example of a method to control it.

You'll often read that the Equation of motion will be described through Hamilton, but don't let anyone kid you, this can also easily be derived via Lagrange (if thats your fancy). Whereby the important thing to keep in mind is that the spherical pendulum will only move within a single plane unless there is an initial velocity included in your initial conditions.

Some things to read:

Spherical Pendulum

Dynamics and Control of Spherical Pendulum


答: not a direct answer, but I would recommend you the following lessons by Peter Corke: robotacademy: joint control</p>

Title: What is the typical intro example for control systems for a spherical joint?

Body:
I have been studying Acrobot and Cart-Pole. Both of these systems I can both work out the equations of motion and linear manipulator equations for how to maintain the poles vertically.

The problem is both of these examples are revolute joints. And I'm interested in developing a control system using a spherical joint.

What is a typical example used to explain how to create a control system for holding a rod vertically with a spherical joint?


问:
calibrating large scale manipulator
I'm facing the problem of model calibration for a large-scale manipulator (e.g. example image) with a half-spherical workspace of around 40m diameter.

The typical approach would be computer vision, which is difficult in this case due to:

large scale and therefore huge distance to cameras,

only possible outdoors, where the sunlight might be a problem.

calibration of 5-6 cameras takes some time, the measurement should be finished in one day.

So my ideas are the following:

use triangulation of radio frequency signals (e.g. RF position sensor

use extra IMUs

develop a sensor fusion scheme, like kalman filter

I want to ask you for
alternative approaches, expected accuracy of RF position sensors without sensor fusion, problems with RF reflections (the manipulator is constructed from steel) or any other input.

thanks in advance!

答:
You are not the first person in the world that wants to calibrate a larger robot, so there are commercially available solutions :)

The tool of choice in your case is a laser tracker. You attach one or multiple targets (laser reflectors) to your machine. The laser tracker consists of a laser that measures the distance to a target, two motors to pan and tilt the laser so that it finds and hits the targets.

Title: calibrating large scale manipulator


问:
Tuning PID controlling car's steering angle
We built a car model with Ackerman steering type for line following task. The distance between rear and front wheels' axes was about 42 cm. Then we tuned PID controller (really just PD: Kp = 0.9, Ki = 0.0 and Kd = 0.2). A deviation from line in pixels captured by forward looking camera is directly sent to the PID controller and the result is a steering angle.

But recently we had to shorten our car to allow it to pass rounded corners. We shortened the distance between wheels' axes by about 15 cm.

It took us so long to tune the PID controller the previous time so we just want to adjust the PID values according to some Ackerman kinematic model. Is there any way to do this?

答:
According to the OP the Ackerman steering model was used for controlling a pid controller The task is to determine the right steering angle in response to the measured distance to an obstacle. The good news is, that an Ackerman like car model is the right choice for the task, because it simplifies the situation. The open problem so far is how to determine the steering angle. This is indeed a complicated problem, which goes beyond the kinematic model.

One naive approach is a behavior tree which contains of if-then rules. Another more complicated technique is to use an RRT planner on top of the Ackerman model. To make things more easy i would recommend the behavior tree idea.


问:
In SLAM, how does a laser range finder produce pseudo-segments from dynamic objects?
In this paper, the author says that during SLAM process, pseudo segments that appear from any momentary pause of dynamic objects in laser data would make the map unsatisfied.

How is this caused?

If the dynamic object moved, won't laser data update and eliminate the segment of dynamic objects?

答:
I think you're misunderstanding the following two sentences from the abstract:

(i) the first one is a fusion module which synthesizes line segments obtained from laser rangefinder and line features extracted from monocular camera. This policy eliminates any pseudo segments that appear from any momentary pause of dynamic objects in laser data.

It looks like they're first extracting lines from the point cloud generated from the laser range finder. They then cross-reference these lines with lines extracted via computer vision on the monocular image. If a line extracted from the point cloud doesn't exist in the image, then it is NOT a valid line. Therefore, you are correct, "If the dynamic object moved, [the] laser data [WILL] update and eliminate the segment" caused by dynamic objects. However, they're trying to correctly identify segments specifically when the dynamic object is briefly static.

You can see a specific example on page 441 where a person standing still caused a segment to be extracted from the point cloud. Fortunately, this segment does not exist in the monocular image, and so it was deemed an INVALID segment. There's also a brief description of this process in section 4 on page 437.