Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile errors in kobuki_gazebo_plugins with Kinetic and Gazebo7 #45

Closed
wants to merge 6 commits into from

Conversation

rohbotics
Copy link

Kinetic moved to Gazebo7 which requires c++11 and has many changes to the API, this pull request makes koubki_gazebo_plugins compile with no errors on kinetic and Ubuntu 16.04.

This should be pulled into a separate branch for kinetic.

@stonier
Copy link
Member

stonier commented Jul 10, 2016

This looks good. I created the kinetic branch off jade. Could you resend this PR to the kinetic branch?

@ghost
Copy link

ghost commented Jul 10, 2016

Thanks @rohbotics, these changes allowed me to compile Kobuki, although it seems I have not been receiving the same errors as others.

For one, I never received an error message requiring C++11 to be declared (like in #44), so I didn't modify my CMakeList.txt file.

I also received error messages referring to deprecated functions GetRange() and GetContact() - I fixed these by removing 'Get' from their names to put them in accordance to their current names (I found this link useful in finding their current names).

Edit: I just realized that the GetRange() and GetContact() messages are warnings, not errors. The changes I've made in the .cpp code to remove these warnings still allowed Kobuki to build.

@rohbotics
Copy link
Author

@cerebro-deux What platform are you running on (OS, ROS version, Arch) ?

Thanks for the link, I will try to see if I can get rid of some of the warnings on the build.

@ghost
Copy link

ghost commented Jul 11, 2016

@rohbotics I'm using Ubuntu Xenial, with ROS Kinetic. I've built Kobuki (and TurtleBot) following the instructions here, of course with your fixes. ROS and Gazebo were installed using apt-get in Ubuntu, but Rocon, Kobuki and TurtleBot were built from source.

@rohbotics
Copy link
Author

@stonier Rebased in #46

@cerebro-deux, It's interesting that you are not getting the compiler error about C++11 features, I tried on a fresh install of Xenial, and the first error in the log was

In file included from /usr/include/c++/5/random:35:0,
                 from /usr/include/ignition/math2/ignition/math/Rand.hh:20,
                 from /usr/include/ignition/math2/ignition/math.hh:18,
                 from /usr/include/sdformat-4.0/sdf/Param.hh:34,
                 from /usr/include/sdformat-4.0/sdf/Element.hh:24,
                 from /usr/include/sdformat-4.0/sdf/sdf.hh:5,
                 from /usr/include/gazebo-7/gazebo/common/Battery.hh:25,
                 from /usr/include/gazebo-7/gazebo/common/common.hh:8,
                 from /usr/include/gazebo-7/gazebo/gazebo_core.hh:19,
                 from /usr/include/gazebo-7/gazebo/gazebo.hh:20,
                 from /home/rohan/catkin_ws/src/kobuki_desktop/kobuki_gazebo_plugins/include/kobuki_gazebo_plugins/gazebo_ros_kobuki.h:45,
                 from /home/rohan/catkin_ws/src/kobuki_desktop/kobuki_gazebo_plugins/src/gazebo_ros_kobuki_loads.cpp:36:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \

Maybe you have a non-default version of gcc, but I am not sure.

@rohbotics rohbotics closed this Jul 11, 2016
@ghost
Copy link

ghost commented Jul 14, 2016

@rohbotics - Yes, I have a fresh install of Xenial too. This is what came out of gcc --version:
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413

In any case, Kobuki and Turtlebot were able to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants