[Positioning] Split option generated-meshing-grain
Split the option positioning.generated-meshing-grain in two: positioning.generated-meshing-grain-x and positioning.generated-meshing-grain-y.
This commit is contained in:
parent
0da98cdb05
commit
a9f4750f34
|
@ -75,8 +75,10 @@ csv-file = /tmp/owlps-positioning.log
|
|||
#generate-reference-points = false
|
||||
|
||||
# When the above option is activated, the reference points are generated
|
||||
# with the specified distance (in meters) between one another.
|
||||
#generated-meshing-grain = 0.5
|
||||
# with the specified distance (in meters) between one another, in the X
|
||||
# and Y axis.
|
||||
#generated-meshing-grain-x = 0.5
|
||||
#generated-meshing-grain-y = 0.5
|
||||
|
||||
# This option allows the calibration requests sent during the
|
||||
# positioning phase to be added to the calibration request's list. They
|
||||
|
|
|
@ -486,12 +486,14 @@ void Stock::regenerate_reference_points()
|
|||
Configuration::string_value("positioning.minmax-start")) ;
|
||||
Point3D stop(
|
||||
Configuration::string_value("positioning.minmax-stop")) ;
|
||||
float step =
|
||||
Configuration::float_value("positioning.generated-meshing-grain") ;
|
||||
float step_x =
|
||||
Configuration::float_value("positioning.generated-meshing-grain-x") ;
|
||||
float step_y =
|
||||
Configuration::float_value("positioning.generated-meshing-grain-y") ;
|
||||
float z = 1 ; // FIXME
|
||||
for (float x = start.get_x() ; x <= stop.get_x() ; x += step)
|
||||
for (float y = start.get_y() ; y <= stop.get_y() ; y += step)
|
||||
//for (float z = start.get_z() ; z <= stop.get_z() ; z += step)
|
||||
for (float x = start.get_x() ; x <= stop.get_x() ; x += step_x)
|
||||
for (float y = start.get_y() ; y <= stop.get_y() ; y += step_y)
|
||||
//for (float z = start.get_z() ; z <= stop.get_z() ; z += step_z)
|
||||
{
|
||||
Point3D current_point(x,y,z) ;
|
||||
|
||||
|
|
|
@ -200,10 +200,14 @@ void UserInterface::fill_positioning_options()
|
|||
po::value<bool>()->default_value(false),
|
||||
"Generate reference points from the (auto)calibration requests"
|
||||
" received.")
|
||||
("positioning.generated-meshing-grain",
|
||||
("positioning.generated-meshing-grain-x",
|
||||
po::value<float>()->default_value(0.5),
|
||||
"When generating reference points, this distance (in meters) will"
|
||||
" separate each point to the next.")
|
||||
" separate each point to the next in X.")
|
||||
("positioning.generated-meshing-grain-y",
|
||||
po::value<float>()->default_value(0.5),
|
||||
"When generating reference points, this distance (in meters) will"
|
||||
" separate each point to the next in Y.")
|
||||
("positioning.radar-ignore-ap-reference-points",
|
||||
po::value<bool>()->default_value(false),
|
||||
"With the RADAR algorithm, try to avoid selecting the reference"
|
||||
|
|
Loading…
Reference in New Issue