for Robot Artificial Inteligence

李代数和李群

|

泡泡机器人 https://blog.csdn.net/weicao1990/article/details/83375148

更详细的 https://xhy3054.github.io/li-group-derivation/

https://zhuanlan.zhihu.com/p/72816183

korean https://edward0im.github.io/mathematics/2020/05/01/lie-theory/

good stuff https://docs.google.com/document/d/1icPjUyT3nPvjZ1OVMtWp9afUtuJ4gXLJL-ex7A9FpNs/edit?fbclid=IwAR1GRRPaDD-S3lTD54iHBp2UwXzj1EgfSfs25eAJhbZKSKHlqPA1OfAn0UQ#heading=h.uey5prbihivv

tutorial https://ingmec.ual.es/~jlblanco/papers/jlblanco2010geometry3D_techrep.pdf

간단 이해 :

주로 H * dx = b 문제를 풀기 위해서 사용이 되며, SLAM에서는 Camera pose estimation 및 최적화 하는데 사용이 된다.

즉 실제 예제로 z = pT + w (z는 월드좌표계에서 관찰한 z값, pT는 카메라 좌표계에서 관찰한 관찰값, w는 센서 노이즈 값)

w = PT - z값인데,

Rotation Matrix 끼리는 “+,-,x, 나누기” 에 대한 Constraint(자유도는 3개이지만, 요소는 9개, 계산시 복잡도 증가 및 요소가 자유도보다 높으므로 짐벌락 같은 무제가 발생하게 된다.)가 있으므로(multiplication이 non contraint)이다. 그렇기 때문에 로드리게스 방정식을 이용하여 Manifold space(rotation Matrix, Lie Gropu)을 Lie Aligebra(Targent space, log)로 변환을 하여서 Rotation Matrix들을 Vector화를하면(rotation vector , 3개 자유도, 3개 요소, 3 axis, 3 element) 곱셈 및 나누기, 계산 같은 것들이 tangent space에 쉽게 “+,-“에 Non Constraint가 되기 때문에, 최적화를 쉽게 할 수 있다. “+,-“이후에 대한 결과값들을 다시 로드리게스 회전 방정식을 이용하여 Lie Group(Manifold space, exp)로 변환을 하여서 Camera pose 간의 관계를 쉽게 구할 수 있고, 벡엔드에서 pose estimation에 최적화를 쉽게 할 수 있다. 이는 Pose Graph에서 대표적으로 쓰인다.

Comment  Read more

Empirical Distributions(经验分布函数)

|

经验分布函数 https://machinelearningmastery.com/empirical-distribution-function-in-python/ https://kjhov195.github.io/2019-12-28-edf/ https://www.statlect.com/asymptotic-theory/empirical-distribution https://towardsdatascience.com/what-why-and-how-to-read-empirical-cdf-123e2b922480 https://rdrr.io/cran/spatstat.geom/man/ewcdf.html

The empirical distribution, or empirical distribution function, can be used to describe a sample of observations of a given variable. Its value at a given point is equal to the proportion of observations from the sample that are less than or equal to that point.

An empirical distribution function provides a way to model and sample cumulative probabilities for a data sample that does not fit a standard probability distribution.

As such, it is sometimes called the empirical cumulative distribution function, or ECDF for short.

why use

Some data samples cannot be summarized using a standard distribution.

Empirical Distribution Function

Typically, the distribution of observations for a data sample fits a well-known probability distribution.

For example, the heights of humans will fit the normal (Gaussian) probability distribution

This is not always the case. Sometimes the observations in a collected data sample do not fit any known probability distribution and cannot be easily forced into an existing distribution by data transforms or parameterization of the distribution function.

Instead, an empirical probability distribution must be used.

There are two main types of probability distribution functions we may need to sample; they are:

Probability Density Function (PDF). Cumulative Distribution Function (CDF).

The PDF returns the expected probability for observing a value. For discrete data, the PDF is referred to as a Probability Mass Function (PMF). The CDF returns the expected probability for observing a value less than or equal to a given value.

An empirical probability density function can be fit and used for a data sampling using a nonparametric density estimation method, such as Kernel Density Estimation (KDE).

The EDF is calculated by ordering all of the unique observations in the data sample and calculating the cumulative probability for each as the number of observations less than or equal to a given observation divided by the total number of observations.

As follows:

  • EDF(x) = number of observations <= x / n

Like other cumulative distribution functions, the sum of probabilities will proceed from 0.0 to 1.0 as the observations in the domain are enumerated from smallest to largest.

– using cumulative distribution function Use the CDF to determine the probability that a random observation that is taken from the population will be less than or equal to a certain value. You can also use this information to determine the probability that an observation will be greater than a certain value, or between two values.

The cumulative distribution function is illustrated in Figure 20.4(b). It shows that the probability of X being less than or equal to xl is FX(xl)

using this is for reading more easily on the probabilty of dataset cumulateively.

in my project case, using ecdf, get probability of some specific data in gaussian distributiuon of ellip submap(check, probabiltiy how much closed ellipes centor or not)

probability(error) -> update weight -> update mean

https://support.minitab.com/en-us/minitab-express/1/help-and-how-to/basic-statistics/probability-distributions/supporting-topics/basics/using-the-cumulative-distribution-function-cdf/

Comment  Read more

normal vector 용도 및 plane margin의 의미

|

3차원을 가정한다면 법선벡터는 normal surface를 만든다고 생각하면 된다. 이때 최소 3개 이상의 벡터들을 covariance matrix나 혹은 외적을 이용해서 법선 벡터를 만들 수 있는데, 이는 plane의 수직 방향 벡터에 대한 방향과 curvature, plane 각도 들을 알 수 있게 된다. 이와 같은 정보를 통해서 평면과 혹은 바닥을 검출해 낼 수 있다.

간단 소개 https://adioshun.gitbooks.io/pcl/content/Tutorial/Feature/Normal-Estimation.html

공부를 하다 보면 plane margin이라는 말이 나오는데 이는 perpendicular distance 이다. 즉 주변 포인터를 통해 normal surface 형성을 하고, 주 변포인터와 normal surface간에 distance로 보면 된다.

https://www.slideshare.net/nsimmons/11-x1-t05-05-perpendicular-distance

이 것이 왜 중요하냐 하면

plane segmentation을 할때 perpendicular distance를 통해 다른 plane과 merge를 할지 혹은 split을 할지 결정을 한다.

Comment  Read more

리눅스 간단 명령어 for ros

|

rosmaster, roscore가 백그라운드로 돌고 있다면 아래와 같은 방식으로 강제 종료할 수 있다. killall -9 roscore killall -9 master rosnode kill -a

vscode에서 제공하는 ros debuging을 할때 bashrc에 환경설정을 바꿔줘야 한다. gedit ~/.bashrc <- it is important when you debuging.

source ~/due22th_ws/devel/setup.bash

그리고 ros debugging을 할때 아래와 같이 하면 끝!

debug json파일, ros debug 포스터 가면 쉽게 할 수 있다.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "ROS: Launch111",
            "type": "ros",
            "request": "launch",
            "target": "/home/chan/due22th_ws/src/vision_local_mapping/launch/app_multi_camera_obstacle_extractor.launch"
        }
    ]
}

Comment  Read more

Heap and stack 간단 설명

|

코딩을 할때 항상 머리속에 이 메모리 도표를 기억하면서 한다면, 더 좋은 프로그래머가 될 수 있을 것 같다.

https://courses.engr.illinois.edu/cs225/sp2021/resources/stack-heap/

Comment  Read more