This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
Try to make gazebo-sitl compatible with Parrot Sphinx Gazebo 7 (libignition-math2.so.2.2.2) #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parrot Sphinx currently only supports Parrot based products. There is no reason the gazebo-sitl plugin for ArduCopter can't be added as well. Parrot uses Gazebo 7.0.1, which is actually version 7.0.0, so the current gazebo-sitl needs to be a bit more backwards compatible.
http://developer.parrot.com/docs/sphinx/index.html
There is currently a compile error related to the Target Pose that needs fixed, the offending code is commented out in this commit so that things compile cleanly. https://github.com/MAVProxyUser/gazebo-sitl/blob/dc8d20c531500f6d0f9a7795998ea847023dbf44/gzsitl/gzsitl_plugin.cc#L128
[ 87%] Building CXX object gzsitl/CMakeFiles/gzsitl_plugin.dir/gzsitl_plugin.cc.o
/opt/mesmer/log/gazebo-sitl/gzsitl/gzsitl_plugin.cc: In member function ‘void gazebo::GZSitlPlugin::OnUpdate()’:
/opt/mesmer/log/gazebo-sitl/gzsitl/gzsitl_plugin.cc:130:28: error: no match for ‘operator=’ (operand types are ‘ignition::math::Pose3d {aka ignition::math::Pose3}’ and ‘const gazebo::math::Pose’)
this->perm_target_pose = this->perm_target->GetWorldPose();
^
/opt/mesmer/log/gazebo-sitl/gzsitl/gzsitl_plugin.cc:130:28: note: candidate is:
In file included from /usr/include/ignition/math2/ignition/math/Frustum.hh:22:0,
from /usr/include/ignition/math2/ignition/math.hh:7,
from /usr/include/sdformat-4.3/sdf/Param.hh:35,
from /usr/include/sdformat-4.3/sdf/Element.hh:24,
from /usr/include/sdformat-4.3/sdf/sdf.hh:5,
from /usr/local/include/gazebo-7/gazebo/common/Battery.hh:25,
from /usr/local/include/gazebo-7/gazebo/common/common.hh:8,
from /opt/mesmer/log/gazebo-sitl/gzsitl/gzsitl_plugin.hh:20,
from /opt/mesmer/log/gazebo-sitl/gzsitl/gzsitl_plugin.cc:20:
/usr/include/ignition/math2/ignition/math/Pose3.hh:222:25: note: ignition::math::Pose3& ignition::math::Pose3::operator=(const ignition::math::Pose3&) [with T = double]
public: Pose3 &operator=(const Pose3 &_pose)
^
/usr/include/ignition/math2/ignition/math/Pose3.hh:222:25: note: no known conversion for argument 1 from ‘const gazebo::math::Pose’ to ‘const ignition::math::Pose3&’
make[2]: *** [gzsitl/CMakeFiles/gzsitl_plugin.dir/gzsitl_plugin.cc.o] Error 1
make[1]: *** [gzsitl/CMakeFiles/gzsitl_plugin.dir/all] Error 2
make: *** [all] Error 2