cd ../.. git clone https://github.com/robotology/osqp-eigen.git cd osqp-eigen mkdir build cd build 安装到 /usr/local/lib/ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ make sudo make install
import osqp import numpy as np from scipy import sparse
# Define problem data P = sparse.csc_matrix([[4, 1], [1, 2]]) q = np.array([1, 1]) A = sparse.csc_matrix([[1, 1], [1, 0], [0, 1]]) l = np.array([1, 0, 0]) u = np.array([1, 0.7, 0.7]) # Create an OSQP object prob = osqp.OSQP() # Setup workspace and change alpha parameter prob.setup(P, q, A, l, u, alpha=1.0) # Solve problem res = prob.solve()
bearing_std_dev (default: 0.001): The standard deviation of bearing uncertainty in the laser scans (rad).
min_split_dist (default: 0.05): When performing “split” step of split and merge, a split between two points results when the two points are at least this far apart (m) 线段split的阈值,过大时很多线段被合并成一条,过小时,出现很多碎短的线段
outlier_dist (default: 0.05): Points who are at least this distance from all their neighbours are considered outliers (m).
range_std_dev (default: 0.02): The standard deviation of range uncertainty in the laser scans (m).
1 2 3 4 5
float32 radius float32 angle float32[4] covariance float32[2] start float32[2] end