MoveIt2 tutorial error Pick and Place
I'm using ros2 humble. I try to run the pick and place source code from the Moveit2 tutorial.
At first i run
ros2 launch moveit2_tutorials mtc_demo.launch.py
after i start
ros2 launch moveit2_tutorials pick_place_demo.launch.py
In RViz the pandas arm and a green cylinder spawns and I get following output.
ros2 launch moveit2_tutorials pick_place_demo.launch.py
[INFO] [launch]: All log files can be found below /home/luca/.ros/log/2022-10-13-08-33-46-627618-Lenovo-V15-G2-ALC-5420
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [mtc_tutorial-1]: process started with pid [5421]
[mtc_tutorial-1] [INFO] [1665642826.962234071] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00403836 seconds
[mtc_tutorial-1] [INFO] [1665642826.962293297] [moveit_robot_model.robot_model]: Loading robot model 'panda'...
[mtc_tutorial-1] Link panda_link1 had 1 children
[mtc_tutorial-1] Link panda_link2 had 1 children
[mtc_tutorial-1] Link panda_link3 had 1 children
[mtc_tutorial-1] Link panda_link4 had 1 children
[mtc_tutorial-1] Link panda_link5 had 1 children
[mtc_tutorial-1] Link panda_link6 had 1 children
[mtc_tutorial-1] Link panda_link7 had 1 children
[mtc_tutorial-1] Link panda_link8 had 1 children
[mtc_tutorial-1] Link panda_hand had 2 children
[mtc_tutorial-1] Link panda_leftfinger had 0 children
[mtc_tutorial-1] Link panda_rightfinger had 0 children
[mtc_tutorial-1] terminate called after throwing an instance of 'moveit::task_constructor::Property::undeclared'
[mtc_tutorial-1] what(): Property 'hand': undeclared
[mtc_tutorial-1] Stack trace (most recent call last):
[mtc_tutorial-1] #16 Object "", at 0xffffffffffffffff, in
[mtc_tutorial-1] #15 Object "/home/.../ws_moveit2/install/moveit2_tutorials/lib/moveit2_tutorials/mtc_tutorial", at 0x5635b0c89044, in _start
[mtc_tutorial-1] #14 Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7f5663c68e3f]
[mtc_tutorial-1] #13 Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7f5663c68d8f]
[mtc_tutorial-1] #12 Source "/home/.../ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/main.cpp", line 375, in main [0x5635b0c8e743]
[mtc_tutorial-1] 372: });
[mtc_tutorial-1] 373:
[mtc_tutorial-1] 374: mtc_task_node->setupPlanningScene();
[mtc_tutorial-1] > 375: mtc_task_node->doTask();
[mtc_tutorial-1] 376:
[mtc_tutorial-1] 377: spin_thread->join();
[mtc_tutorial-1] 378: rclcpp::shutdown();
[mtc_tutorial-1] #11 Source "/home/.../ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/main.cpp", line 69, in doTask [0x5635b0c895ec]
[mtc_tutorial-1] 67: void MTCTaskNode::doTask()
[mtc_tutorial-1] 68: {
[mtc_tutorial-1] > 69: task_ = createTask();
[mtc_tutorial-1] 70:
[mtc_tutorial-1] 71: try
[mtc_tutorial-1] 72: {
[mtc_tutorial-1] #10 Source "/home/.../ws_moveit2/src/moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/main.cpp", line 152, in createTask [0x5635b0c8a615]
[mtc_tutorial-1] 149: // In fact, `task` itself is a SerialContainer by default.
[mtc_tutorial-1] 150: {
[mtc_tutorial-1] 151: auto grasp = std::make_unique<mtc::SerialContainer>("pick object");
[mtc_tutorial-1] > 152: task.properties().exposeTo(grasp->properties(), { "eef", "hand", "group", "ik_frame" });
[mtc_tutorial-1] 153: // clang-format off
[mtc_tutorial-1] 154: grasp->properties().configureInitFrom(mtc::Stage::PARENT,
[mtc_tutorial-1] 155: { "eef", "hand", "group", "ik_frame" });
[mtc_tutorial-1] #9 Object "/home/.../ws_moveit2/install/moveit_task_constructor_core/lib/libmoveit_task_constructor_core.so", at 0x7f566458faf9, in moveit::task_constructor::PropertyMap::exposeTo(moveit::task_constructor::PropertyMap&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const
[mtc_tutorial-1] #8 Object "/home/.../ws_moveit2/install/moveit_task_constructor_core/lib/libmoveit_task_constructor_core.so", at 0x7f566458fa98, in moveit::task_constructor::PropertyMap::exposeTo(moveit::task_constructor::PropertyMap&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
[mtc_tutorial-1] #7 Object "/home/.../ws_moveit2/install/moveit_task_constructor_core/lib/libmoveit_task_constructor_core.so", at 0x7f566453ab85, in moveit::task_constructor::PropertyMap::property(std::__cxx11::basic_string<char, std ...
It can not find the property 'hand'. Did you define it? For example
Feel free to look at moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/src/main.cpp
Since i'm launching
i assume exactly this file will be started, right?
Here is the path of the file
I'm not sure about what it is launching because in the Launchfile
it says the executable mtc_tutorial is in the package moveit2_tutorials.
But i cant find the executable mtc_tutorial in there.
It is mentioned moveit2_tutorials/doc/tutorials/pick_and_place_with_moveit_task_constructor/CMakeLists.txt#L1-L3