ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

asked 2017-10-23 03:24:55 -0600

tengfei gravatar image

updated 2017-10-23 07:18:38 -0600

gvdhoorn gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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"

Ruben Alves gravatar image Ruben Alves  ( 2017-10-23 05:24:19 -0600 )edit

What is the output of find . -name default_warehouse_mongo_db after run roscd jaka_ur_moveit_config ?

Ruben Alves gravatar image Ruben Alves  ( 2017-10-23 05:25:30 -0600 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-23 05:36:43 -0600 )edit

Also: please edit your question to include your moveit_planning_execution.launch file.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-23 05:37:05 -0600 )edit

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.

tengfei gravatar image tengfei  ( 2017-10-23 06:30:41 -0600 )edit

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.

tengfei gravatar image tengfei  ( 2017-10-23 06:33:57 -0600 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-23 06:37:41 -0600 )edit

gvdhoorn, I have add the ouput of the ls -al /home/shantengfei/catkin_ws/src/jaka_ur_moveit_config. Please check it.

tengfei gravatar image tengfei  ( 2017-10-23 07:10:40 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-10-23 07:23:19 -0600

gvdhoorn gravatar image

updated 2017-10-23 07:41:59 -0600

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.

edit flag offensive delete link more

Comments

And a suggestion: model your moveit_planning_execution.launch after those in fanuc.

Note the highlighted lines here ..

gvdhoorn gravatar image gvdhoorn  ( 2017-10-23 07:24:51 -0600 )edit

.. and here.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-23 07:27:42 -0600 )edit

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?

tengfei gravatar image tengfei  ( 2017-10-23 08:03:58 -0600 )edit

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 gravatar image gvdhoorn  ( 2017-10-23 08:05:38 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-10-23 03:24:55 -0600

Seen: 2,311 times

Last updated: Oct 23 '17