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

Error with catkin build with ds4_driver

asked 2020-05-24 21:18:39 -0600

bdelspi gravatar image

Can anyone please help me solve the following error I get when running catkin build?

Error: Attempting to build a catkin workspace using build space: "/home/bdelspi/catkin_ws2/build" but that build space's most recent configuration differs from the commanded one in ways which will cause problems. Fix the following options or use `catkin clean -b` to remove the build space:  - install: False (stored) is not True (commanded)

For context, I have been trying to enable the ds4_driver for joystick control. To set this up, I have been referencing 1) ds4_driver, 2) A Sony DualShock 4 userspace driver for Linux, and 3) Using a PlayStation DS4 with ROS Kinetic on Ubuntu 16.04.

Speciffically, following the installation instructions in Using a PlayStation DS4 with ROS Kinetic on Ubuntu 16.04, in step 2 when the $ catkin_make command is run,

The build space at '/home/bdelspi/catkin_ws2/build' was previously built by 'catkin build'. Please remove the build space or pick a different build space.

This makes sense, I have gotten this in the past for other programs so generally run $ catkin build instead. However, now when I run $catkin build, I get:

Error: Attempting to build a catkin workspace using build space: "/home/bdelspi/catkin_ws2/build" but that build space's most recent configuration differs from the commanded one in ways which will cause problems. Fix the following options or use `catkin clean -b` to remove the build space:   - install: False (stored) is not True (commanded)

Running $ catkin build --dry-run I get the following:

bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ catkin build --dry-run
-------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/kinetic
Workspace:                   /home/bdelspi/catkin_ws2
-------------------------------------------------------------
Build Space:        [exists] /home/bdelspi/catkin_ws2/build
Devel Space:        [exists] /home/bdelspi/catkin_ws2/devel
Install Space:     [missing] /home/bdelspi/catkin_ws2/install
Log Space:          [exists] /home/bdelspi/catkin_ws2/logs
Source Space:       [exists] /home/bdelspi/catkin_ws2/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        merged
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------
[build] Found '73' packages in 0.0 seconds.                                    
Packages to be built:
- control_msgs                    (catkin)
- controller_manager_msgs         (catkin)
- hardware_interface              (catkin)
- combined_robot_hw               (catkin)
- controller_interface            (catkin)
- controller_manager              (catkin)
- controller_manager_tests        (catkin)
- combined_robot_hw_tests         (catkin)
- industrial_core                 (metapackage)
- industrial_deprecated           (catkin)
- industrial_msgs                 (catkin)
- industrial_robot_simulator      (catkin)
- industrial_trajectory_filters   (catkin)
- industrial_utils                (catkin)
- joint_limits_interface          (catkin)
- motoman                         (metapackage)
- motoman_gp12_support            (catkin)
- motoman_gp7_support             (catkin)
- motoman_gp8_support             (catkin)
- motoman_gp8_urdf                (catkin)
- motoman_mh12_support            (catkin)
- motoman_mh50_support            (catkin)
- motoman_mh5_support             (catkin)
- motoman_motomini_support        (catkin)
- motoman_msgs                    (catkin)
- motoman_sda10f_moveit_config    (catkin)
- motoman_sda10f_support          (catkin)
- motoman_sia10d_support          (catkin)
- motoman_sia10f_support          (catkin)
- motoman_sia20d_moveit_config    (catkin)
- motoman_sia20d_support          (catkin)
- motoman_sia5d_support           (catkin)
- realtime_tools                  (catkin)
- control_toolbox                 (catkin)
- diff_drive_controller           (catkin)
- ackermann_steering_controller   (catkin)
- force_torque_sensor_controller  (catkin)
- forward_command_controller      (catkin)
- effort_controllers              (catkin)
- gripper_action_controller       (catkin)
- imu_sensor_controller           (catkin)
- joint_state_controller          (catkin)
- joint_trajectory_controller     (catkin)
- position_controllers            (catkin)
- ros_control                     (metapackage)
- ros_controllers                 (metapackage)
- rosserial                       (metapackage)
- rosserial_arduino               (catkin)
- rosserial_mbed                  (catkin)
- rosserial_msgs                  (catkin)
- rosserial_client                (catkin)
- rosserial_embeddedlinux         (catkin)
- rosserial_python                (catkin)
- rosserial_server                (catkin)
- rosserial_test                  (catkin)
- rosserial_tivac                 (catkin)
- rosserial_vex_cortex            (catkin)
- rosserial_vex_v5                (catkin)
- rosserial_windows               (catkin)
- rosserial_xbee                  (catkin)
- rqt_controller_manager          (catkin)
- rqt_joint_trajectory_controller (catkin)
- simple_message                  (catkin)
- industrial_robot_client         (catkin)
- motoman_driver                  (catkin)
- gp8_moveit_config               (catkin)
- motoman_gp8_moveit_config       (catkin)
- transmission_interface          (catkin)
- velocity_controllers            (catkin ...
(more)
edit retag flag offensive close merge delete

Comments

Off-topic, but: seeing as you're running Kinetic: do you really need to build all those packages from source?

All the industrial_* packages have binaries available for Kinetic (on Ubuntu Xenial), so do the rosserial and ros_control packages. Of course, if you prefer some version of ros_control(lers) which hasn't been released for Kinetic, a from-source build makes sense.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-25 03:14:50 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-25 03:12:49 -0600

gvdhoorn gravatar image

updated 2020-05-27 14:09:38 -0600

Can anyone please offer some suggestions?

Run catkin clean -y in the root of your workspace, then run catkin build.

As the error message tells you, mixing the two tools for building the same workspace is unsupported.

So remove the build and devel directories (which the catkin clean -y command will do), choose one of the two tools (either catkin_make or catkin_tools) and then build the workspace.


Edit: in the end it turned out the OP had Catkin configured to create an install space, but was still source-ing the devel space.

After disabling the install space, cleaning and rebuilding the workspace, things started working again, even after source devel/setup.bash.

edit flag offensive delete link more

Comments

Thank you @gvdhoorn, except now I am getting the following error

[robot_interface_streaming_yrc1000.launch] is neither a launch file in package [motoman_driver] nor is [motoman_driver] a launch file name The traceback for the exception was written to the log file

Looking to the launch folder, the launch file is there in the launch folder of the motoman_driver folder. What did I do wrong? I also saved a copy of my catkin_ws (before the catkin clean) on an external hd if we need to go back to it. What are your thoughts? Thank you for all your help with this gvdhoorn!

bdelspi gravatar image bdelspi  ( 2020-05-26 16:33:17 -0600 )edit

So you remove all the build and devel directories from your workspace (essentially you only keep src), then source /opt/ros/kinetic/setup.bash, then run catkin build, wait, and then finally source devel/setup.bash?

At this point, rospack find motoman_driver returns the directory in your src space. Correct?

gvdhoorn gravatar image gvdhoorn  ( 2020-05-27 04:42:15 -0600 )edit

@gvdhoorn, that is correct.

I shell 1 I input and receive the following:

bdelspi@bdelspi-Latitude-E5550:~$ cd ~/catkin_ws2/
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ ls -1
build
devel
install
logs
src
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ catkin clean -y
[clean] Removing installspace: /home/bdelspi/catkin_ws2/install
[clean] Removing develspace: /home/bdelspi/catkin_ws2/devel
[clean] Removing buildspace: /home/bdelspi/catkin_ws2/build
[clean] Removing log space: /home/bdelspi/catkin_ws2/logs
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ printenv | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
bdelspi gravatar image bdelspi  ( 2020-05-27 11:02:35 -0600 )edit

Then in shell 1 I input

bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ catkin build

and receive (only showing the tail due to character count)

[build] Summary: All 69 packages succeeded!                                             
[build]   Ignored:   5 packages were skipped or are blacklisted.                        
[build]   Warnings:  14 packages succeeded with warnings.                               
[build]   Abandoned: None.                                                              
[build]   Failed:    None.                                                              
[build] Runtime: 5 minutes and 16.8 seconds total.                                      
[build] Note: Workspace packages have changed, please re-source setup files to use them.

then in shell 1 I input in receive

bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ ls
build  devel  install  logs  src
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ source devel/setup.bash
bdelspi gravatar image bdelspi  ( 2020-05-27 11:11:10 -0600 )edit

Finally in shell 1 I input

bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ gedit ~/.bashrc

In shell 2 input

bdelspi@bdelspi-Latitude-E5550:~$ cd ~/catkin_ws2/
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ source ~/catkin_ws2/devel/setup.bash
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ roscore

to start roscore, and receive the usual output.

Then, in shell 3, set the joint names

Then shell 4 input and receive the following

bdelspi@bdelspi-Latitude-E5550:~$ cd ~/catkin_ws2/
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ source ~/catkin_ws2/devel/setup.bash
bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ roslaunch motoman_driver robot_interface_streaming_yrc1000.launch robot_ip:=192.168.0.145
[robot_interface_streaming_yrc1000.launch] is neither a launch file in package [motoman_driver] nor is [motoman_driver] a launch file name The traceback for the exception was written to the log file

Thank you again for all your help with this gvdhoorn!

bdelspi gravatar image bdelspi  ( 2020-05-27 11:23:01 -0600 )edit

High-level question: why are you starting robot_interface_streaming_yrc1000.launch directly, instead of via one of the .launch files in one of the robot support packages? "Setting the joint names" is not something you typically do manually either.

You may have a setup which requires this, but as-is, the statement confuses me.

As to "shell 4", try this (in the same shell, after having run source ~/catkin_ws2/devel/setup.bash:

rospack profile
rospack find motoman_driver

Does the last command print an error, or return a path?

gvdhoorn gravatar image gvdhoorn  ( 2020-05-27 11:28:27 -0600 )edit

w.r.t the first question, no specific reason. This is just the way that I had had it running prior. I will try the .launch file after we get operational again. w.r.t the second question. I get the following when inputting and receiving in shell 4:

bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ rospack profile
Full tree crawl took 0.018645 seconds.
Directories marked with (*) contain no manifest.  You may
want to delete these directories.
To get just of list of directories without manifests,re-run the profile with --zombie-only
-------------------------------------------------------------
0.017855   /opt/ros/kinetic/share
0.000187 * /opt/ros/kinetic/share/OpenCV-3.3.1-dev
0.000048 * /opt/ros/kinetic/share/man
0.000039 * /opt/ros/kinetic/share/OpenCV-3.3.1-dev/haarcascades
0.000030 * /opt/ros/kinetic/share/doc
0.000015 * /opt/ros/kinetic/share/OpenCV-3.3.1-dev/lbpcascades
0.000010 * /opt/ros/kinetic/share/man/man1
0.000005 * /opt/ros/kinetic/share/doc/liborocos-kdl
bdelspi gravatar image bdelspi  ( 2020-05-27 11:49:55 -0600 )edit

and this when inputting and receiving in shell 4

bdelspi@bdelspi-Latitude-E5550:~/catkin_ws2$ rospack find motoman_driver
[rospack] Error: package 'motoman_driver' not found
bdelspi gravatar image bdelspi  ( 2020-05-27 11:52:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-24 21:18:39 -0600

Seen: 15,062 times

Last updated: May 27 '20