moveit2_tutorials icon indicating copy to clipboard operation
moveit2_tutorials copied to clipboard

motion_planning_python_api_tutorial cannot be executed correctly.

Open yulat214 opened this issue 1 year ago • 8 comments

Description

When executing motion_planning_python_api_tutorial.launch.py from moveit2_tutorial, Rviz shows NO PLANNING LIBRARY. Also, Plan&Execute is not executable. When executing, I receive the INFO message: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()? and the process stops.

I tried #724 , but it didn't work.

Your environment

  • ROS Distro: [Humble|Rolling]
  • OS Version: Ubuntu 22.04
  • Source or Binary build?: source
  • If source, which git commit or tag?: main

Steps to reproduce

Following this tutorial.

Backtrace or Console output

I am concerned that planning scene monitor and others are stopping in the middle of the process.

full text: https://gist.github.com/yulat214/e0e82c8feb290f7ee10769293d380551 I am concerned about lines 80-92.

yulat214 avatar Oct 06 '23 04:10 yulat214

Thanks for flagging this @yulat214 I hope to look into this soon.

peterdavidfagan avatar Oct 11 '23 15:10 peterdavidfagan

When executing motion_planning_python_api_tutorial.launch.py from moveit2_tutorial, Rviz shows NO PLANNING LIBRARY.

This is expected, the Python API is supposed to be used directly within your script in order to define the motion plans you want. If you want to interact via rviz it may be worthwhile launching rviz with move_group.

When executing, I receive the INFO message: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()? and the process stops.

I need to check this issue.

peterdavidfagan avatar Oct 12 '23 10:10 peterdavidfagan

Thank you for confirming. Sorry it took so long to see this. I have tried many times since then.

I had been getting this error in various environments, but after several builds it suddenly fixed itself.

It now works, but I haven't done anything special to it other than build it.

yulat214 avatar Oct 31 '23 13:10 yulat214

Hello, I have the same problem, any updates? [rviz2-4] [INFO] [1698842496.286118580] [rviz2.planning_scene_monitor]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()?

@yulat214 could you tell me how you built that last environment?

Thank you for your time

adrielmicom avatar Nov 01 '23 12:11 adrielmicom

I forgot something important. The tutorial assumes several movements, but I have only been able to confirm that moving to a random posture and placing objects works.

In moveit2 tutorial motion planning python API, if you comment out the code shown in Single Pipeline Planning - Pose Goal and Single Pipeline Planning - Custom Constraints, does it work? It seems that if there is a flaw somewhere in the code, everything will not work.

I have confirmed that it works on Ubuntu 22.04, ROS Rolling. Best of luck!

yulat214 avatar Nov 02 '23 03:11 yulat214

By the way, I just tried ros2 launch moveit2_tutorials motion_planning_python_api_tutorial.launch.py about 10 times for checking, and 8 of them did not work.

ros2 launch moveit2_tutorials motion_planning_python_api_tutorial.launch.py example_file:=motion_planning_python_api_planning_scene.py and a picture of a successful execution is also shown. 2023-10-06-162334-screenshot

yulat214 avatar Nov 02 '23 03:11 yulat214

If i comment single Pipeline Planning - Pose Goal and Single Pipeline Planning - Custom Constraints,` it doesn’t work. I get this when I run it (https://github.com/adrielmicom/moveit2_tutorials/blob/adrielmicom-patch-1/issues/784_1)

On the other hand, without commenting anything and following the tutorial, I get (https://github.com/adrielmicom/moveit2_tutorials/blob/adrielmicom-patch-1/issues/784_2). With the same error whether using Planning Scene or not. motion_planning_python_api_planning_scene.py-1] [ERROR] [1698999635.573165687] [moveit_3093295755.occupancy_map_monitor]: No 3D sensor plugin(s) defined for octomap updates [ERROR] [motion_planning_python_api_planning_scene.py-1]: process has died [pid 59413, exit code -11, cmd '/home/adri/ws_moveit/install/moveit2_tutorials/lib/moveit2_tutorials/motion_planning_python_api_planning_scene.py --ros-args -r __node:=moveit_py --params-file /tmp/launch_params_l8tvxx2c'].

I think this provides more information by being able to see the entire output.

adrielmicom avatar Nov 03 '23 08:11 adrielmicom

I have seen the same errors many times. Sometimes the process does not die even with that error. The cause is unknown.

Sometimes I can do it and sometimes I can't. I am not sure how to run them definitely.

I will try some more, Please let me know if you find out anything.

yulat214 avatar Nov 09 '23 01:11 yulat214