mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Generalised code for object_name
Previous code was generating the error on changing object_name in config/panda_config.yaml file because of this bug as here we are overwriting the object_name as "object" which brought the inconsistency in code.
This commit is contained in:
parent
ef6cb1a746
commit
de79dedbfc
@ -84,7 +84,7 @@ void PickPlaceTask::loadParameters() {
|
|||||||
|
|
||||||
void PickPlaceTask::init() {
|
void PickPlaceTask::init() {
|
||||||
ROS_INFO_NAMED(LOGNAME, "Initializing task pipeline");
|
ROS_INFO_NAMED(LOGNAME, "Initializing task pipeline");
|
||||||
const std::string object = "object";
|
const std::string object = object_name_;
|
||||||
|
|
||||||
// Reset ROS introspection before constructing the new object
|
// Reset ROS introspection before constructing the new object
|
||||||
// TODO(henningkayser): verify this is a bug, fix if possible
|
// TODO(henningkayser): verify this is a bug, fix if possible
|
||||||
@ -121,7 +121,7 @@ void PickPlaceTask::init() {
|
|||||||
{
|
{
|
||||||
auto _current_state = std::make_unique<stages::CurrentState>("current state");
|
auto _current_state = std::make_unique<stages::CurrentState>("current state");
|
||||||
|
|
||||||
// Verify that object is not attachd
|
// Verify that object is not attached
|
||||||
auto applicability_filter =
|
auto applicability_filter =
|
||||||
std::make_unique<stages::PredicateFilter>("applicability test", std::move(_current_state));
|
std::make_unique<stages::PredicateFilter>("applicability test", std::move(_current_state));
|
||||||
applicability_filter->setPredicate([object](const SolutionBase& s, std::string& comment) {
|
applicability_filter->setPredicate([object](const SolutionBase& s, std::string& comment) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user