0

Rosanswers logo

HI all! I'm trying create a moveit package for my own robot following the tutorial Create_a_MoveIt_Pkg_for_an_Industrial_Robot. When I finished the second part Update Configuration Files I tested the configuation.However, there was something wrong. When I start the planning _and_execution.launch, there was something output like this:

OSError: [Errno 13] Permission denied: '/home/shantengfei/catkin_ws/src/jaka_ur_moveit_config/default_warehouse_mongo_db'

[mongo_wrapper_ros_shantengfei_PC_9122_1384786663048058499-7] process has died [pid 9194, exit code 1, cmd /opt/ros/indigo/lib/warehouse_ros/mongo_wrapper_ros.py __name:=mongo_wrapper_ros_shantengfei_PC_9122_1384786663048058499 __log:=/home/shantengfei/.ros/log/e378d02c-b477-11e7-9896-7085c22fcebd/mongo_wrapper_ros_shantengfei_PC_9122_1384786663048058499-7.log]. log file: /home/shantengfei/.ros/log/e378d02c-b477-11e7-9896-7085c22fcebd/mongo_wrapper_ros_shantengfei_PC_9122_1384786663048058499-7*.log

I checked the ros package jaka_ur_moveit_config and there are just two folders: launch and config. In the launch folder, there is a default_warehouse_db.launch file which was generated when I set up the moveit assistant:

<launch>

<arg name="reset" default="false"/> <!-- If not specified, we'll use a default database location --> <arg name="moveit_warehouse_database_path" default="$(find jaka_ur_moveit_config)/default_warehouse_mongo_db" />

<!-- Launch the warehouse with the configured database location --> <include file="$(find jaka_ur_moveit_config)/launch/warehouse.launch"> <arg name="moveit_warehouse_database_path" value="$(arg moveit_warehouse_database_path)" /> </include>

<!-- If we want to reset the database, run this node --> <node if="$(arg reset)" name="$(anon moveit_default_db_reset)" type="moveit_init_demo_warehouse" pkg="moveit_ros_warehouse" respawn="false" output="screen" /> </launch>

and here is the moveit_planning_execution.launch

<launch>

<arg name="sim" default="true" /> <arg name="robot_ip" unless="$(arg sim)" />

<include file="$(find jaka_ur_moveit_config)/launch/planning_context.launch" > <arg name="load_robot_description" value="true" /> </include>

<group if="$(arg sim)"> <include file="$(find industrial_robot_simulator)/launch/robot_interface_simulator.launch" /> </group>

<group unless="$(arg sim)"> <include file="$(find [robot_interface_pkg])/launch/robot_interface.launch" > <arg name="robot_ip" value="$(arg robot_ip)"/> </include> </group>

<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

<include file="$(find jaka_ur_moveit_config)/launch/move_group.launch"> <arg name="publish_monitored_planning_scene" value="true" /> </include>

<include file="$(find jaka_ur_moveit_config)/launch/moveit_rviz.launch"> <arg name="config" value="true"/> </include>

<include file="$(find jaka_ur_moveit_config)/launch/default_warehouse_db.launch" />

</launch>

As can be seen, <arg name="moveit_warehouse_database_path" default="$(find jaka_ur_moveit_config)/default_warehouse_mongo_db" />. But I didn't find the default_warehouse_mongo_db.Could someone please give a method to solve the problem? Thanks. PS: Here is the output of ls -al /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config

    drwxr-xr-x 4 root        root        4096 10月 16 10:00 .
drwxrwxr-x 8 shantengfei shantengfei 4096 10月 18 22:51 ..
-rw-r--r-- 1 root        root         310 10月 16 10:00 CMakeLists.txt
drwxr-xr-x 2 root        root        4096 10月 23 15:33 config
drwxr-xr-x 2 root        root        4096 10月 17 16:32 launch
-rw-r--r-- 1 root        root        1069 10月 16 10:00 package.xml
-rw-r--r-- 1 root        root         284 10月 16 10:00 .setup_assistant

and the output of ls -al /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config/launch:

drwxr-xr-x 2 root root  4096 10月 17 16:32 .
drwxr-xr-x 4 root root  4096 10月 16 10:00 ..
-rwxrwxrwx 1 root root   715 10月 16 10:00 default_warehouse_db.launch
-rw-r--r-- 1 root root  2521 10月 16 10:00 demo.launch
-rw-r--r-- 1 root root   370 10月 16 10:00 fake_moveit_controller_manager.launch.xml
-rw-r--r-- 1 root root   299 10月 17 16:32 jakaUr_moveit_controller_manager.launch.xml
-rw-r--r-- 1 root root    20 10月 16 10:00 jakaUr_moveit_sensor_manager.launch.xml
-rw-r--r-- 1 root root   629 10月 16 10:00 joystick_control.launch
-rw-r--r-- 1 root root  3418 10月 16 10:00 move_group.launch
-rw-r--r-- 1 root root  1051 10月 17 15:07 moveit_planning_execution.launch
-rw-r--r-- 1 root root   968 10月 17 15:05 moveit_planning_execution.launch~
-rw-r--r-- 1 root root 19020 10月 16 10:00 moveit.rviz
-rw-r--r-- 1 root root   672 10月 16 10:00 moveit_rviz.launch
-rw-r--r-- 1 root root   966 10月 16 10:00 ompl_planning_pipeline.launch.xml
-rw-r--r-- 1 root root  1208 10月 16 10:00 planning_context.launch
-rw-r--r-- 1 root root   335 10月 16 10:00 planning_pipeline.launch.xml
-rw-r--r-- 1 root root   910 10月 16 10:00 run_benchmark_ompl.launch
-rw-r--r-- 1 root root   647 10月 16 10:00 sensor_manager.launch.xml
-rw-r--r-- 1 root root   540 10月 16 10:00 setup_assistant.launch
-rw-r--r-- 1 root root  1329 10月 16 10:00 trajectory_execution.launch.xml
-rw-r--r-- 1 root root   523 10月 16 10:00 warehouse.launch
-rw-r--r-- 1 root root   592 10月 16 10:00 warehouse_settings.launch.xml

Originally posted by tengfei on ROS Answers with karma: 88 on 2017-10-23

Post score: 0


Original comments

Comment by Ruben Alves on 2017-10-23:
Your launch file is looking for $(find jaka_ur_moveit_config)/default_warehouse_mongo_db" and you said that there is a config folder.

If your default_warehouse_mongo_db is in the config folder, then your launch should be $(find jaka_ur_moveit_config)/config/default_warehouse_mongo_db"

Comment by Ruben Alves on 2017-10-23:
What is the output of find . -name default_warehouse_mongo_db after run roscd jaka_ur_moveit_config ?

Comment by gvdhoorn on 2017-10-23:
The default_warehouse_mongo_db is created if it doesn't exist on first run of a MoveIt config with the db enabled. So that it doesn't exist (yet) is expected.

@tengfei: did you ever run anything as a different user (ie: root?) in your workspace? That could lead to these sort of issues.

Comment by gvdhoorn on 2017-10-23:
Also: please edit your question to include your moveit_planning_execution.launch file.

Comment by tengfei on 2017-10-23:
Hi Ruben, thanks for your reply.I didn't found the default_warehouse_mongo_db in the config folder and I tried the find . -name default_warehouse_mongo_db after run roscd jaka_ur_moveit_config and there was nothing output.

Comment by tengfei on 2017-10-23:
Hi gvdhoorn thanks for your reply every time! Maybe I uese sudo, I forgot it. So how to resolve this problem? I even don't know what the default_warehouse_mongo_db's role in this project.

Comment by gvdhoorn on 2017-10-23:
Please add the full output of ls -al /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config to your question text.

If (and only if) permissions are the problem, we can reset them.

Comment by tengfei on 2017-10-23:
gvdhoorn, I have add the ouput of the ls -al /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config. Please check it.

1 Answers1

0

Rosanswers logo

From:

When I start the planning _and_execution.launch, there was something output like this:

OSError: [Errno 13] Permission denied: '/home/shantengfei/catkin_ws/src/jaka_ur_moveit_config/default_warehouse_mongo_db'
[..]

and

Here is the output of ls -al /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config

drwxr-xr-x 4 root        root        4096 10月 16 10:00 .
[..]

it would appear you've most likely either changed the permissions on these folders and made them owned by root, or have run the MoveIt Setup Assistant as root (with sudo perhaps).

If you now try to start demo.launch or moveit_planning_execution.launch, the Mongo DB will try to create the necessary files in a directory owned by root. As your regular user (shantengfei) does not have permissions to do that, you receive a OSError: Permission denied.

Easiest is most likely to change the owner of the affected folders and files. For that, try:

chown -R shantengfei: /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config

Note the semicolon (:) and I've assumed that your username is shantengfei. If it isn't, please use the correct username.

And it's probably not necessary, but just in case: remove the devel and build folders from your workspace and build it again.


Originally posted by gvdhoorn with karma: 86574 on 2017-10-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2017-10-23:
And a suggestion: model your moveit_planning_execution.launch after those in fanuc.

Note the highlighted lines here ..

Comment by gvdhoorn on 2017-10-23:
.. and here.

Comment by tengfei on 2017-10-23:
Thanks for your help. Now it works without the error! And I'm sorry that I cannot understand your suggestions well? Should I model the two highlight parts and change the path then put it into my launch file?

Comment by gvdhoorn on 2017-10-23:
Use the file I linked as a template and replace all fanuc references with your own robot/packages. The moveit_planning_execution.launch I linked you to is a bit more up-to-date than the one in the tutorial you followed.

So it will not create a db, unless it has been requested fi.

gvdhoorn-rse
  • 39,013
  • 1
  • 1
  • 4