Skip to content
Snippets Groups Projects
Commit b8dc546e authored by jvallve's avatar jvallve
Browse files

several modifications and bugs fixed

parent 967adc83
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -89,6 +89,13 @@ namespace laserscanutils
* A return angle in [0,2pi]
**/
ScalarT cornerAperture(const Eigen::Vector3s & _p1, const Eigen::Vector3s & _c, const Eigen::Vector3s & _p2);
/** \brief Returns the angle between two lines
*
* Returns the angle between two lines
*
*/
ScalarT angleBetweenLines(const laserscanutils::Line& line1, const laserscanutils::Line& line2);
}
#endif
......@@ -13,7 +13,7 @@ namespace laserscanutils
Eigen::Vector3s vector_; //homogeneous parameterization of the line: (a,b,c)^T -> ax+by+c=0
ScalarT error_; //sum of all distances from used points to line
unsigned int first_; //index of the range vector of the first point used
unsigned int last_; //index of the range vector of the last point used
unsigned int last_; //index of the range vector of the last point used
Eigen::Vector3s point_first_; //homogeneous parameterization of the line: (a,b,c)^T -> ax+by+c=0
Eigen::Vector3s point_last_; //homogeneous parameterization of the line: (a,b,c)^T -> ax+by+c=0
unsigned int np_; // number of points of the line
......
......@@ -51,7 +51,6 @@ Eigen::MatrixXs laserscanutils::laserPolar2xy(const ScanParams & _params, std::v
Eigen::MatrixXs laserscanutils::laserPolar2xy(const ScanParams & _params, const std::vector<float> & _ranges, const ScalarT& _jump_theshold, std::queue<unsigned int> & jumps_id_)
{
while (!jumps_id_.empty())
......@@ -72,7 +71,7 @@ Eigen::MatrixXs laserscanutils::laserPolar2xy(const ScanParams & _params, const
points.push_back(1);
if (prev_range !=-1 && fabs(_ranges[i]-prev_range) > _jump_theshold)
jumps_id_.push(i);
jumps_id_.push(points.size() / 3);
prev_range = _ranges[i];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment