Gazebo header problem while building ros workspace
I am using Ubuntu 18.04 LTS, ROS melodic, so I think I'm using Gazebo 9 (http://gazebosim.org/tutorials/?tut=r...). This is the error message:
[ 97%] Building CXX object gazebo_ros_link_attacher/CMakeFiles/gazebo_ros_link_attacher.dir/src/gazebo_ros_link_attacher.cpp.o
[ 98%] Built target gazebo_disable_link_plugin
[100%] Built target roboticsgroup_gazebo_mimic_joint_plugin
[100%] Building CXX object robotiq/robotiq_gazebo/CMakeFiles/gazebo_mimic_joint_plugin.dir/src/mimic_joint_plugin.cpp.o
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp: In member function ‘virtual void gazebo::GazeboRosLinkAttacher::Load(gazebo::physics::WorldPtr, sdf::ElementPtr)’:
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:36:34: error: ‘class gazebo::physics::World’ has no member named ‘GetPhysicsEngine’; did you mean ‘SetPhysicsEnabled’?
this->physics = this->world->GetPhysicsEngine();
^~~~~~~~~~~~~~~~
SetPhysicsEnabled
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp: In member function ‘bool gazebo::GazeboRosLinkAttacher::attach(std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)’:
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:66:40: error: ‘class gazebo::physics::World’ has no member named ‘GetByName’; did you mean ‘BaseByName’?
physics::BasePtr b1 = this->world->GetByName(model1);
^~~~~~~~~
BaseByName
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:72:40: error: ‘class gazebo::physics::World’ has no member named ‘GetByName’; did you mean ‘BaseByName’?
physics::BasePtr b2 = this->world->GetByName(model2);
^~~~~~~~~
BaseByName
In file included from /opt/ros/melodic/include/ros/ros.h:40:0,
from /home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:2:
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:94:100: error: ‘class gazebo::physics::Inertial’ has no member named ‘GetMass’; did you mean ‘SetMass’?
inertia is not NULL, for example, mass is: " << l1->GetInertial()->GetMass());
^
/opt/ros/melodic/include/ros/console.h:358:64: note: in definition of macro ‘ROSCONSOLE_PRINT_STREAM_AT_LOCATION_WITH_FILTER’
__rosconsole_print_stream_at_location_with_filter__ss__ << args; \
^~~~
/opt/ros/melodic/include/ros/console.h:406:7: note: in expansion of macro ‘ROSCONSOLE_PRINT_STREAM_AT_LOCATION’
ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/ros/console.h:579:43: note: in expansion of macro ‘ROS_LOG_STREAM_COND’
#define ROS_LOG_STREAM(level, name, args) ROS_LOG_STREAM_COND(true, level, name, args)
^~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/rosconsole/macros_generated.h:59:32: note: in expansion of macro ‘ROS_LOG_STREAM’
#define ROS_DEBUG_STREAM(args) ROS_LOG_STREAM(::ros::console::levels::Debug, ROSCONSOLE_DEFAULT_NAME, args)
^~~~~~~~~~~~~~
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:94:9: note: in expansion of macro ‘ROS_DEBUG_STREAM’
ROS_DEBUG_STREAM("link1 inertia is not NULL, for example, mass is: " << l1->GetInertial()->GetMass());
^
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher.cpp:106:100: error: ‘class gazebo::physics::Inertial’ has no member named ‘GetMass’; did you mean ‘SetMass’?
inertia is not NULL, for example, mass is: " << l2->GetInertial()->GetMass());
^
/opt/ros/melodic/include/ros/console.h:358:64: note: in definition of macro ‘ROSCONSOLE_PRINT_STREAM_AT_LOCATION_WITH_FILTER’
__rosconsole_print_stream_at_location_with_filter__ss__ << args; \
^~~~
/opt/ros/melodic/include/ros/console.h:406:7: note: in expansion of macro ‘ROSCONSOLE_PRINT_STREAM_AT_LOCATION’
ROSCONSOLE_PRINT_STREAM_AT_LOCATION(args); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/ros/console.h:579:43: note: in expansion of macro ‘ROS_LOG_STREAM_COND’
#define ROS_LOG_STREAM(level, name, args) ROS_LOG_STREAM_COND(true, level, name, args)
^~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/rosconsole/macros_generated.h:59:32: note: in expansion of macro ‘ROS_LOG_STREAM’
#define ROS_DEBUG_STREAM(args) ROS_LOG_STREAM(::ros::console::levels::Debug, ROSCONSOLE_DEFAULT_NAME, args)
^~~~~~~~~~~~~~
/home/mecha/catkin_ws/src/gazebo_ros_link_attacher/src/gazebo_ros_link_attacher ...