You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MoveIt Task Constructor package contains several basic examples and a pick-and-place demo.
@@ -508,7 +508,7 @@ Finally, we have ``main``: the following lines create a node using the class def
508
508
5 Running the Demo
509
509
------------------
510
510
511
-
5.1 Launch files
511
+
5.1 Launch Files
512
512
^^^^^^^^^^^^^^^^
513
513
514
514
We will need a launch file to launch the ``move_group``, ``ros2_control``, ``static_tf``, ``robot_state_publisher``, and ``rviz`` nodes that provide us the environment to run the demo. The one we will use for this example can be found :codedir:`here<tutorials/pick_and_place_with_moveit_task_constructor/launch/mtc_demo.launch.py>`.
@@ -536,7 +536,7 @@ To run the MoveIt Task Constructor node, we need a second launch file to start t
536
536
537
537
return LaunchDescription([pick_place_demo])
538
538
539
-
Save a launch file as ``pick_place_demo.launch.py`` or download ours to the package's launch directory. Make sure to edit the ``CMakeLists.txt`` so it includes the launch folder by adding the following lines: ::
539
+
Save a launch file as ``pick_place_demo.launch.py`` or download one to the package's launch directory. Make sure to edit the ``CMakeLists.txt`` so it includes the launch folder by adding the following lines: ::
540
540
541
541
install(DIRECTORY launch
542
542
DESTINATION share/${PROJECT_NAME}
@@ -591,7 +591,7 @@ So far, we've walked through creating and executing a simple task, which runs bu
591
591
.. image:: stages.png
592
592
:width:700px
593
593
594
-
We will start adding stages after our existing open hand stage here:
594
+
We will start adding stages after our existing open hand stage. Open ``mtc_node.cpp`` and locate the following lines:
595
595
596
596
.. code-block:: c++
597
597
@@ -763,11 +763,14 @@ With this, we have all the stages needed to pick the object. Now, we add the ser
763
763
task.add(std::move(grasp));
764
764
}
765
765
766
+
To test out the newly created stage, build the code and execute: ::
Now that the stages that define the pick are complete, we move on to defining the stages for placing the object. We start with a ``Connect`` stage to connect the two, as we will soon be using a generator stage to generate the pose for placing the object.
773
+
Now that the stages that define the pick are complete, we move on to defining the stages for placing the object. Picking up where we left off, we add a ``Connect`` stage to connect the two, as we will soon be using a generator stage to generate the pose for placing the object.
771
774
772
775
.. code-block:: c++
773
776
@@ -901,10 +904,13 @@ All these stages should be added above these lines.
901
904
return task;
902
905
}
903
906
904
-
Congratulations! You've now defined a pick and place task using MoveIt Task Constructor!
907
+
Congratulations! You've now defined a pick and place task using MoveIt Task Constructor! To try it out, build the code and execute: ::
The task with each comprising stage is shown in the Motion Planning Tasks pane. Click on a stage and additional information about the stage will show up to the right. The right pane shows different solutions as well as their associated costs. Depending on the stage type and the robot configuration, there may only be one solution shown.
When running MTC, it prints a diagram like this to terminal:
925
931
@@ -938,7 +944,7 @@ The second stage ("move_to_home") is a ``MoveTo`` type of stage. It inherits its
938
944
939
945
In this case, we could tell that "move_to_home" was the root cause of the failure. The problem was a home state that was in collision. Defining a new, collision-free home position fixed the issue.
940
946
941
-
7.2 Various hints
947
+
7.2 Stages
942
948
^^^^^^^^^^^^^^^^^
943
949
944
950
Information about individual stages can be retrieved from the task. For example, here we retrieve the unique ID for a stage: ::
0 commit comments