lihuang3 / ur5_ROS-Gazebo

Universal Robot (UR5) Pick and Place Simulation in ROS-Gazebo with a USB Cam and Vacuum Grippers
441 stars 133 forks source link

catkin_make failed #9

Open williamjames88 opened 5 years ago

williamjames88 commented 5 years ago

Hi, I'm getting this error whenever I try to build the file:

[ 57%] Building CXX object ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/blocks_poses_publisher.cpp.o /home/gg/ur_ws/src/ur5_ROS-Gazebo/blocks_poses_publisher.cpp:14:39: fatal error: ur5_notebook/blocks_poses.h: No such file or directory compilation terminated. ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/build.make:62: recipe for target 'ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/blocks_poses_publisher.cpp.o' failed make[2]: [ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/blocks_poses_publisher.cpp.o] Error 1 CMakeFiles/Makefile2:1747: recipe for target 'ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/all' failed make[1]: [ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j1 -l1" failed

This occurred after I have completed this part and perform catkin_make:

In the same directory, make a copy of common.gazebo.xacro and ur5.urdf.xacro in case of any malfunction. These two default files do not include camera and vacuum gripper modules. So we would replace these two files with customized files. Under directory ur_ws/src/ur5_ROS-Gazebo/src/ur_description/, copy common.gazebo.xacro and ur5.urdf.xacro to ur_ws/src/universal_robot/ur_description/urdf/.

Can someone please help me out? I need to get the installation done asap.

lihuang3 commented 5 years ago

@williamjames88 I would suggest you undo this step and see if you could catkin make without errors. Meanwhile, please double check whether you had followed the instruction step-by-step.

williamjames88 commented 5 years ago

@lihuang3 Hi, I heeded your advice and I'm still getting the same error. I also tried creating a new folder and downloaded only your repository into it but still fails to catkin_make. Here's the full code:

gg@gg:~/ur5_ws$ catkin_make Base path: /home/gg/ur5_ws Source space: /home/gg/ur5_ws/src Build space: /home/gg/ur5_ws/build Devel space: /home/gg/ur5_ws/devel Install space: /home/gg/ur5_ws/install

Running command: "make cmake_check_build_system" in "/home/gg/ur5_ws/build"

Running command: "make -j1 -l1" in "/home/gg/ur5_ws/build"

[ 0%] Built target _ur_msgs_generate_messages_check_deps_SetPayload [ 0%] Built target _ur_msgs_generate_messages_check_deps_SetIO [ 0%] Built target _ur_msgs_generate_messages_check_deps_ToolDataMsg [ 0%] Built target _ur_msgs_generate_messages_check_deps_Digital [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target _ur_msgs_generate_messages_check_deps_IOStates [ 0%] Built target _ur_msgs_generate_messages_check_deps_MasterboardDataMsg [ 0%] Built target _ur_msgs_generate_messages_check_deps_RobotStateRTMsg [ 0%] Built target _ur_msgs_generate_messages_check_deps_Analog [ 13%] Built target ur_msgs_generate_messages_py [ 13%] Built target std_msgs_generate_messages_nodejs [ 23%] Built target ur_msgs_generate_messages_nodejs [ 23%] Built target std_msgs_generate_messages_eus [ 35%] Built target ur_msgs_generate_messages_eus [ 35%] Built target std_msgs_generate_messages_cpp [ 46%] Built target ur_msgs_generate_messages_cpp [ 46%] Built target std_msgs_generate_messages_lisp [ 56%] Built target ur_msgs_generate_messages_lisp [ 56%] Built target ur_msgs_generate_messages [ 57%] Building CXX object ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/blocks_poses_publisher.cpp.o /home/gg/ur5_ws/src/ur5_ROS-Gazebo/blocks_poses_publisher.cpp:14:39: fatal error: ur5_notebook/blocks_poses.h: No such file or directory compilation terminated. ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/build.make:62: recipe for target 'ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/blocks_poses_publisher.cpp.o' failed make[2]: [ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/blocks_poses_publisher.cpp.o] Error 1 CMakeFiles/Makefile2:1747: recipe for target 'ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/all' failed make[1]: [ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j1 -l1" failed

lihuang3 commented 5 years ago

@williamjames88 Looks like that there is a blocks_poses.h file under 'ur5_ws/devel/include/ur5_notebook/', which I assume it was not configured by ourselves. Anyway, I just push the file to the root directory of the repo. You can try adding it to the directory mentioned above.

RDaneelOlivav commented 5 years ago

It worked the compilation for me. The procedure I followed was: 1) Start from a clean ~/catkin_ws 2) cd ~/catkin_ws/src; git clone https://github.com/ros-industrial/universal_robot.git 3) cd ~/catkin_ws; catkin_make; source devel/setup.bash 4) cd ~/catkin_ws/src; git clone https://github.com/lihuang3/ur5_ROS-Gazebo.git 5) cp ~/catkin_ws/src/ur5_ROS-Gazebo/src/ur_description/ur5.urdf.xacro ~/catkin_ws/src/universal_robot/ur_description/urdf/ 6) cp ~/catkin_ws/src/ur5_ROS-Gazebo/src/ur_description/common.gazebo.xacro ~/catkin_ws/src/universal_robot/ur_description/urdf/ 7) cp ~/catkin_ws/src/ur5_ROS-Gazebo/blocks_poses.h ~/catkin_ws/devel/include/ur5_notebook/

Hope it helps, I'll continue testing ;)

portgasray commented 5 years ago

It works for me:

image

yyc9268 commented 4 years ago

I found a generally working solution. Make the include directory structure as 'ur5_ROS-Gazebo/include/ur5_notebook' And move the 'blocks_poses.h' into this. The final structure should be 'ur5_ROS-Gazebo/include/ur5_notebook/blocks_poses.h' This solution clearly works for both of 'catkin make' and 'colcon build'.

Cyano0 commented 4 years ago

I think I have this similar issue after I tried everything mentioned above, done adding blocks_poses.h to 'include/ur5_notebook' directory. Unfortunately there is still error when dong catkin_make. Could anyone be able to help by any chance?

Here is the error information:

[ 0%] Built target _ur_msgs_generate_messages_check_deps_SetIO [ 0%] Built target _ur_msgs_generate_messages_check_deps_Analog [ 0%] Built target _ur_msgs_generate_messages_check_deps_ToolDataMsg [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target _ur_msgs_generate_messages_check_deps_IOStates [ 0%] Built target _ur_msgs_generate_messages_check_deps_RobotStateRTMsg [ 0%] Built target _ur_msgs_generate_messages_check_deps_MasterboardDataMsg [ 0%] Built target _ur_msgs_generate_messages_check_deps_Digital [ 0%] Built target _ur_msgs_generate_messages_check_deps_SetSpeedSliderFraction [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target _ur_msgs_generate_messages_check_deps_SetPayload [ 0%] Built target _ur_msgs_generate_messages_check_deps_RobotModeDataMsg [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target gazebo_msgs_generate_messages_lisp [ 0%] Built target sensor_msgs_generate_messages_py [ 0%] Built target std_srvs_generate_messages_eus [ 0%] Built target geometry_msgs_generate_messages_py [ 0%] Built target gazebo_msgs_generate_messages_nodejs [ 0%] Built target gazebo_msgs_generate_messages_cpp [ 0%] Built target geometry_msgs_generate_messages_eus [ 0%] Built target roscpp_generate_messages_cpp [ 0%] Built target sensor_msgs_generate_messages_nodejs [ 0%] Built target trajectory_msgs_generate_messages_lisp [ 0%] Built target gazebo_msgs_generate_messages_py [ 0%] Built target trajectory_msgs_generate_messages_py [ 0%] Built target sensor_msgs_generate_messages_eus [ 0%] Built target trajectory_msgs_generate_messages_eus [ 0%] Built target sensor_msgs_generate_messages_cpp [ 0%] Built target trajectory_msgs_generate_messages_cpp [ 0%] Built target geometry_msgs_generate_messages_cpp [ 0%] Built target std_srvs_generate_messages_cpp [ 0%] Built target roscpp_generate_messages_nodejs [ 0%] Built target rosgraph_msgs_generate_messages_lisp [ 0%] Built target rosgraph_msgs_generate_messages_py [ 0%] Built target trajectory_msgs_generate_messages_nodejs [ 0%] Built target std_srvs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_lisp [ 0%] Built target roscpp_generate_messages_lisp [ 0%] Built target std_srvs_generate_messages_py [ 0%] Built target roscpp_generate_messages_eus [ 0%] Built target roscpp_generate_messages_py [ 0%] Built target rosgraph_msgs_generate_messages_cpp [ 0%] Built target gazebo_msgs_generate_messages_eus [ 0%] Built target rosgraph_msgs_generate_messages_eus [ 0%] Built target std_srvs_generate_messages_nodejs [ 0%] Built target rosgraph_msgs_generate_messages_nodejs [ 0%] Built target geometry_msgs_generate_messages_nodejs [ 0%] Built target sensor_msgs_generate_messages_lisp [ 1%] Linking CXX executable /home/interact/ur_ws/devel/lib/ur5_notebook/blocks_spawner [ 2%] Built target ur_driver_gencfg [ 2%] Built target _ur5_notebook_generate_messages_check_deps_Tracker [ 4%] Built target ur10_kin [ 4%] Built target _ur5_notebook_generate_messages_check_deps_blocks_poses [ 9%] Built target ur3_kin [ 9%] Built target ur5_kin [ 21%] Built target ur_msgs_generate_messages_nodejs [ 34%] Built target ur_msgs_generate_messages_cpp [ 48%] Built target ur_msgs_generate_messages_py [ 60%] Built target ur_msgs_generate_messages_lisp [ 74%] Built target ur_msgs_generate_messages_eus [ 75%] Linking CXX executable /home/interact/ur_ws/devel/lib/ur5_notebook/blocks_poses_publisher [ 79%] Built target ur5_notebook_generate_messages_py [ 81%] Built target ur5_notebook_generate_messages_nodejs [ 84%] Built target ur5_notebook_generate_messages_cpp [ 87%] Built target ur5_notebook_generate_messages_eus ur5_ROS-Gazebo/CMakeFiles/blocks_spawner.dir/build.make:113: recipe for target '/home/interact/ur_ws/devel/lib/ur5_notebook/blocks_spawner' failed make[2]: [/home/interact/ur_ws/devel/lib/ur5_notebook/blocks_spawner] Error 1 CMakeFiles/Makefile2:2035: recipe for target 'ur5_ROS-Gazebo/CMakeFiles/blocks_spawner.dir/all' failed make[1]: [ur5_ROS-Gazebo/CMakeFiles/blocks_spawner.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 92%] Built target ur10_moveit_plugin [ 95%] Built target ur5_moveit_plugin collect2: error: ld returned 1 exit status ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/build.make:113: recipe for target '/home/interact/ur_ws/devel/lib/ur5_notebook/blocks_poses_publisher' failed make[2]: [/home/interact/ur_ws/devel/lib/ur5_notebook/blocks_poses_publisher] Error 1 CMakeFiles/Makefile2:1902: recipe for target 'ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/all' failed make[1]: [ur5_ROS-Gazebo/CMakeFiles/blocks_poses_publisher.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: [all] Error 2