Ask Your Question
0

Integrating Kuka LBR IIWA with ROS/Gazebo

asked 2016-03-10 22:39:45 -0600

Ahyan gravatar image

updated 2016-10-24 09:10:55 -0600

ngrennan gravatar image

I have recently started to work with Kuka LBR IIWA. My aim is to work with ros and make the robot simulate in gazebo. I am trying to setup ros packages ( https://github.com/SalvoVirga/iiwa_stack ) to work with Kuka LBR IIWA. I am using ubuntu 12.04 LTS and ros hydro. I finished cabinet setup, the project is uploaded to controller with no error or red sign in IDE. However, for roscore side, when I build the workspace, I found the following error:

afroza@afroza-XPS-8700:~/my_ws$ catkin build
-------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/hydro
Workspace:                   /home/afroza/my_ws
Source Space:       [exists] /home/afroza/my_ws/src
Build Space:        [exists] /home/afroza/my_ws/build
Devel Space:        [exists] /home/afroza/my_ws/devel
Install Space:     [missing] /home/afroza/my_ws/install
DESTDIR:                     None
-------------------------------------------------------
Isolate Develspaces:         False
Install Packages:            False
Isolate Installs:            False
-------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
-------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------
Found '8' packages in 0.0 seconds.
Starting ==> iiwa                                                              
Starting ==> iiwa_control                                                      
Starting ==> iiwa_description                                                  
Starting ==> iiwa_gazebo                                                       
Starting ==> iiwa_msgs                                                         
Finished <== iiwa_gazebo      [ 1.0 seconds ]                                  
Finished <== iiwa             [ 1.3 seconds ]                                  
Finished <== iiwa_description [ 1.2 seconds ]                                  
Finished <== iiwa_control     [ 1.4 seconds ]                                  
Starting ==> iiwa_moveit                                                       
Finished <== iiwa_moveit      [ 0.4 seconds ]                                  
Finished <== iiwa_msgs        [ 4.8 seconds ]                                  
Starting ==> iiwa_ros                                                          

[iiwa_ros] ==> '/home/afroza/my_ws/build/iiwa_ros/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' in '/home/afroza/my_ws/build/iiwa_ros'
Scanning dependencies of target iiwa_msgs_generate_messages_cpp
[  0%] Built target iiwa_msgs_generate_messages_cpp
Scanning dependencies of target iiwa_ros
[ 50%] Building CXX object CMakeFiles/iiwa_ros.dir/src/iiwaRos.cpp.o
cc1plus: error: unrecognized command line option -std=c++11
make[2]: *** [CMakeFiles/iiwa_ros.dir/src/iiwaRos.cpp.o] Error 1
make[1]: *** [CMakeFiles/iiwa_ros.dir/all] Error 2
make: *** [all] Error 2
[iiwa_ros] <== '/home/afroza/my_ws/build/iiwa_ros/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' failed with return code '2'

Failed   <== iiwa_ros         [ 2.3 seconds ]                                  
[build] There were '1' errors:                                                 

Failed to build package 'iiwa_ros' because the following command:

# Command to reproduce:
cd /home/afroza/my_ws/build/iiwa_ros && /home/afroza/my_ws/build/iiwa_ros/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j; cd -

# Path to log:
cat /home/afroza/my_ws/build/build_logs/iiwa_ros.log

Exited with return code: 2

[build] Runtime: 7.6 seconds

Please guide me to fix this. Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-11 01:34:16 -0600

gvdhoorn gravatar image

The real error is this bit of the message you get:

cc1plus: error: unrecognized command line option -std=c++11

The error basically tells you that the iiwa_ros package is configuring the compiler (g++) to compile with support for C++11, but that your compiler version (which is not visible in the output you posted, but I'm guessing is 4.6.x, as you are running Ubuntu Precise) does not recognise that particular option.

It's probably used elsewhere as well, but here is the line in iiwa_ros/CMakeLists.txt that configured the flags. Note btw that this is not ROS-specific, but a case of using compiler options without checking they are supported.

You have three options:

  1. upgrade to Ubuntu Trusty, which comes with a compiler that does support this
  2. see if changing all -std=c++11 to -std=c++0x (or even -std=gnu++0x, but that probably won't matter) also works (this depends on which specific aspects of C++11 the code in iiwa_stack uses)
  3. install a C++11 capable compiler on Ubuntu Precise (see How to Install GCC 4.8 via PPA in Ubuntu 12.04, 13.04, 10.04 fi on how to do this, but there are many more)

Option 1 seems like a lot of work, but iiwa_stack/README.md states that this is a "ROS indigo metapackage", so even if you get options 2 or 3 working, there will most likely be other things that won't work on Precise/Hydro. If you have no real requirement to be on Precise/Hydro, I'd recommend option 1.

edit flag offensive delete link more

Comments

Thank you for your response. I followed no.(3) option. However still I am getting different errors. I am considering to follow the option 1). Do you also suggest me to update current ROS hydro distribution to Indigo? Thank you

Ahyan gravatar imageAhyan ( 2016-03-11 23:01:09 -0600 )edit
1

I followed no.(3) option [..] still [..] getting [..] errors

Yes, that is what I expected.

I am considering to follow the option 1). Do you also suggest me to update current ROS hydro distribution to Indigo?

You cannot install Hydro on Ubuntu Trusty, so you will have to.

gvdhoorn gravatar imagegvdhoorn ( 2016-03-12 02:19:28 -0600 )edit

I upgraded my machine to ubuntu 14.04 and ROS indigo. Now it is ok. Thank you

Ahyan gravatar imageAhyan ( 2016-03-17 04:16:28 -0600 )edit

I also want to simulate in Gazebo. However, it is stated that Gazebo is currently supported for only LWR IIWA R820. I am using LBR iiwa 7 R800. I would like to know whether anyone simulated this already extending the package? Also can I control my robot (R800 model) using MoveIt? Is it supported?

Ahyan gravatar imageAhyan ( 2016-03-17 04:25:32 -0600 )edit
1

I would suggest opening a new question for this. Alternatively you can open an issue on the issue tracker of the SalvoVirga/iiwa_stack repository.

gvdhoorn gravatar imagegvdhoorn ( 2016-03-17 06:03:00 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-10 22:39:45 -0600

Seen: 1,369 times

Last updated: Mar 11 '16