46 std::vector<double> bounds;
47 auto joint_limits =
scene_->GetKinematicTree().GetJointLimits();
50 for (
unsigned int i = 0; i <
N; ++i)
52 bounds[i] = joint_limits(i, 0);
53 bounds[i +
N] = joint_limits(i, 1);
63 if (
init.Goal.size() ==
N)
67 else if (
init.Goal.size() == 0)
69 goal_ = Eigen::VectorXd::Zero(
N);
73 ThrowNamed(
"Dimension mismatch: problem N=" <<
N <<
", but goal state has dimension " <<
goal_.rows());
81 if (
init.JointVelocityLimits.size() != 0)
83 WARNING(
"The JointVelocityLimits initialiser is deprecated - use JointVelocityLimits in the Scene initialiser!");
84 Eigen::VectorXd velocity_limits(
N);
85 if (
init.JointVelocityLimits.size() ==
N)
87 velocity_limits =
init.JointVelocityLimits;
89 else if (
init.JointVelocityLimits.size() == 1)
91 velocity_limits =
init.JointVelocityLimits(0) * Eigen::VectorXd::Ones(
N);
95 ThrowNamed(
"Dimension mismatch: problem N=" <<
N <<
", but joint velocity limits has dimension " <<
init.JointVelocityLimits.rows());
97 scene_->GetKinematicTree().SetJointVelocityLimits(velocity_limits);
102 auto vel_limits =
scene_->GetKinematicTree().GetVelocityLimits();
103 HIGHLIGHT_NAMED(
"TimeIndexedSamplingProblem::Instantiate",
"Joint velocity limits: " << vel_limits.transpose());
128 scene_->GetKinematicTree().SetFloatingBaseLimitsPosXYZEulerZYX(
129 std::vector<double>(
init.FloatingBaseLowerLimits.data(),
init.FloatingBaseLowerLimits.data() +
init.FloatingBaseLowerLimits.size()),
130 std::vector<double>(
init.FloatingBaseUpperLimits.data(),
init.FloatingBaseUpperLimits.data() +
init.FloatingBaseUpperLimits.size()));
134 scene_->GetKinematicTree().SetPlanarBaseLimitsPosXYEulerZ(
135 std::vector<double>(
init.FloatingBaseLowerLimits.data(),
init.FloatingBaseLowerLimits.data() +
init.FloatingBaseLowerLimits.size()),
136 std::vector<double>(
init.FloatingBaseUpperLimits.data(),
init.FloatingBaseUpperLimits.data() +
init.FloatingBaseUpperLimits.size()));
165 ThrowPretty(
"Dimensionality of goal state wrong: Got " << qT.rows() <<
", expected " <<
N);
180 ThrowPretty(
"Cannot set Goal. Task map '" << task_name <<
"' does not exist.");
194 ThrowPretty(
"Cannot set rho. Task map '" << task_name <<
"' does not exist.");
206 ThrowPretty(
"Cannot get Goal. Task map '" << task_name <<
"' does not exist.");
218 ThrowPretty(
"Cannot get rho. Task map '" << task_name <<
"' does not exist.");
232 ThrowPretty(
"Cannot set Goal. Task map '" << task_name <<
"' does not exist.");
246 ThrowPretty(
"Cannot set rho. Task map '" << task_name <<
"' does not exist.");
258 ThrowPretty(
"Cannot get Goal. Task map '" << task_name <<
"' does not exist.");
270 ThrowPretty(
"Cannot get rho. Task map '" << task_name <<
"' does not exist.");
290 HIGHLIGHT_NAMED(
"TimeIndexedSamplingProblem::IsValid",
"Equality valid? = " << equality_is_valid <<
"\tInequality valid? = " << inequality_is_valid);
293 return (inequality_is_valid && equality_is_valid);
299 for (
int i = 0; i <
tasks_.size(); ++i)
tasks_[i]->is_used =
false;