ros-industrial / industrial_training

ROS-Industrial Training Material
https://industrial-training-master.readthedocs.io
Apache License 2.0
417 stars 234 forks source link

build error: no matching function for call to ‘moveit::core::RobotState::attachBody #400

Closed mugishastanley closed 11 months ago

mugishastanley commented 11 months ago

Perception-Driven Manipulation » Package Setup

When I run colcon build on ubuntu 22:04 ROS humble. "~/workspace/perception_driven_ws/src/template_ws/src/pick_and_place_application/src/tasks/set_attached_object.cpp:34:30: error: no matching function for call to ‘moveit::core::RobotState::attachBody(std::string&, std::vector<std::shared_ptr >&, EigenSTL::vector_Isometry3d&, std::vector<std::__cxx11::basic_string >&, std::string&)’ 34 | current_state->attachBody( | ~~~~~^ 35 | cfg.ATTACHED_OBJECT_LINK_NAME, shapes_array, pose_array, cfg.TOUCH_LINKS, cfg.TCP_LINK_NAME); | ~~~~~~~~~~~~~~~~~~~~ In file included from /opt/ros/humble/include/moveit/planning_scene/planning_scene.h:40, from /opt/ros/humble/include/moveit/planning_scene_monitor/planning_scene_monitor.h:43,"

reidchristopher commented 11 months ago

Looks like the fix to this only made it to the solution_ws in this repo. I'll update the template_ws and get that pushed up. In the meantime, you replace that function call with:

current_state->attachBody(
        cfg.ATTACHED_OBJECT_LINK_NAME, Eigen::Isometry3d::Identity(), shapes_array, pose_array, cfg.TOUCH_LINKS, cfg.TCP_LINK_NAME); 

Or just copy the solution_ws/src/pick_and_place_application/src/tasks/set_attached_object.cpp into your workspace. This file doesn't get modified as part of the exercise.