3737#include < moveit/task_constructor/container_p.h>
3838#include < moveit/task_constructor/introspection.h>
3939#include < moveit/task_constructor/merge.h>
40+ #include < moveit/task_constructor/moveit_compat.h>
4041#include < moveit/planning_scene/planning_scene.h>
42+ #include < moveit/trajectory_processing/time_optimal_trajectory_generation.h>
4143
4244#include < ros/console.h>
4345
4951#include < functional>
5052
5153using namespace std ::placeholders;
54+ using namespace trajectory_processing ;
5255
5356namespace moveit {
5457namespace task_constructor {
@@ -635,7 +638,7 @@ void SerialContainerPrivate::validateConnectivity() const {
635638 ContainerBasePrivate::validateConnectivity ();
636639
637640 InterfaceFlags mine = interfaceFlags ();
638- // check that input / output interface of first / last child matches this' resp. interface
641+ // check that input/ output interface of first/ last child matches this' resp. interface
639642 validateInterface<START_IF_MASK>(*children ().front ()->pimpl (), mine);
640643 validateInterface<END_IF_MASK>(*children ().back ()->pimpl (), mine);
641644
@@ -647,7 +650,7 @@ void SerialContainerPrivate::validateConnectivity() const {
647650 const StagePrivate* const cur_impl = **cur;
648651 InterfaceFlags required = cur_impl->interfaceFlags ();
649652
650- // get iterators to prev / next stage in sequence
653+ // get iterators to prev/ next stage in sequence
651654 auto prev = cur;
652655 --prev;
653656 auto next = cur;
@@ -750,7 +753,7 @@ void ParallelContainerBasePrivate::validateInterfaces(const StagePrivate& child,
750753void ParallelContainerBasePrivate::validateConnectivity () const {
751754 InterfaceFlags my_interface = interfaceFlags ();
752755
753- // check that input / output interfaces of all children are handled by my interface
756+ // check that input/ output interfaces of all children are handled by my interface
754757 for (const auto & child : children ())
755758 validateInterfaces (*child->pimpl (), my_interface);
756759
@@ -1084,7 +1087,10 @@ void MergerPrivate::resolveInterface(InterfaceFlags expected) {
10841087 }
10851088}
10861089
1087- Merger::Merger (const std::string& name) : Merger(new MergerPrivate(this , name)) {}
1090+ Merger::Merger (const std::string& name) : Merger(new MergerPrivate(this , name)) {
1091+ properties ().declare <TimeParameterizationPtr>(" time_parameterization" ,
1092+ std::make_shared<TimeOptimalTrajectoryGeneration>());
1093+ }
10881094
10891095void Merger::reset () {
10901096 ParallelContainerBase::reset ();
@@ -1237,7 +1243,8 @@ void MergerPrivate::merge(const ChildSolutionList& sub_solutions,
12371243 moveit::core::JointModelGroup* jmg = jmg_merged_.get ();
12381244 robot_trajectory::RobotTrajectoryPtr merged;
12391245 try {
1240- merged = task_constructor::merge (sub_trajectories, start_scene->getCurrentState (), jmg);
1246+ auto timing = me_->properties ().get <TimeParameterizationPtr>(" time_parameterization" );
1247+ merged = task_constructor::merge (sub_trajectories, start_scene->getCurrentState (), jmg, *timing);
12411248 } catch (const std::runtime_error& e) {
12421249 SubTrajectory t;
12431250 t.markAsFailure ();
0 commit comments