69 moveit_msgs::msg::MotionSequenceRequest req;
71 std::vector<std::string> group_names;
72 for (
const auto& cmd : cmds_)
74 moveit_msgs::msg::MotionSequenceItem item;
77 if (std::find(group_names.begin(), group_names.end(), item.req.group_name) != group_names.end())
81 item.req.start_state = moveit_msgs::msg::RobotState();
85 group_names.emplace_back(item.req.group_name);
88 item.blend_radius = cmd.second;
89 req.items.push_back(item);
96 const size_t orig_n{
size() };
97 if (start > orig_n || end > orig_n)
100 msg.append(
"Parameter start=").append(std::to_string(start));
101 msg.append(
" and end=").append(std::to_string(end));
102 msg.append(
" must not be greater then the number of #commands=");
103 msg.append(std::to_string(
size()));
104 throw std::invalid_argument(msg);
106 cmds_.erase(cmds_.begin() + start, cmds_.begin() + end);
110 cmds_.at(
size() - 1).second = 0.;