Skip to content

ROS2 branch: difficulty in retrieving Stage ID #324

Description

@AndyZe

I'm having some trouble retrieving stage ID's. I've tried 4 different ways (attached).

For example, here I don't explicitly set the stage ID. When printed, all of the id fields are 0!

  {
    auto stage = std::make_unique<MoveTo>(
      PICK_STAGE_MAP.at(PickStageEnum::OPEN_FINGERS),
      sampling_planner);
    stage->setGroup(finger_group_);
    stage->setGoal(arm_prefix_ + "fingers_open");
    stage->setName(PICK_STAGE_MAP.at(PickStageEnum::OPEN_FINGERS));
    task_.add(std::move(stage));
  }

...

moveit_task_constructor_msgs::msg::Solution solution;
task_.solutions().front()->fillMessage(solution);
RCLCPP_INFO_STREAM(node->get_logger(), "Solution: " << moveit_task_constructor_msgs::msg::to_yaml(solution));

The other ways I tried (in brief) are:

  • Using Stage::introspectionId() where the stage is a member variabe unique_ptr

  • Setting the id explicity with task_.introspection().stageId(*open_fingers_stage_);. This does not compile.

  • Using Stage::introspectionId() where the stage is a local unique_ptr

introspectionid_member_variable.txt
print_message.txt
set_introspection_id_explicitly.txt
stage_introspectionId.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions