We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca38d11 commit ee7cec2Copy full SHA for ee7cec2
core/src/stages/fixed_state.cpp
@@ -45,6 +45,7 @@ namespace stages {
45
46
FixedState::FixedState(const std::string& name, planning_scene::PlanningScenePtr scene)
47
: Generator(name), scene_(scene) {
48
+ properties().declare("ignore_collisions", false);
49
setCostTerm(std::make_unique<cost::Constant>(0.0));
50
}
51
@@ -62,7 +63,10 @@ bool FixedState::canCompute() const {
62
63
64
65
void FixedState::compute() {
- spawn(InterfaceState(scene_), 0.0);
66
+ auto cost = !properties().get<bool>("ignore_collisions") && scene_->isStateColliding() ?
67
+ std::numeric_limits<double>::infinity() :
68
+ 0.0;
69
+ spawn(InterfaceState(scene_), cost);
70
ran_ = true;
71
72
} // namespace stages
0 commit comments