moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.04k stars 510 forks source link

Cannot install moveit tutorial #1084

Closed brianng0305 closed 2 years ago

brianng0305 commented 2 years ago

System: Ubuntu20.04 ROS2: FOXY - Debian MOVEIT2: Binary

I used binary install moveit2 but cannot locate the moveit2_tutorial. May you please tell me how to locate it to let me open the rviz? I tried to build according to the tutorial but it failed at moveit_core

below are the log

colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release
[0.281s] WARNING:colcon.colcon_core.verb:Some selected packages are already built in one or more underlay workspaces:
    'geometric_shapes' is in: /opt/ros/foxy
    'moveit_msgs' is in: /opt/ros/foxy
    'moveit_resources_fanuc_description' is in: /opt/ros/foxy
    'moveit_resources_panda_description' is in: /opt/ros/foxy
    'moveit_resources_pr2_description' is in: /opt/ros/foxy
    'moveit_resources_fanuc_moveit_config' is in: /opt/ros/foxy
    'moveit_resources_panda_moveit_config' is in: /opt/ros/foxy
    'moveit_core' is in: /opt/ros/foxy
    'moveit_ros_occupancy_map_monitor' is in: /opt/ros/foxy
    'moveit_simple_controller_manager' is in: /opt/ros/foxy
    'moveit_plugins' is in: /opt/ros/foxy
    'moveit_ros_planning' is in: /opt/ros/foxy
    'moveit_kinematics' is in: /opt/ros/foxy
    'moveit_planners_ompl' is in: /opt/ros/foxy
    'moveit_ros_robot_interaction' is in: /opt/ros/foxy
    'moveit_ros_warehouse' is in: /opt/ros/foxy
    'moveit_ros_benchmarks' is in: /opt/ros/foxy
    'moveit_ros_move_group' is in: /opt/ros/foxy
    'moveit_ros_planning_interface' is in: /opt/ros/foxy
    'moveit_ros_visualization' is in: /opt/ros/foxy
    'moveit_ros' is in: /opt/ros/foxy
    'moveit_planners' is in: /opt/ros/foxy
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
    --allow-overriding geometric_shapes moveit_core moveit_kinematics moveit_msgs moveit_planners moveit_planners_ompl moveit_plugins moveit_resources_fanuc_description moveit_resources_fanuc_moveit_config moveit_resources_panda_description moveit_resources_panda_moveit_config moveit_resources_pr2_description moveit_ros moveit_ros_benchmarks moveit_ros_move_group moveit_ros_occupancy_map_monitor moveit_ros_planning moveit_ros_planning_interface moveit_ros_robot_interaction moveit_ros_visualization moveit_ros_warehouse moveit_simple_controller_manager

This may be promoted to an error in a future release of colcon-core.
Starting >>> geometric_shapes
Starting >>> moveit_msgs
Starting >>> moveit_common
Starting >>> moveit_resources_panda_description
Finished <<< moveit_resources_panda_description [0.26s]
Finished <<< moveit_common [0.27s]
Starting >>> moveit_resources_panda_moveit_config
Starting >>> launch_param_builder
Finished <<< moveit_resources_panda_moveit_config [0.34s]
Starting >>> moveit_resources_fanuc_description
Finished <<< geometric_shapes [0.65s]
Starting >>> moveit_resources_pr2_description
Finished <<< moveit_resources_fanuc_description [0.15s]
Starting >>> moveit_resources_fanuc_moveit_config
Finished <<< moveit_resources_pr2_description [0.16s]
Starting >>> moveit_resources_prbt_support
Finished <<< moveit_resources_fanuc_moveit_config [0.13s]
Starting >>> rviz_visual_tools
Finished <<< moveit_resources_prbt_support [0.16s]
Starting >>> moveit_resources
Finished <<< moveit_resources [0.18s]
Finished <<< launch_param_builder [1.03s]
Starting >>> moveit_configs_utils
Finished <<< rviz_visual_tools [0.74s]
Finished <<< moveit_configs_utils [0.95s]
Finished <<< moveit_msgs [2.85s]
Starting >>> moveit_core
--- stderr: moveit_core
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::getCurrentlyLoadingLibraryName[abi:cxx11]()'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::getPluginBaseToFactoryMapMapMutex()'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::hasANonPurePluginLibraryBeenOpened(bool)'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::getCurrentlyActiveClassLoader()'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::AbstractMetaObjectBase::setAssociatedLibraryPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::getFactoryMapForBaseClass(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::AbstractMetaObjectBase::AbstractMetaObjectBase(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: libmoveit_butterworth_filter.so.2.4.0: undefined reference to `class_loader::impl::AbstractMetaObjectBase::addOwningClassLoader(class_loader::ClassLoader*)'
collect2: error: ld returned 1 exit status
make[2]: *** [online_signal_smoothing/CMakeFiles/test_butterworth_filter.dir/build.make:218: online_signal_smoothing/test_butterworth_filter] Error 1
make[1]: *** [CMakeFiles/Makefile2:1276: online_signal_smoothing/CMakeFiles/test_butterworth_filter.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp: In member function ‘void moveit::core::RobotState::printStatePositionsWithJointLimits(const moveit::core::JointModelGroup*, std::ostream&) const’:
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp:2109:40: error: ‘setprecision’ is not a member of ‘std’
 2109 |     out << "   " << std::fixed << std::setprecision(5) << bound.min_position_ << "\t";
      |                                        ^~~~~~~~~~~~
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp:2129:40: error: ‘setprecision’ is not a member of ‘std’
 2129 |     out << " \t" << std::fixed << std::setprecision(5) << bound.max_position_ << "  \t" << joint->getName()
      |                                        ^~~~~~~~~~~~
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp:2130:47: error: ‘setprecision’ is not a member of ‘std’
 2130 |         << " current: " << std::fixed << std::setprecision(5) << current_value << '\n';
      |                                               ^~~~~~~~~~~~
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp: In function ‘void moveit::core::{anonymous}::getPoseString(std::ostream&, const Isometry3d&, const string&)’:
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp:2247:18: error: ‘setw’ is not a member of ‘std’; did you mean ‘set’?
 2247 |       ss << std::setw(8) << pose(y, x) << " ";
      |                  ^~~~
      |                  set
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp: In member function ‘void moveit::core::RobotState::getStateTreeJointString(std::ostream&, const moveit::core::JointModel*, const string&, bool) const’:
/home/brian/ws_moveit2/src/moveit2/moveit_core/robot_state/src/robot_state.cpp:2266:52: error: ‘setw’ is not a member of ‘std’; did you mean ‘set’?
 2266 |     ss << pfx << jm->getVariableNames()[i] << std::setw(12) << position_[jm->getFirstVariableIndex() + i] << '\n';
      |                                                    ^~~~
      |                                                    set
make[2]: *** [robot_state/CMakeFiles/moveit_robot_state.dir/build.make:89: robot_state/CMakeFiles/moveit_robot_state.dir/src/robot_state.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1827: robot_state/CMakeFiles/moveit_robot_state.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< moveit_core [8.28s, exited with code 2]

Summary: 13 packages finished [11.3s]
  1 package failed: moveit_core
  1 package had stderr output: moveit_core
  31 packages not processed
scleronomic commented 2 years ago

I get the same error when running colcon build --mixin release from the getting started guide.

JafarAbdi commented 2 years ago

I think it's related to having moveit2 both from source and binaries, have you tried removing the binaries and doing a clean rebuild? sudo apt remove --purge ros-foxy-moveit*

brianng0305 commented 2 years ago

I tried removing all files but cannot do a clean rebuild. Another topic mentioned to add a export path to complete the installation but i have not tried since I just gave up and continue to use ROS1. For me as a beginner is not much difference to use multiple nodes.

im-renpei commented 2 years ago

Hi @scleronomic , have you resolved this issue?