moveit / moveit2_tutorials

A sphinx-based centralized documentation repo for MoveIt 2
https://moveit.picknik.ai
BSD 3-Clause "New" or "Revised" License
147 stars 191 forks source link

Planning For Differential-Drive Mobile Base and an Arm tutorial is broken #364

Open TomGrimwood opened 2 years ago

TomGrimwood commented 2 years ago

Description

This tutorial has a lot of broken repository references and I am unable to get it working.

Your environment

Steps to reproduce

cd ~/ws_moveit/src
wget https://raw.githubusercontent.com/PickNikRobotics/stretch_ros/ros2/stretch_ros.repos
vcs import < stretch_ros.repos

stretch_ros.repos references version foxy which does not exist, should it be ros2-beta?

  realsense-ros:  # For realsense2_description
    type: git
    url: https://github.com/IntelRealSense/realsense-ros
    version: foxy
rosdep install -r --from-paths . --ignore-src --rosdistro galactic -y

results in

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
stretch_moveit_config: Cannot locate rosdep definition for [moveit_fake_controller_manager]
Continuing to install resolvable dependencies...
#All required rosdeps installed successfully

I am also unable to build these two packages from DLu's branch, should they be changed or is it required to use this branch?

  moveit2:
    type: git
    url: https://github.com/DLu/moveit2
    version: dlu_galactic

  moveit_task_constructor:
    type: git
    url: https://github.com/DLu/moveit_task_constructor
    version: galactic
--- stderr: moveit_core
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::finish'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::no_flush'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::xdeflate(int)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib_error::check(int)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::default_compression'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::stream_end'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::zlib_base()'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::~zlib_base()'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::default_strategy'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::reset(bool, bool)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::sync_flush'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::detail::zlib_base::xinflate(int)'
/usr/bin/ld: libmoveit_distance_field.so.2.1.3: undefined reference to `boost::iostreams::zlib::deflated'
collect2: error: ld returned 1 exit status
make[2]: *** [distance_field/CMakeFiles/test_distance_field.dir/build.make:218: distance_field/test_distance_field] Error 1
make[1]: *** [CMakeFiles/Makefile2:2207: distance_field/CMakeFiles/test_distance_field.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< moveit_core [2min 4s, exited with code 2]
--- stderr: moveit_task_constructor_core
In file included from /home/tom/test/src/moveit_task_constructor/core/include/moveit/task_constructor/stage.h:44,
                 from /home/tom/test/src/moveit_task_constructor/core/include/moveit/task_constructor/container.h:41,
                 from /home/tom/test/src/moveit_task_constructor/core/include/moveit/task_constructor/container_p.h:41,
                 from /home/tom/test/src/moveit_task_constructor/core/src/container.cpp:37:
/home/tom/test/src/moveit_task_constructor/core/include/moveit/task_constructor/storage.h:57:1: error: expected initializer before ‘}’ token
   57 | }

using the apt-get version of moveit2, ros2_control, and ros2_controllers,and changing stretch_ros.repos to use the ros-planning galactic branch of moveit_task_constructor allows colcon build to complete without errors.

ros2 launch stretch_moveit_config demo.launch.py use_fake_controller:=True

Succesfully launches RViz with the stetch mobile manipulator visible, but sending a planning request results in this output in the terminal.

[move_group-1] [INFO] [1652569098.191032106] [moveit_move_group_default_capabilities.move_action_capability]: Received request
[move_group-1] [INFO] [1652569098.191230476] [moveit_move_group_default_capabilities.move_action_capability]: executing..
[rviz2-2] [INFO] [1652569098.491795713] [move_group_interface]: Planning request accepted
[move_group-1] [INFO] [1652569099.191369057] [moveit_ros.current_state_monitor]: Didn't received robot state (joint angles) with recent timestamp within 1.000000 seconds.
[move_group-1] Check clock synchronization if your are running ROS across multiple machines!
[move_group-1] [WARN] [1652569099.191401642] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Failed to fetch current robot state.
[move_group-1] [INFO] [1652569099.191484288] [moveit_move_group_default_capabilities.move_action_capability]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[move_group-1] [INFO] [1652569099.191588785] [moveit_move_group_capabilities_base.move_group_capability]: Using planning pipeline 'move_group'
[move_group-1] [INFO] [1652569099.192143002] [moveit_collision_detection_fcl.collision_common]: Found a contact between 'link_gripper' (type 'Robot link') and 'base_link' (type 'Robot link'), which constitutes a collision. Contact information is not stored.
[move_group-1] [INFO] [1652569099.192158372] [moveit_collision_detection_fcl.collision_common]: Collision checking is considered complete (collision was found and 0 contacts are stored)
[move_group-1] [INFO] [1652569099.192167883] [moveit_ros.fix_start_state_collision]: Start state appears to be in collision with respect to group stretch_arm
[move_group-1] [WARN] [1652569099.226438350] [moveit_ros.fix_start_state_collision]: Unable to find a valid state nearby the start state (using jiggle fraction of 0.020000 and 100 sampling attempts). Passing the original planning request to the planner.
[move_group-1] [INFO] [1652569099.270786459] [moveit.ompl_planning.model_based_planning_context]: Planner configuration 'stretch_arm[RRTstar]' will use planner 'geometric::RRTstar'. Additional configuration parameters will be set when the planner is constructed.
[move_group-1] [WARN] [1652569099.293161516] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [WARN] [1652569099.293228034] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [WARN] [1652569099.293278423] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.293301296] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [ERROR] [1652569099.293328913] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.293420470] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.293437842] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [ERROR] [1652569099.293457009] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.293486985] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/tools/multiplan/src/ParallelPlan.cpp:138 - ParallelPlan::solve(): Unable to find solution by any of the threads in 0.000679 seconds
[move_group-1] [WARN] [1652569099.299217969] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.299258417] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.299301364] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.299335689] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.299943659] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.299994654] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.300013331] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.300047104] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.300094019] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/tools/multiplan/src/ParallelPlan.cpp:138 - ParallelPlan::solve(): Unable to find solution by any of the threads in 0.000944 seconds
[move_group-1] [WARN] [1652569099.300221809] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.300250027] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.300290189] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/base/src/Planner.cpp:257 - stretch_arm/stretch_arm[RRTstar]: Skipping invalid start state (invalid state)
[move_group-1] [ERROR] [1652569099.300313882] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/geometric/planners/rrt/src/RRTstar.cpp:193 - stretch_arm/stretch_arm[RRTstar]: There are no valid initial states!
[move_group-1] [WARN] [1652569099.300345987] [ompl]: /tmp/binarydeb/ros-galactic-ompl-1.5.2/src/ompl/tools/multiplan/src/ParallelPlan.cpp:138 - ParallelPlan::solve(): Unable to find solution by any of the threads in 0.000171 seconds
[move_group-1] [INFO] [1652569099.300399444] [moveit.ompl_planning.model_based_planning_context]: Unable to solve the planning problem
[move_group-1] [INFO] [1652569099.300455636] [moveit_move_group_default_capabilities.move_action_capability]: No motion plan found. No execution attempted.
[rviz2-2] [INFO] [1652569099.594736787] [move_group_interface]: Planning request aborted
[rviz2-2] [ERROR] [1652569099.694921828] [move_group_interface]: MoveGroupInterface::plan() failed or timeout reached

Is this due to swapping out to many repositories changing the expected behaviour? I am certainly out of my depth.

Thanks, Tom.

garyraise commented 2 years ago

Has there been any update on this issue? I'm having the same problem

charlietorf commented 1 year ago

I have the same problem. Any workaround?. I tried to follow this tutorial in humble ros version but problem arose again.

tylerjw commented 9 months ago

This is a very experimental feature. Improvements to this would be really appreciated.