Hello Community,
I am trying to set up the Gazebo Simulation as mentioned on the Using Gazebo Simulator with SITL wiki page (http://ardupilot.org/dev/docs/using-gazebo-simulator-with-sitl.html).
I am running it on Ubuntu 16.04 with ROS Kinetics, regarding to the wiki that should work.
Actually this is the error which pops up, when I come to the make -j4
part.
[ 16%] Building CXX object CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o
[ 33%] Building CXX object CMakeFiles/ArduCopterPlugin.dir/src/ArduCopterPlugin.cc.o
[ 50%] Building CXX object CMakeFiles/ArduCopterIRLockPlugin.dir/src/ArduCopterIRLockPlugin.cc.o
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc: In member function âvoid gazebo::ArduPilotPlugin::OnUpdate()â:
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:914:39: error: âclass gazebo::physics::Worldâ has no member named âGetSimTimeâ
this->dataPtr->model->GetWorld()->GetSimTime();
^
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc: In member function âvoid gazebo::ArduPilotPlugin::ApplyMotorForces(double)â:
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:999:62: error: âclass gazebo::physics::Jointâ has no member named âGetAngleâ
const double pos = this->dataPtr->controls[i].joint->GetAngle(0).Radian();
^
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc: In member function âvoid gazebo::ArduPilotPlugin::SendState() constâ:
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:1195:53: error: âclass gazebo::physics::Worldâ has no member named âGetSimTimeâ
pkt.timestamp = this->dataPtr->model->GetWorld()->GetSimTime().Double();
^
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:1245:27: error: âclass gazebo::physics::Modelâ has no member named âGetWorldPoseâ
this->dataPtr->model->GetWorldPose().Ign();
^
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:1278:38: error: âclass gazebo::physics::Linkâ has no member named âGetWorldLinearVelâ
this->dataPtr->model->GetLink()->GetWorldLinearVel().Ign();
^
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc: In member function âvoid gazebo::ArduCopterPlugin::OnUpdate()â:
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:565:68: error: âclass gazebo::physics::Worldâ has no member named âGetSimTimeâ
gazebo::common::Time curTime = this->dataPtr->model->GetWorld()->GetSimTime();
^
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc: In member function âvoid gazebo::ArduCopterPlugin::SendState() constâ:
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:752:53: error: âclass gazebo::physics::Worldâ has no member named âGetSimTimeâ
pkt.timestamp = this->dataPtr->model->GetWorld()->GetSimTime().Double();
^
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:802:27: error: âclass gazebo::physics::Modelâ has no member named âGetWorldPoseâ
this->dataPtr->model->GetWorldPose().Ign();
^
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:833:38: error: âclass gazebo::physics::Linkâ has no member named âGetWorldLinearVelâ
this->dataPtr->model->GetLink()->GetWorldLinearVel().Ign();
^
In file included from /usr/include/boost/type_index/stl_type_index.hpp:32:0,
from /usr/include/boost/type_index.hpp:29,
from /usr/include/boost/any.hpp:20,
from /usr/include/sdformat-6.2/sdf/Param.hh:21,
from /usr/include/sdformat-6.2/sdf/Element.hh:25,
from /usr/include/sdformat-6.2/sdf/sdf.hh:4,
from /home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:41:
/usr/include/boost/variant/get.hpp: In instantiation of âtypename boost::add_reference<T>::type boost::strict_get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2<int>, ignition::math::v4::Vector2<double>, ignition::math::v4::Vector3<double>, ignition::math::v4::Quaternion<double>, ignition::math::v4::Pose3<double>}; typename boost::add_reference<T>::type = short unsigned int&]â:
/usr/include/boost/variant/get.hpp:284:25: required from âtypename boost::add_reference<T>::type boost::get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2<int>, ignition::math::v4::Vector2<double>, ignition::math::v4::Vector3<double>, ignition::math::v4::Quaternion<double>, ignition::math::v4::Pose3<double>}; typename boost::add_reference<T>::type = short unsigned int&]â
/usr/include/sdformat-6.2/sdf/Param.hh:300:31: required from âbool sdf::Param::Get(T&) const [with T = short unsigned int]â
/usr/include/sdformat-6.2/sdf/Element.hh:454:7: required from âstd::pair<T, bool> sdf::Element::Get(const string&, const T&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/usr/include/sdformat-6.2/sdf/Element.hh:429:55: required from âT sdf::Element::Get(const string&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:69:12: required from âbool getSdfParam(sdf::ElementPtr, const string&, T&, const T&, const bool&) [with T = short unsigned int; sdf::ElementPtr = std::shared_ptr<sdf::Element>; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/home/thorsten/ardupilot_gazebo/src/ArduPilotPlugin.cc:950:39: required from here
/usr/include/boost/variant/get.hpp:212:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get<U>(boost::variant<T...>&) will always throw boost::bad_get exception
BOOST_STATIC_ASSERT_MSG(
^
In file included from /usr/include/boost/type_index/stl_type_index.hpp:32:0,
from /usr/include/boost/type_index.hpp:29,
from /usr/include/boost/any.hpp:20,
from /usr/include/sdformat-6.2/sdf/Param.hh:21,
from /usr/include/sdformat-6.2/sdf/Element.hh:25,
from /usr/include/sdformat-6.2/sdf/sdf.hh:4,
from /home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:27:
/usr/include/boost/variant/get.hpp: In instantiation of âtypename boost::add_reference<T>::type boost::strict_get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2<int>, ignition::math::v4::Vector2<double>, ignition::math::v4::Vector3<double>, ignition::math::v4::Quaternion<double>, ignition::math::v4::Pose3<double>}; typename boost::add_reference<T>::type = short unsigned int&]â:
/usr/include/boost/variant/get.hpp:284:25: required from âtypename boost::add_reference<T>::type boost::get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2<int>, ignition::math::v4::Vector2<double>, ignition::math::v4::Vector3<double>, ignition::math::v4::Quaternion<double>, ignition::math::v4::Pose3<double>}; typename boost::add_reference<T>::type = short unsigned int&]â
/usr/include/sdformat-6.2/sdf/Param.hh:300:31: required from âbool sdf::Param::Get(T&) const [with T = short unsigned int]â
/usr/include/sdformat-6.2/sdf/Element.hh:454:7: required from âstd::pair<T, bool> sdf::Element::Get(const string&, const T&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/usr/include/sdformat-6.2/sdf/Element.hh:429:55: required from âT sdf::Element::Get(const string&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:55:12: required from âbool getSdfParam(sdf::ElementPtr, const string&, T&, const T&, const bool&) [with T = short unsigned int; sdf::ElementPtr = std::shared_ptr<sdf::Element>; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/home/thorsten/ardupilot_gazebo/src/ArduCopterPlugin.cc:590:45: required from here
/usr/include/boost/variant/get.hpp:212:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get<U>(boost::variant<T...>&) will always throw boost::bad_get exception
BOOST_STATIC_ASSERT_MSG(
^
CMakeFiles/ArduCopterPlugin.dir/build.make:62: recipe for target 'CMakeFiles/ArduCopterPlugin.dir/src/ArduCopterPlugin.cc.o' failed
make[2]: *** [CMakeFiles/ArduCopterPlugin.dir/src/ArduCopterPlugin.cc.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/ArduCopterPlugin.dir/all' failed
make[1]: *** [CMakeFiles/ArduCopterPlugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/ArduPilotPlugin.dir/build.make:62: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o' failed
make[2]: *** [CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/all' failed
make[1]: *** [CMakeFiles/ArduPilotPlugin.dir/all] Error 2
/home/thorsten/ardupilot_gazebo/src/ArduCopterIRLockPlugin.cc: In member function âvirtual void gazebo::ArduCopterIRLockPlugin::OnNewFrame(const unsigned char*, unsigned int, unsigned int, unsigned int, const string&)â:
/home/thorsten/ardupilot_gazebo/src/ArduCopterIRLockPlugin.cc:237:14: error: âclass gazebo::rendering::Visualâ has no member named âGetWorldPoseâ
vis->GetWorldPose().pos.Ign(), camera);
^
/home/thorsten/ardupilot_gazebo/src/ArduCopterIRLockPlugin.cc:262:26: error: âclass gazebo::rendering::Visualâ has no member named âGetNameâ
this->Publish(vis->GetName(), pt.X(), pt.Y());
^
In file included from /usr/include/boost/type_index/stl_type_index.hpp:32:0,
from /usr/include/boost/type_index.hpp:29,
from /usr/include/boost/any.hpp:20,
from /usr/include/sdformat-6.2/sdf/Param.hh:21,
from /usr/include/sdformat-6.2/sdf/Element.hh:25,
from /usr/include/sdformat-6.2/sdf/sdf.hh:4,
from /usr/include/gazebo-9/gazebo/sensors/Sensor.hh:25,
from /usr/include/gazebo-9/gazebo/sensors/CameraSensor.hh:24,
from /home/thorsten/ardupilot_gazebo/src/ArduCopterIRLockPlugin.cc:44:
/usr/include/boost/variant/get.hpp: In instantiation of âtypename boost::add_reference<T>::type boost::strict_get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2<int>, ignition::math::v4::Vector2<double>, ignition::math::v4::Vector3<double>, ignition::math::v4::Quaternion<double>, ignition::math::v4::Pose3<double>}; typename boost::add_reference<T>::type = short unsigned int&]â:
/usr/include/boost/variant/get.hpp:284:25: required from âtypename boost::add_reference<T>::type boost::get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2<int>, ignition::math::v4::Vector2<double>, ignition::math::v4::Vector3<double>, ignition::math::v4::Quaternion<double>, ignition::math::v4::Pose3<double>}; typename boost::add_reference<T>::type = short unsigned int&]â
/usr/include/sdformat-6.2/sdf/Param.hh:300:31: required from âbool sdf::Param::Get(T&) const [with T = short unsigned int]â
/usr/include/sdformat-6.2/sdf/Element.hh:454:7: required from âstd::pair<T, bool> sdf::Element::Get(const string&, const T&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/usr/include/sdformat-6.2/sdf/Element.hh:429:55: required from âT sdf::Element::Get(const string&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/home/thorsten/ardupilot_gazebo/src/ArduCopterIRLockPlugin.cc:70:14: required from âbool gazebo::getSdfParam(sdf::ElementPtr, const string&, T&, const T&, const bool&) [with T = short unsigned int; sdf::ElementPtr = std::shared_ptr<sdf::Element>; std::__cxx11::string = std::__cxx11::basic_string<char>]â
/home/thorsten/ardupilot_gazebo/src/ArduCopterIRLockPlugin.cc:199:39: required from here
/usr/include/boost/variant/get.hpp:212:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get<U>(boost::variant<T...>&) will always throw boost::bad_get exception
BOOST_STATIC_ASSERT_MSG(
^
CMakeFiles/ArduCopterIRLockPlugin.dir/build.make:62: recipe for target 'CMakeFiles/ArduCopterIRLockPlugin.dir/src/ArduCopterIRLockPlugin.cc.o' failed
make[2]: *** [CMakeFiles/ArduCopterIRLockPlugin.dir/src/ArduCopterIRLockPlugin.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ArduCopterIRLockPlugin.dir/all' failed
make[1]: *** [CMakeFiles/ArduCopterIRLockPlugin.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I feel like its an issue with my boost version, but I am pretty new to ROS, to Gazebo, to Linux and ArduPilot and I dont know how to fix that.
I appreciate your help!
Thanks alot!