ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Madcreator's profile - activity

2023-07-02 05:11:26 -0500 received badge  Good Question (source)
2023-07-02 04:47:22 -0500 marked best answer MoveIt Task constructor - Merge example

Hi,

I am learning how to use MoveIt task constructor and as there is few examples and documentation about it, I am having a hard time to create a merge task : move both arms of a PR2 robot at the same time (ie: lower them of about 10 cm at the same time).

void planTest(Task &t) {

t.loadRobotModel();

auto cartesian = std::make_shared<solvers::CartesianPath>();
cartesian->setProperty("jump_threshold", 0.0);

Stage* current_state = nullptr;
auto initial = std::make_unique<stages::CurrentState>("current state");
current_state = initial.get();
t.add(std::move(initial));

// planner used for connect
auto pipeline = std::make_shared<solvers::PipelinePlanner>();
pipeline->setPlannerId("RRTConnectkConfigDefault");

auto merger = std::make_unique<Merger>();

{
        auto stage = std::make_unique<stages::MoveRelative>("lower object left", cartesian);
        stage->properties().set("marker_ns", "lower_object");
        stage->properties().set("link", "l_gripper_tool_frame");
        stage->properties().set("group","left_arm");
        stage->setMinMaxDistance(.03, .13);
        // Set downward direction
        geometry_msgs::Vector3Stamped vec;
        vec.header.frame_id = "base_footprint";
        vec.vector.z = -1.0;
        stage->setDirection(vec);

      merger->insert(std::move(stage));
}


{
        auto stage = std::make_unique<stages::MoveRelative>("lower object right", cartesian);
        stage->properties().set("marker_ns", "lower_object");
        stage->properties().set("link", "r_gripper_tool_frame");
        stage->properties().set("group","right_arm");
        stage->setMinMaxDistance(.03, .13);
        // Set downward direction
        geometry_msgs::Vector3Stamped vec;
        vec.header.frame_id = "base_footprint";
        vec.vector.z = -1.0;
        stage->setDirection(vec);

      merger->insert(std::move(stage));
}


t.add(std::move(merger));
}

The error returned when running is :

Error initializing stages: current state: required interface is not satisfied merger: start interface of 'lower object left' (↑) doesn't match mine (?) merger: start interface of 'lower object right' (↑) doesn't match mine (?) merger: no child provides expected push interface

I don't really manage to understand the "interface" mechanism of MoveIt task constructor and there isn't much information on internet...

I managed to understand and use "Alternatives" and normal task workflow by trial and error but merger seems to be trickier and no examples are available for now.

thanks for your help.

Regards,

2023-04-14 04:51:12 -0500 received badge  Nice Question (source)
2023-04-14 04:51:07 -0500 received badge  Nice Answer (source)
2022-12-27 00:25:41 -0500 received badge  Famous Question (source)
2022-12-27 00:25:41 -0500 received badge  Notable Question (source)
2022-08-08 02:27:34 -0500 received badge  Famous Question (source)
2021-11-09 13:57:20 -0500 received badge  Favorite Question (source)
2021-08-20 09:50:39 -0500 received badge  Notable Question (source)
2021-07-30 11:34:22 -0500 received badge  Necromancer (source)
2021-07-30 11:34:22 -0500 received badge  Self-Learner (source)
2021-07-30 11:34:22 -0500 received badge  Teacher (source)
2021-07-29 03:48:54 -0500 marked best answer User defined grasp pose for pick task

Hi,

I am quite satisfied with the grasp generator that MoveIt task constructor offers, but I wanted to know if and also how it would be possible to define a custom grasp pose instead of a generated one for a pick task.

Normally you would do this stage to create a pick :

{
    // grasp generator
    auto grasp_generator = std::make_unique<stages::GenerateGraspPose>("generate grasp pose left");
    grasp_generator->setAngleDelta(M_PI/4);
    grasp_generator->setPreGraspPose("left_open");
    grasp_generator->setGraspPose("left_close");
    grasp_generator->setMonitoredStage(current_state);

    auto grasp = std::make_unique<stages::SimpleGrasp>(std::move(stage));
    grasp->setIKFrame(Eigen::Affine3d::Identity(), "l_gripper_tool_frame");
    grasp->properties().configureInitFrom(Stage::PARENT);
    grasp->setMaxIKSolutions(10);


    // pick container, using the generated grasp generator
    auto pick = std::make_unique<stages::Pick>(std::move(grasp));
    pick->setProperty("eef", "left_gripper");
    pick->setProperty("object", std::string("object"));
    pick->properties().configureInitFrom(Stage::PARENT);

    geometry_msgs::TwistStamped approach;
    approach.header.frame_id = "l_wrist_roll_link";
    approach.twist.linear.x = 1.0;
    pick->setApproachMotion(approach, 0.01, 0.10);

    geometry_msgs::TwistStamped lift;
    lift.header.frame_id = "base_footprint";
    lift.twist.linear.z =  1.0;
    pick->setLiftMotion(lift, 0.05, 0.10);
    current_state = pick.get();
    t.add(std::move(pick));
}

If I understand well, the grasp generator find possible grasp, these information are given to "SimpleGrasp" that assemble them with IK and gripper movement (in a serial container), then "Pick" is a serial container that compile previous information with approach and lift moves, right ?

I thought that I would need to generate a pose with "GeneratePose" stage (and also set the pregrasp and grasp property "manually") and then give it to "SimpleGrasp" but it doesn't seem to work.

Any idea on how I could use a custom grasp pose instead of using the grasp generator ?

Thanks in advance for the help,

Regards

2021-07-29 03:48:44 -0500 answered a question User defined grasp pose for pick task

I finally managed to add custom poses, you can find the stage here : https://github.com/YannickRiou/moveit_task_construc

2021-07-29 03:47:34 -0500 commented question User defined grasp pose for pick task

I finally managed to add custom poses, you can find the stage here : https://github.com/YannickRiou/moveit_task_construc

2021-07-28 12:06:35 -0500 received badge  Student (source)
2021-07-28 11:33:39 -0500 received badge  Famous Question (source)
2021-06-08 04:18:16 -0500 received badge  Famous Question (source)
2021-06-08 04:18:16 -0500 received badge  Notable Question (source)
2021-06-08 04:18:16 -0500 received badge  Popular Question (source)
2021-05-25 06:41:14 -0500 received badge  Popular Question (source)
2021-05-11 02:52:09 -0500 edited question Move It task constructor clearance cost

Move It task constructor clearance cost Hi, I found that there is a new way to add cost when computing IK in Moveit Ta

2021-05-11 02:50:45 -0500 asked a question Move It task constructor clearance cost

Move It task constructor clearance cost Hi, I found that there is a new way to add cost when computing IK in Moveit Ta

2021-03-19 08:44:59 -0500 received badge  Famous Question (source)
2021-03-19 08:44:56 -0500 received badge  Famous Question (source)
2021-01-15 04:34:10 -0500 received badge  Notable Question (source)
2021-01-14 02:48:28 -0500 received badge  Notable Question (source)
2021-01-14 02:48:28 -0500 received badge  Popular Question (source)
2020-11-30 04:08:03 -0500 asked a question moveit: Bullet for continuous collision checking and planning

Bullet for continuous collision checking and planning Hi, I saw here that bullet can be used for continuous collision

2020-09-06 22:52:10 -0500 received badge  Popular Question (source)
2020-08-29 14:21:10 -0500 received badge  Notable Question (source)
2020-08-29 14:19:49 -0500 received badge  Popular Question (source)
2020-07-08 04:37:54 -0500 edited question Moveit Task constructor properties propagation

Moveit Task constructor properties propagation ROS distro : kinetic Moveit task constructor branch : master Moveit br

2020-07-08 04:37:19 -0500 edited question Moveit Task constructor properties propagation

Moveit Task constructor properties propagation ROS distro : kinetic Moveit task constructor branch : master Moveit br

2020-07-08 04:36:07 -0500 asked a question Moveit Task constructor properties propagation

Moveit Task constructor properties propagation ROS distro : kinetic Moveit task constructor branch : master Moveit br

2020-06-16 10:10:56 -0500 commented question User defined grasp pose for pick task

I found that I would need to carry all of the "open gripper, approach, close gripper, attach object" manually in a seria

2020-06-16 10:10:56 -0500 received badge  Commentator
2020-06-16 06:57:04 -0500 received badge  Notable Question (source)
2020-06-16 05:12:38 -0500 marked best answer MoveIt custom capability error

Hi !

I am working on a custom-made (not by me) moveit capability on Moveit and Ros Kinetic and I am encountering an error that I don't manage to understand. As an information, I am working on Rviz with fake execution.

The pick is getting preempted due to an error here (https://github.com/ros-planning/movei... --> line 502 : Execution of path-completion side-effect failed. Preempting). The capability is strongly based on the pick_place_action_capability from Moveit. I just want to understand what this error means (change in scene, planning that isn't feasible, etc.) in order to be able to debug the real cause. I can see that the plan is getting well (I can preview it if I do a plan only). And also on Rviz the pick seems to go all the way to the end (the gripper is grasping the object well).But at the moment the gripper close, it is preempted.

Can anyone enlight me about this error ?

Thanks in advance,

Regards,

2020-06-16 05:12:15 -0500 edited question MoveIt custom capability error

MoveIt custom capability error Hi ! I am working on a custom-made (not by me) moveit capability on Moveit and Ros Kine

2020-06-16 05:11:48 -0500 marked best answer MoveIt task constructor custom stages

Hi !

I want to create a custom stage to be able to pick/place object with dual arms. I found that is it possible to do so as TAMS-group created a stage to pour (https://github.com/TAMS-Group/mtc_pou...). I also looked at the primitive stages like "pick" but I can't manage to understand what are the essential function that need to be implemented in order to work well with other stages.

And also to better understand how stages work : how does the pick stage interface with movegroup low level function pick ?(is the stage completly replacing the movegroup pick function ?)

And finally is there tutorials on how to create custom stages for MTC ?

Thanks in advance,

Regards,

2020-06-16 05:11:34 -0500 received badge  Popular Question (source)
2020-06-15 09:32:41 -0500 received badge  Famous Question (source)
2020-06-12 04:33:12 -0500 edited question User defined grasp pose for pick task

User defined grasp pose for pick task Hi, I am quite satisfied with the grasp generator that MoveIt task constructor

2020-06-12 04:24:08 -0500 marked best answer Moveit task constructor and PR2 gripper sensor

Hi, I am using Moveit task constructor to build complex task for PR2 robot. I want to add gripper sensor function (accelerometer, force sensor) to allow PR2 to know when to release object (when human tries to get it from the gripper), or grab the object with a certain force. As the gripper sensor existing code is based on action servers, I understand that I can't use it "directly" with moveit task constructor (because if I understand well, MTC is generating trajectories for each stages and then tries to plan a path connecting all the sub-trajectories). The action servers from gripper_sensors seems to only publish command to topic handling low level sensor controller. What would be the best way to add gripper sensor functionnality into MTC ? Getting rid of the action server and add the code into a custom stage ?

If my understanding on some point of MTC is false, please feel free to correct me (I am still learning how MTC works) .

Regards