replace plan_vel by x_vel and y_vel in commander.cpp & Commander.cfg
This commit is contained in:
parent
2fae8ea396
commit
b535242410
2 changed files with 11 additions and 9 deletions
|
@ -4,13 +4,14 @@ from dynamic_reconfigure.parameter_generator_catkin import *
|
|||
gen = ParameterGenerator()
|
||||
gen.add("max_curvature", double_t, 0, "Maximum curvature of the estimated plane", 0.5, 0., 1.)
|
||||
gen.add("x_minimal_deviation", double_t, 0, "Absolute horizontal movement detection treshold", 0.1, 0.)
|
||||
gen.add("y_minimal_deviation", double_t, 0, "Absolute lateral movement detection treshold", 0.1, 0.)
|
||||
gen.add("y_minimal_deviation", double_t, 0, "Absolute lateral movement detection treshold", 0.2, 0.)
|
||||
gen.add("z_minimal_deviation", double_t, 0, "Absolute vertical movement detection treshold", 0.1, 0.)
|
||||
gen.add("neutral_alt", double_t, 0, "Reference altitude for vertical movement command", 0.8, 0.)
|
||||
gen.add("min_points_number", int_t, 0, "Minimal number of plane points needed for a valid estimation", 1000, 0)
|
||||
gen.add("neutral_alt", double_t, 0, "Reference altitude for vertical movement command", 1.1, 0.)
|
||||
gen.add("min_points_number", int_t, 0, "Minimal number of plane points needed for a valid estimation", 300, 0)
|
||||
gen.add("up_fact", double_t, 0, "Upward command amplification factor", 1.5, 1)
|
||||
gen.add("theta_minimal_deviation", double_t, 0, "Absolute angular movement detection treshold", 15., 0., 45.)
|
||||
gen.add("angle_vel", double_t, 0, "Angular velocity", 0.01, 0., 10.)
|
||||
gen.add("plan_vel", double_t, 0, "Translation velocity", 0.5, 0., 10.)
|
||||
gen.add("z_vel", double_t, 0, "Vertical translation velocity", 2., 0., 10.)
|
||||
gen.add("x_vel", double_t, 0, "X Translation velocity", 0.5, 0., 10.)
|
||||
gen.add("y_vel", double_t, 0, "Y Translation velocity", 0.3, 0., 10.)
|
||||
gen.add("z_vel", double_t, 0, "Vertical translation velocity", 1.5, 0., 10.)
|
||||
exit(gen.generate(PACKAGE, "hand_control", "Commander"))
|
||||
|
|
|
@ -29,7 +29,7 @@ class Run
|
|||
// zz > 0 : up
|
||||
// zz < 0 : down
|
||||
|
||||
float plan_vel, z_vel, angle_vel, up_factor, neutral_z;
|
||||
float x_vel, y_vel, z_vel, angle_vel, up_factor, neutral_z;
|
||||
|
||||
float max_curv;
|
||||
float z_dev_min, x_dev_min, y_dev_min, th_dev_min;
|
||||
|
@ -53,11 +53,11 @@ class Run
|
|||
|
||||
if (fabs(yy) > fabs(xx) && fabs(yy) > y_dev_min)
|
||||
{
|
||||
mvt->linear.y = yy * plan_vel;
|
||||
mvt->linear.y = yy * y_vel;
|
||||
}
|
||||
else if (fabs(xx) > x_dev_min)
|
||||
{
|
||||
mvt->linear.x = - xx * plan_vel;
|
||||
mvt->linear.x = - xx * x_vel;
|
||||
}
|
||||
|
||||
if (fabs(theta) > th_dev_min) {
|
||||
|
@ -118,7 +118,8 @@ class Run
|
|||
neutral_z = c.neutral_alt;
|
||||
min_number = c.min_points_number;
|
||||
up_factor = c.up_fact;
|
||||
plan_vel = c.plan_vel;
|
||||
x_vel = c.x_vel;
|
||||
y_vel = c.y_vel;
|
||||
z_vel = c.z_vel;
|
||||
angle_vel = c.angle_vel;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue