Skip to content
Snippets Groups Projects
Commit 96a6b567 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Minor changes to execute the algorithm to go downstairs.

parent 0602c6d7
No related branches found
No related tags found
1 merge request!4Filtered localization
...@@ -64,7 +64,8 @@ gen.add("A_SHIFT", double_t, 0, " ...@@ -64,7 +64,8 @@ gen.add("A_SHIFT", double_t, 0, "
gen.add("Y_SPREAD", double_t, 0, "Leg separation when advancing", 0.02, 0.01, 0.1) gen.add("Y_SPREAD", double_t, 0, "Leg separation when advancing", 0.02, 0.01, 0.1)
gen.add("X_SHIFT_BODY", double_t, 0, "Whole body advance when shifting weight",0.035,0.01,0.1) gen.add("X_SHIFT_BODY", double_t, 0, "Whole body advance when shifting weight",0.035,0.01,0.1)
gen.add("load_config", bool_t, 0, "Load current parameters", False) gen.add("load_config", bool_t, 0, "Load current parameters", False)
gen.add("start_climbing", bool_t, 0, "Start climbing stairs", False) gen.add("start_upstairs", bool_t, 0, "Start up stairs", False)
gen.add("start_downstairs", bool_t, 0, "Start down stairs", False)
gen.add("stop_climbing", bool_t, 0, "Stop climbing stairs", False) gen.add("stop_climbing", bool_t, 0, "Stop climbing stairs", False)
exit(gen.generate(PACKAGE, "StairsClient", "StairsClient")) exit(gen.generate(PACKAGE, "StairsClient", "StairsClient"))
...@@ -80,10 +80,15 @@ void StairsClientAlgNode::node_config_update(Config &config, uint32_t level) ...@@ -80,10 +80,15 @@ void StairsClientAlgNode::node_config_update(Config &config, uint32_t level)
this->stairs.set_x_shift_body(config.X_SHIFT_BODY); this->stairs.set_x_shift_body(config.X_SHIFT_BODY);
config.load_config=false; config.load_config=false;
} }
else if(config.start_climbing) else if(config.start_upstairs)
{ {
this->stairs.start(true); this->stairs.start(true);
config.start_climbing=false; config.start_upstairs=false;
}
else if(config.start_downstairs)
{
this->stairs.start(false);
config.start_downstairs=false;
} }
else if(config.stop_climbing) else if(config.stop_climbing)
{ {
......
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