start-jsk / rtmros_gazebo

gazebo simulation for rtmros robots
8 stars 24 forks source link

Modified for kinetic(c++11) #237

Closed k-okada closed 4 years ago

k-okada commented 4 years ago

indigo で動くかどうかは未確認.

indigoユーザ確認してください @start-jsk/jsk-students

pazeshun commented 4 years ago

indigoでビルドすると、以下のようにエラーが出て、変更した部分が悪さをしているように思います。 https://github.com/start-jsk/jsk_apc/commit/4020d637d8aaf768118a9c338639c2f3ca47d8ef, https://github.com/jsk-ros-pkg/jsk_visualization/pull/710, https://github.com/jsk-ros-pkg/jsk_visualization/pull/739 あたりを参考に直してみたいと思います。

/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp: In member function 'virtual void gazebo::IOBPlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)':
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:281:102: error: no matching function for call to 'dynamic_pointer_cast(gazebo::sensors::SensorPtr)'
                  (this->world->GetName() + "::" + msi.link->GetScopedName() + "::" + msi.sensor_name));
                                                                                                      ^
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:281:102: note: candidates are:
In file included from /usr/include/c++/4.8/bits/shared_ptr.h:52:0,
                 from /usr/include/c++/4.8/memory:82,
                 from /home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:4:
/usr/include/c++/4.8/bits/shared_ptr_base.h:1177:5: note: template<class _Tp, class _Tp1, __gnu_cxx::_Lock_policy _Lp> std::__shared_ptr<_Tp1, _Lp> std::dynamic_pointer_cast(const std::__shared_ptr<_Tp2, _Lp>&)
     dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
     ^
/usr/include/c++/4.8/bits/shared_ptr_base.h:1177:5: note:   template argument deduction/substitution failed:
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:281:102: note:   'gazebo::sensors::SensorPtr {aka boost::shared_ptr<gazebo::sensors::Sensor>}' is not derived from 'const std::__shared_ptr<_Tp2, _Lp>'
                  (this->world->GetName() + "::" + msi.link->GetScopedName() + "::" + msi.sensor_name));
                                                                                                      ^
In file included from /usr/include/c++/4.8/memory:82:0,
                 from /home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:4:
/usr/include/c++/4.8/bits/shared_ptr.h:447:5: note: template<class _Tp, class _Tp1> std::shared_ptr<_Tp1> std::dynamic_pointer_cast(const std::shared_ptr<_Tp2>&)
     dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
     ^
/usr/include/c++/4.8/bits/shared_ptr.h:447:5: note:   template argument deduction/substitution failed:
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:281:102: note:   'gazebo::sensors::SensorPtr {aka boost::shared_ptr<gazebo::sensors::Sensor>}' is not derived from 'const std::shared_ptr<_Tp2>'
                  (this->world->GetName() + "::" + msi.link->GetScopedName() + "::" + msi.sensor_name));
                                                                                                      ^
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp: In member function 'void gazebo::IOBPlugin::GetRobotStates(const gazebo::common::Time&)':
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:901:34: error: 'class gazebo::sensors::ImuSensor' has no member named 'AngularVelocity'
       math::Vector3 wLocal = sp->AngularVelocity();
                                  ^
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:902:33: error: 'class gazebo::sensors::ImuSensor' has no member named 'LinearAcceleration'
       math::Vector3 accel = sp->LinearAcceleration();
                                 ^
/home/travis/ws/src/rtmros_gazebo/hrpsys_gazebo_general/src/IOBPlugin.cpp:903:37: error: 'class gazebo::sensors::ImuSensor' has no member named 'Orientation'
       math::Quaternion imuRot = sp->Orientation();
                                     ^
make[2]: *** [CMakeFiles/IOBPlugin.dir/src/IOBPlugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/IOBPlugin.dir/all] Error 2
pazeshun commented 4 years ago

Closed via #242