Skip to content
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

documenting instructions for the pick-and-place task #238

Merged
merged 7 commits into from
Jul 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into illustrate_pick_place_task
rhaschke committed Jul 6, 2024
commit 2086b047fbc6fcf20eeea836ae4e57759ed4a7c9
10 changes: 4 additions & 6 deletions demo/src/pick_place_task.cpp
Original file line number Diff line number Diff line change
@@ -145,12 +145,12 @@ void PickPlaceTask::loadParameters() {
}

// The init function declares all movements for the pick-and-place task. These movements are described below.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The init function declares all movements for the pick-and-place task. These movements are described below.
// The init function declares all movements for the pick-and-place task.

void PickPlaceTask::init() {
bool PickPlaceTask::init() {
ROS_INFO_NAMED(LOGNAME, "Initializing task pipeline");
const std::string object = object_name_;

// Reset ROS introspection before constructing the new object
// TODO(henningkayser): verify this is a bug, fix if possible
// TODO(v4hn): global storage for Introspection services to enable one-liner
// Movements are collected inside a Task object.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit confusing with the previous two lines. Make this a line-end comment (put it at the end of the next line with two separating spaces).

task_.reset();
task_.reset(new moveit::task_constructor::Task());
@@ -181,8 +181,6 @@ void PickPlaceTask::init() {
* Current State *
* *
***************************************************/
// First, verify that the object is not already attached to the robot.
Stage* current_state_ptr = nullptr; // Forward current_state on to grasp pose generator
{
auto current_state = std::make_unique<stages::CurrentState>("current state");

@@ -269,8 +267,8 @@ void PickPlaceTask::init() {
stage->properties().set("marker_ns", "grasp_pose");
stage->setPreGraspPose(hand_open_pose_);
stage->setObject(object);
stage->setAngleDelta(M_PI / 4);
stage->setMonitoredStage(current_state_ptr); // Hook into current state
stage->setAngleDelta(M_PI / 12);
stage->setMonitoredStage(initial_state_ptr); // hook into successful initial-phase solutions

// Compute joint parameters for a target frame of the end effector. Each target frame equals a grasp pose
// from the previous stage times the inverse of the user-defined grasp_frame_tansform.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the grasp_frame_transform? Why times the inverse?

You are viewing a condensed version of this merge commit. You can view the full changes here.