-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds orientation constraints #55
Changes from 3 commits
6fad1fd
5d894c8
ca77262
7164d03
66f6797
b4b99a0
f04c8db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,16 +101,16 @@ int main(int argc, char** argv) | |
|
||
// Now wait for the user to press Next before trying the planar constraints. | ||
moveit_visual_tools.prompt( | ||
"Press 'Next' in the RvizVisualToolsGui window to continue to the planar constraint example"); | ||
"Press 'Next' in the RvizVisualToolsGui window to continue to the orientation constraint example"); | ||
|
||
// Clear the path constraints and markers for the next example | ||
reset_demo(); | ||
/*reset_demo();*/ | ||
|
||
// In the second problem we plan with the end-effector constrained to a plane. | ||
// We need to create a pose goal that lies in this plane. | ||
// The plane is tilted by 45 degrees, so moving an equal amount in the y and z direction should be ok. | ||
// Any goal or start state should also satisfy the path constraints. | ||
target_pose = get_relative_pose(0.0, 0.3, -0.3); | ||
/*target_pose = get_relative_pose(0.0, 0.3, -0.3);*/ | ||
|
||
// We create a plane perpendicular to the y-axis and tilt it by 45 degrees | ||
|
||
|
@@ -122,88 +122,88 @@ int main(int argc, char** argv) | |
// (:code:`1e-4` by default). MoveIt will use the stricter tolerance (the box width) to check the constraints, and | ||
// many states will appear invalid. That's where the magic number :code:`0.0005` comes from, it is between | ||
// :code:`0.00001` and :code:`0.001`. | ||
moveit_msgs::msg::PositionConstraint plane_constraint; | ||
plane_constraint.header.frame_id = move_group_interface.getPoseReferenceFrame(); | ||
plane_constraint.link_name = move_group_interface.getEndEffectorLink(); | ||
shape_msgs::msg::SolidPrimitive plane; | ||
plane.type = shape_msgs::msg::SolidPrimitive::BOX; | ||
plane.dimensions = { 1.0, 0.0005, 1.0 }; | ||
plane_constraint.constraint_region.primitives.emplace_back(plane); | ||
|
||
geometry_msgs::msg::Pose plane_pose; | ||
plane_pose.position.x = current_pose.pose.position.x; | ||
plane_pose.position.y = current_pose.pose.position.y; | ||
plane_pose.position.z = current_pose.pose.position.z; | ||
plane_pose.orientation.x = sin(M_PI_4 / 2); | ||
plane_pose.orientation.y = 0.0; | ||
plane_pose.orientation.z = 0.0; | ||
plane_pose.orientation.w = cos(M_PI_4 / 2); | ||
plane_constraint.constraint_region.primitive_poses.emplace_back(plane_pose); | ||
plane_constraint.weight = 1.0; | ||
|
||
// Visualize the constraint | ||
auto d = sqrt(pow(target_pose.pose.position.y, 2) + pow(target_pose.pose.position.z, 2)); | ||
|
||
Eigen::Vector3d normal(0, 1, 1); | ||
moveit_visual_tools.publishNormalAndDistancePlane(normal, d, rviz_visual_tools::TRANSLUCENT_DARK); | ||
moveit_visual_tools.trigger(); | ||
|
||
moveit_msgs::msg::Constraints plane_constraints; | ||
plane_constraints.position_constraints.emplace_back(plane_constraint); | ||
plane_constraints.name = "use_equality_constraints"; | ||
move_group_interface.setPathConstraints(plane_constraints); | ||
|
||
// And again, configure and solve the planning problem | ||
move_group_interface.setPoseTarget(target_pose); | ||
move_group_interface.setPlanningTime(10.0); | ||
|
||
success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS); | ||
RCLCPP_INFO(LOGGER, "Plan with plane constraint %s", success ? "" : "FAILED"); | ||
|
||
moveit_visual_tools.prompt( | ||
"Press 'next' in the RvizVisualToolsGui window to continue to the linear constraint example"); | ||
|
||
reset_demo(); | ||
|
||
// We can also plan along a line. We can use the same pose as last time. | ||
target_pose = get_relative_pose(0.0, 0.3, -0.3); | ||
|
||
// Building on the previous constraint, we can make it a line, by also reducing the dimension of the box in the x-direction. | ||
moveit_msgs::msg::PositionConstraint line_constraint; | ||
line_constraint.header.frame_id = move_group_interface.getPoseReferenceFrame(); | ||
line_constraint.link_name = move_group_interface.getEndEffectorLink(); | ||
shape_msgs::msg::SolidPrimitive line; | ||
line.type = shape_msgs::msg::SolidPrimitive::BOX; | ||
line.dimensions = { 0.0005, 0.0005, 1.0 }; | ||
line_constraint.constraint_region.primitives.emplace_back(line); | ||
|
||
geometry_msgs::msg::Pose line_pose; | ||
line_pose.position.x = current_pose.pose.position.x; | ||
line_pose.position.y = current_pose.pose.position.y; | ||
line_pose.position.z = current_pose.pose.position.z; | ||
line_pose.orientation.x = sin(M_PI_4 / 2); | ||
line_pose.orientation.y = 0.0; | ||
line_pose.orientation.z = 0.0; | ||
line_pose.orientation.w = cos(M_PI_4 / 2); | ||
line_constraint.constraint_region.primitive_poses.emplace_back(line_pose); | ||
line_constraint.weight = 1.0; | ||
|
||
// Visualize the constraint | ||
moveit_visual_tools.publishLine(current_pose.pose.position, target_pose.pose.position, | ||
rviz_visual_tools::TRANSLUCENT_DARK); | ||
moveit_visual_tools.trigger(); | ||
|
||
moveit_msgs::msg::Constraints line_constraints; | ||
line_constraints.position_constraints.emplace_back(line_constraint); | ||
line_constraints.name = "use_equality_constraints"; | ||
move_group_interface.setPathConstraints(line_constraints); | ||
move_group_interface.setPoseTarget(target_pose); | ||
|
||
success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS); | ||
RCLCPP_INFO(LOGGER, "Plan with line constraint %s", success ? "" : "FAILED"); | ||
|
||
moveit_visual_tools.prompt( | ||
"Press 'Next' in the RvizVisualToolsGui window to continue to the orientation constraint example"); | ||
/*moveit_msgs::msg::PositionConstraint plane_constraint;*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove whatever is commented out There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
/*plane_constraint.header.frame_id = move_group_interface.getPoseReferenceFrame();*/ | ||
/*plane_constraint.link_name = move_group_interface.getEndEffectorLink();*/ | ||
/*shape_msgs::msg::SolidPrimitive plane;*/ | ||
/*plane.type = shape_msgs::msg::SolidPrimitive::BOX;*/ | ||
/*plane.dimensions = { 1.0, 0.0005, 1.0 };*/ | ||
/*plane_constraint.constraint_region.primitives.emplace_back(plane);*/ | ||
/**/ | ||
/*geometry_msgs::msg::Pose plane_pose;*/ | ||
/*plane_pose.position.x = current_pose.pose.position.x;*/ | ||
/*plane_pose.position.y = current_pose.pose.position.y;*/ | ||
/*plane_pose.position.z = current_pose.pose.position.z;*/ | ||
/*plane_pose.orientation.x = sin(M_PI_4 / 2);*/ | ||
/*plane_pose.orientation.y = 0.0;*/ | ||
/*plane_pose.orientation.z = 0.0;*/ | ||
/*plane_pose.orientation.w = cos(M_PI_4 / 2);*/ | ||
/*plane_constraint.constraint_region.primitive_poses.emplace_back(plane_pose);*/ | ||
/*plane_constraint.weight = 1.0;*/ | ||
/**/ | ||
/*// Visualize the constraint*/ | ||
/*auto d = sqrt(pow(target_pose.pose.position.y, 2) + pow(target_pose.pose.position.z, 2));*/ | ||
/**/ | ||
/*Eigen::Vector3d normal(0, 1, 1);*/ | ||
/*moveit_visual_tools.publishNormalAndDistancePlane(normal, d, rviz_visual_tools::TRANSLUCENT_DARK);*/ | ||
/*moveit_visual_tools.trigger();*/ | ||
/**/ | ||
/*moveit_msgs::msg::Constraints plane_constraints;*/ | ||
/*plane_constraints.position_constraints.emplace_back(plane_constraint);*/ | ||
/*plane_constraints.name = "use_equality_constraints";*/ | ||
/*move_group_interface.setPathConstraints(plane_constraints);*/ | ||
/**/ | ||
/*// And again, configure and solve the planning problem*/ | ||
/*move_group_interface.setPoseTarget(target_pose);*/ | ||
/*move_group_interface.setPlanningTime(10.0);*/ | ||
/**/ | ||
/*success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS);*/ | ||
/*RCLCPP_INFO(LOGGER, "Plan with plane constraint %s", success ? "" : "FAILED");*/ | ||
/**/ | ||
/*moveit_visual_tools.prompt(*/ | ||
/* "Press 'next' in the RvizVisualToolsGui window to continue to the linear constraint example");*/ | ||
/**/ | ||
/*reset_demo();*/ | ||
/**/ | ||
/*// We can also plan along a line. We can use the same pose as last time.*/ | ||
/*target_pose = get_relative_pose(0.0, 0.3, -0.3);*/ | ||
/**/ | ||
/*// Building on the previous constraint, we can make it a line, by also reducing the dimension of the box in the x-direction.*/ | ||
/*moveit_msgs::msg::PositionConstraint line_constraint;*/ | ||
/*line_constraint.header.frame_id = move_group_interface.getPoseReferenceFrame();*/ | ||
/*line_constraint.link_name = move_group_interface.getEndEffectorLink();*/ | ||
/*shape_msgs::msg::SolidPrimitive line;*/ | ||
/*line.type = shape_msgs::msg::SolidPrimitive::BOX;*/ | ||
/*line.dimensions = { 0.0005, 0.0005, 1.0 };*/ | ||
/*line_constraint.constraint_region.primitives.emplace_back(line);*/ | ||
/**/ | ||
/*geometry_msgs::msg::Pose line_pose;*/ | ||
/*line_pose.position.x = current_pose.pose.position.x;*/ | ||
/*line_pose.position.y = current_pose.pose.position.y;*/ | ||
/*line_pose.position.z = current_pose.pose.position.z;*/ | ||
/*line_pose.orientation.x = sin(M_PI_4 / 2);*/ | ||
/*line_pose.orientation.y = 0.0;*/ | ||
/*line_pose.orientation.z = 0.0;*/ | ||
/*line_pose.orientation.w = cos(M_PI_4 / 2);*/ | ||
/*line_constraint.constraint_region.primitive_poses.emplace_back(line_pose);*/ | ||
/*line_constraint.weight = 1.0;*/ | ||
/**/ | ||
/*// Visualize the constraint*/ | ||
/*moveit_visual_tools.publishLine(current_pose.pose.position, target_pose.pose.position,*/ | ||
/* rviz_visual_tools::TRANSLUCENT_DARK);*/ | ||
/*moveit_visual_tools.trigger();*/ | ||
/**/ | ||
/*moveit_msgs::msg::Constraints line_constraints;*/ | ||
/*line_constraints.position_constraints.emplace_back(line_constraint);*/ | ||
/*line_constraints.name = "use_equality_constraints";*/ | ||
/*move_group_interface.setPathConstraints(line_constraints);*/ | ||
/*move_group_interface.setPoseTarget(target_pose);*/ | ||
/**/ | ||
/*success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS);*/ | ||
/*RCLCPP_INFO(LOGGER, "Plan with line constraint %s", success ? "" : "FAILED");*/ | ||
/**/ | ||
/*moveit_visual_tools.prompt(*/ | ||
/* "Press 'Next' in the RvizVisualToolsGui window to continue to the orientation constraint example");*/ | ||
reset_demo(); | ||
|
||
// Finally, we can place constraints on orientation. | ||
|
@@ -229,42 +229,42 @@ int main(int argc, char** argv) | |
success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS); | ||
RCLCPP_INFO(LOGGER, "Plan with orientation constraint %s", success ? "" : "FAILED"); | ||
|
||
moveit_visual_tools.prompt("Press 'Next' in the RvizVisualToolsGui window to try mixed_constraints"); | ||
/*moveit_visual_tools.prompt("Press 'Next' in the RvizVisualToolsGui window to try mixed_constraints");*/ | ||
reset_demo(); | ||
|
||
// Finally, we can place constraints on orientation. | ||
// Use the target pose from the previous example | ||
target_pose = get_relative_pose(-0.6, 0.1, 0); | ||
|
||
// Reuse the orientation constraint, and make a new box constraint | ||
box.dimensions = { 1.0, 0.6, 1.0 }; | ||
box_constraint.constraint_region.primitives[0] = box; | ||
|
||
box_pose.position.x = 0; | ||
box_pose.position.y = -0.1; | ||
box_pose.position.z = current_pose.pose.position.z; | ||
box_constraint.constraint_region.primitive_poses[0] = box_pose; | ||
box_constraint.weight = 1.0; | ||
|
||
// Visualize the box constraint | ||
Eigen::Vector3d new_box_point_1(box_pose.position.x - box.dimensions[0] / 2, | ||
box_pose.position.y - box.dimensions[1] / 2, | ||
box_pose.position.z - box.dimensions[2] / 2); | ||
Eigen::Vector3d new_box_point_2(box_pose.position.x + box.dimensions[0] / 2, | ||
box_pose.position.y + box.dimensions[1] / 2, | ||
box_pose.position.z + box.dimensions[2] / 2); | ||
moveit_msgs::msg::Constraints mixed_constraints; | ||
mixed_constraints.position_constraints.emplace_back(box_constraint); | ||
mixed_constraints.orientation_constraints.emplace_back(orientation_constraint); | ||
moveit_visual_tools.publishCuboid(new_box_point_1, new_box_point_2, rviz_visual_tools::TRANSLUCENT_DARK); | ||
moveit_visual_tools.trigger(); | ||
|
||
move_group_interface.setPathConstraints(mixed_constraints); | ||
move_group_interface.setPoseTarget(target_pose); | ||
move_group_interface.setPlanningTime(20.0); | ||
|
||
success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS); | ||
RCLCPP_INFO(LOGGER, "Plan with mixed constraint %s", success ? "" : "FAILED"); | ||
/*target_pose = get_relative_pose(-0.6, 0.1, 0);*/ | ||
/**/ | ||
/*// Reuse the orientation constraint, and make a new box constraint*/ | ||
/*box.dimensions = { 1.0, 0.6, 1.0 };*/ | ||
/*box_constraint.constraint_region.primitives[0] = box;*/ | ||
/**/ | ||
/*box_pose.position.x = 0;*/ | ||
/*box_pose.position.y = -0.1;*/ | ||
/*box_pose.position.z = current_pose.pose.position.z;*/ | ||
/*box_constraint.constraint_region.primitive_poses[0] = box_pose;*/ | ||
/*box_constraint.weight = 1.0;*/ | ||
/**/ | ||
/*// Visualize the box constraint*/ | ||
/*Eigen::Vector3d new_box_point_1(box_pose.position.x - box.dimensions[0] / 2,*/ | ||
/* box_pose.position.y - box.dimensions[1] / 2,*/ | ||
/* box_pose.position.z - box.dimensions[2] / 2);*/ | ||
/*Eigen::Vector3d new_box_point_2(box_pose.position.x + box.dimensions[0] / 2,*/ | ||
/* box_pose.position.y + box.dimensions[1] / 2,*/ | ||
/* box_pose.position.z + box.dimensions[2] / 2);*/ | ||
/*moveit_msgs::msg::Constraints mixed_constraints;*/ | ||
/*mixed_constraints.position_constraints.emplace_back(box_constraint);*/ | ||
/*mixed_constraints.orientation_constraints.emplace_back(orientation_constraint);*/ | ||
/*moveit_visual_tools.publishCuboid(new_box_point_1, new_box_point_2, rviz_visual_tools::TRANSLUCENT_DARK);*/ | ||
/*moveit_visual_tools.trigger();*/ | ||
/**/ | ||
/*move_group_interface.setPathConstraints(mixed_constraints);*/ | ||
/*move_group_interface.setPoseTarget(target_pose);*/ | ||
/*move_group_interface.setPlanningTime(20.0);*/ | ||
/**/ | ||
/*success = (move_group_interface.plan(plan) == moveit::core::MoveItErrorCode::SUCCESS);*/ | ||
/*RCLCPP_INFO(LOGGER, "Plan with mixed constraint %s", success ? "" : "FAILED");*/ | ||
|
||
// Done! | ||
moveit_visual_tools.prompt("Press 'Next' in the RvizVisualToolsGui window to clear the markers"); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,7 @@ void KTOptPlanningContext::solve(planning_interface::MotionPlanResponse& res) | |
|
||
// process path_constraints | ||
addPathPositionConstraints(trajopt, plant, plant_context, params_.position_constraint_padding); | ||
addPathOrientationConstraints(trajopt, plant, plant_context, params_.orientation_constraint_padding); | ||
|
||
// solve the program | ||
auto result = Solve(prog); | ||
|
@@ -252,6 +253,73 @@ void KTOptPlanningContext::addPathPositionConstraints(KinematicTrajectoryOptimiz | |
} | ||
} | ||
|
||
void KTOptPlanningContext::addPathOrientationConstraints(KinematicTrajectoryOptimization& trajopt, | ||
const MultibodyPlant<double>& plant, | ||
Context<double>& plant_context, const double padding) | ||
{ | ||
// retrieve the motion planning request | ||
const auto& req = getMotionPlanRequest(); | ||
|
||
// check for path position constraints | ||
if (!req.path_constraints.orientation_constraints.empty()) | ||
{ | ||
for (const auto& orientation_constraint : req.path_constraints.orientation_constraints) | ||
{ | ||
// NOTE: Current thesis, when you apply a Drake Orientation Constraint it | ||
// expects the following | ||
// Frame A: The frame in which the orientation constraint is defined | ||
// Frame B: The frame to which the orientation constraint is enforced | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the code below, the roles of A and B are exactly swapped: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oooh nice catch. Thanks for that! However, I was adding it correctly into the constraints. I'll update the comments |
||
// theta_bound: The angle difference between frame A's orientation and | ||
// frame B's orientation | ||
|
||
// Extract FrameA and FrameB for orientation constraint | ||
// frame A | ||
const auto link_ee_name = orientation_constraint.link_name; | ||
if (!plant.HasBodyNamed(link_ee_name)) | ||
{ | ||
RCLCPP_ERROR(getLogger(), | ||
"The link specified in the PositionConstraint message, %s, does not exist in the Drake " | ||
sea-bass marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"plant.", | ||
link_ee_name.c_str()); | ||
continue; | ||
} | ||
const auto& link_ee_frame = plant.GetFrameByName(link_ee_name); | ||
|
||
// frame B | ||
const auto base_frame_name = orientation_constraint.header.frame_id; | ||
if (!plant.HasBodyNamed(base_frame_name)) | ||
{ | ||
RCLCPP_ERROR(getLogger(), | ||
"The link specified in the PositionConstraint message, %s, does not exist in the Drake " | ||
sea-bass marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"plant.", | ||
base_frame_name.c_str()); | ||
continue; | ||
} | ||
const auto& base_frame = plant.GetFrameByName(base_frame_name); | ||
|
||
// Extract the orientation of that Frame B needs to be constrained to w.r.t Frame A | ||
const auto& constrained_orientation = orientation_constraint.orientation; | ||
// convert to drake's RotationMatrix | ||
const auto R_BbarB = RotationMatrixd(Eigen::Quaterniond(constrained_orientation.w, constrained_orientation.x, | ||
constrained_orientation.y, constrained_orientation.z)); | ||
|
||
// NOTE: There are 3 tolerances given for the orientation constraint in moveit | ||
// message, rake only takes in a single theta bound. For now, we take any | ||
sea-bass marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// of the tolerances as the theta bound | ||
const double theta_bound = orientation_constraint.absolute_x_axis_tolerance; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think Probably just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, since This is still not a proper calculation, so I think we anyhow have to be "creative" in how we interpret the tolerances in the MoveIt message vs. what translates to here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is but only via the orientation padding parameter in the yaml file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, the variable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with #55 (comment) to use the norm or sum of all angle tolerances. MoveIt's orientation constraint is much more flexible than Drake's one, allowing deviations to be specified for all rotation axes separately. It will only translate in a meaningful way if the MoveIt tolerances are all identical. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So for this, a better approach would be to add an additional rotational transformation to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will not work. Drake's orientation constraint already fully constrains all three axes. Adding more orientation constraints doesn't make sense. |
||
|
||
// Add position constraint to each knot point of the trajectory | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was wondering in the last PR whether we should have used the same number of knot points for all position/orientation constraints. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a parameter, so the user has the option of adding more/less constraints along the path. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I meant should there be 2 separate parameters for position/orientation constraints, or just use the same parameter for all constraints? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I meant, right now even though im reading theta bound as the tolerance, I am using the one @sea-bass added as a parameter. |
||
for (int i = 0; i < params_.num_orientation_constraint_points; ++i) | ||
{ | ||
trajopt.AddPathPositionConstraint( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PositionConstraint? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strangely enough, this is correct... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the terminology reflects that it is indeed still a constraint on the generalized positions, which happens to be a vector in the configuration space. Therefore, you are adding a constraint on one coordinate (link end-effector) out of all the available coordinates. At least this is my understanding |
||
std::make_shared<OrientationConstraint>(&plant, base_frame, RotationMatrixd::Identity(), link_ee_frame, | ||
R_BbarB, padding, &plant_context), | ||
static_cast<double>(i) / (params_.num_position_constraint_points - 1)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
bool KTOptPlanningContext::terminate() | ||
{ | ||
RCLCPP_ERROR(getLogger(), "KTOptPlanningContext::terminate() is not implemented!"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just talked to Aditya and I think we should keep and uncomment as these are the move-on-line and move-within-plane demos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I do suspect that the rotated bounding box constraints may not work with the current implementation of position constraints -- there is another overload that accepts a rigid transform from a coordinate frame
A
toA_bar
which enables rotating the reference frame, and we may need to achieve this.Trying it out will tell.