Problem with SonarSensor in dart5

Create issue
Issue #2062 new
Steve Peters created an issue

The SonarSensor_TEST passes with gazebo7 and dart 4.3, though it is failing with the current integration with dart5 (see recent jenkins result and discussion of pull request #1825).

The test is seg-faulting when running the DemoWorld subtest with dart. It seems to be related to trying to create a mesh for the sonar sensor without telling it to which body it is attached (see also this dart issue.

[ RUN      ] SonarTests/SonarSensor_TEST.DemoWorld/6
[Dbg] [SonarSensor_TEST.cc:197] Physics dart paused 0
[New Thread 0x7fffd21c8700 (LWP 8039)]
[New Thread 0x7fffd19c7700 (LWP 8041)]
[New Thread 0x7fffd11c6700 (LWP 8044)]
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.23.2.91
***** Internal Program Error - assertion (_collision->GetDARTBodyNode()) failed in void gazebo::physics::DARTMesh::CreateMesh(float*, int*, unsigned int, unsigned int, gazebo::physics::DARTCollisionPtr, const gazebo::math::Vector3&):
gazebo/physics/dart/DARTMesh.cc(151): DART _collision->GetDARTBodyNode() is null

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffd21c8700 (LWP 8039)]
0x00007ffff4934c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56    ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff4934c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff4938028 in __GI_abort () at abort.c:89
#2  0x00007ffff6db58e6 in boost::assertion::detail::assertion_failed_msg (expr=expr@entry=0x7ffff6f6913f "_collision->GetDARTBodyNode()", msg=msg@entry=0x7ffff6f691b8 "DART _collision->GetDARTBodyNode() is null", function=function@entry=0x7ffff6f694e0 <gazebo::physics::DARTMesh::CreateMesh(float*, int*, unsigned int, unsigned int, boost::shared_ptr<gazebo::physics::DARTCollision>, gazebo::math::Vector3 const&)::__PRETTY_FUNCTION__> "void gazebo::physics::DARTMesh::CreateMesh(float*, int*, unsigned int, unsigned int, gazebo::physics::DARTCollisionPtr, const gazebo::math::Vector3&)", file=file@entry=0x7ffff6f69160 "gazebo/physics/dart/DARTMesh.cc", line=line@entry=151) at /usr/include/boost/assert.hpp:108
#3  0x00007ffff6e36bfe in gazebo::physics::DARTMesh::CreateMesh (this=this@entry=0x7fffcd450900, _vertices=<optimized out>, _indices=0x7fffcd98fc50, _numVertices=_numVertices@entry=167, _numIndices=_numIndices@entry=984, _collision=..., _scale=...) at gazebo/physics/dart/DARTMesh.cc:150
#4  0x00007ffff6e36de0 in gazebo::physics::DARTMesh::Init (this=0x7fffcd450900, _mesh=0x7fffcd27fff0, _collision=..., _scale=...) at gazebo/physics/dart/DARTMesh.cc:102
#5  0x00007ffff6e373b9 in gazebo::physics::DARTMeshShape::Init (this=0x7fffcd3df210) at gazebo/physics/dart/DARTMeshShape.cc:81
#6  0x00007ffff6ecfe56 in gazebo::physics::MeshShape::SetMesh (this=0x7fffcd3df210, _uri="unit_cone", _submesh="", _center=_center@entry=false) at gazebo/physics/MeshShape.cc:137
#7  0x00007ffff7b82a18 in gazebo::sensors::SonarSensor::Load (this=0x7fffcd35b130, _worldName=...) at gazebo/sensors/SonarSensor.cc:153
#8  0x00007ffff7b73d9a in gazebo::sensors::Sensor::Load (this=0x7fffcd35b130, _worldName="default", _sdf=...) at gazebo/sensors/Sensor.cc:84
#9  0x00007ffff7b7cdaf in gazebo::sensors::SensorManager::CreateSensor (this=0x67dde0 <SingletonT<gazebo::sensors::SensorManager>::GetInstance()::t>, _elem=std::shared_ptr (count 5, weak 6) 0x7fffcd172db0, _worldName="default", _parentName="sonar_model::link", _parentId=16) at gazebo/sensors/SensorManager.cc:284
#10 0x00007ffff7b7d14f in gazebo::sensors::SensorManager::OnCreateSensor (this=<optimized out>, _elem=..., _worldName=..., _parentName=..., _parentId=<optimized out>) at gazebo/sensors/SensorManager.cc:262
#11 0x00007ffff7b7fa6b in operator()<std::shared_ptr<sdf::Element>, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, void> (__object=<optimized out>, this=<optimized out>) at /usr/include/c++/4.8/functional:601
#12 __call<void, std::shared_ptr<sdf::Element>&&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&&, 0ul, 1ul, 2ul, 3ul, 4ul> (__args=<optimized out>, this=<optimized out>) at /usr/include/c++/4.8/functional:1296
#13 operator()<std::shared_ptr<sdf::Element>, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, void> (this=<optimized out>) at /usr/include/c++/4.8/functional:1355
#14 std::_Function_handler<void (std::shared_ptr<sdf::Element>, std::string const&, std::string const&, unsigned int), std::_Bind<std::_Mem_fn<void (gazebo::sensors::SensorManager::*)(std::shared_ptr<sdf::Element>, std::string const&, std::string const&, unsigned int)> (gazebo::sensors::SensorManager*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>, std::_Placeholder<4>)> >::_M_invoke(std::_Any_data const&, std::shared_ptr<sdf::Element>, std::string const&, std::string const&, unsigned int) (__functor=..., __args#0=..., __args#1=..., __args#2=..., __args#3=<optimized out>) at /usr/include/c++/4.8/functional:2071
#15 0x00007ffff6ec04e5 in operator() (__args#3=16, __args#2="sonar_model::link", __args#1="default", __args#0=..., this=<optimized out>) at /usr/include/c++/4.8/functional:2471
#16 Signal<std::shared_ptr<sdf::Element>, std::basic_string<char>, std::basic_string<char>, unsigned int> (_p4=<optimized out>, _p3="sonar_model::link", _p2="default", _p1=std::shared_ptr (count 5, weak 6) 0x7fffcd172db0, this=<optimized out>) at gazebo/common/Event.hh:366
#17 operator()<std::shared_ptr<sdf::Element>, std::basic_string<char>, std::basic_string<char>, unsigned int> (_p4=<optimized out>, _p3="sonar_model::link", _p2="default", _p1=std::shared_ptr (count 5, weak 6) 0x7fffcd172db0, this=<optimized out>) at gazebo/common/Event.hh:181
#18 gazebo::physics::Link::Load (this=this@entry=0x7fffcd1d4630, _sdf=std::shared_ptr (count 5, weak 5) 0x7fffcd13f780) at gazebo/physics/Link.cc:128
#19 0x00007ffff6e2ed70 in gazebo::physics::DARTLink::Load (this=0x7fffcd1d4630, _sdf=std::shared_ptr (count 5, weak 5) 0x7fffcd13f780) at gazebo/physics/dart/DARTLink.cc:54
#20 0x00007ffff6ed4839 in gazebo::physics::Model::LoadLinks (this=this@entry=0x7fffcd496900) at gazebo/physics/Model.cc:220
#21 0x00007ffff6eda738 in gazebo::physics::Model::Load (this=this@entry=0x7fffcd496900, _sdf=std::shared_ptr (count 6, weak 4) 0x7fffccc2b080) at gazebo/physics/Model.cc:104
#22 0x00007ffff6e37dc2 in gazebo::physics::DARTModel::Load (this=0x7fffcd496900, _sdf=std::shared_ptr (count 6, weak 4) 0x7fffccc2b080) at gazebo/physics/dart/DARTModel.cc:56
#23 0x00007ffff6f1c15f in gazebo::physics::World::LoadModel (this=this@entry=0x7fffcca8fda0, _sdf=std::shared_ptr (count 6, weak 4) 0x7fffccc2b080, _parent=...) at gazebo/physics/World.cc:1094
#24 0x00007ffff6f1cac4 in gazebo::physics::World::LoadEntities (this=this@entry=0x7fffcca8fda0, _sdf=std::shared_ptr (count 6, weak 13) 0x7fffcc62a740, _parent=...) at gazebo/physics/World.cc:1184
#25 0x00007ffff6f2223c in gazebo::physics::World::Load (this=0x7fffcca8fda0, _sdf=std::shared_ptr (count 6, weak 13) 0x7fffcc62a740) at gazebo/physics/World.cc:318
#26 0x00007ffff6ef37ed in gazebo::physics::load_world (_world=..., _sdf=std::shared_ptr (count 6, weak 13) 0x7fffcc62a740) at gazebo/physics/PhysicsIface.cc:125
#27 0x00007ffff76b1ea5 in gazebo::Server::LoadImpl (this=this@entry=0x7fffcc000970, _elem=std::shared_ptr (count 2, weak 2) 0x7fffcc002cc0, _physics="dart") at gazebo/Server.cc:461
#28 0x00007ffff76b2c5d in gazebo::Server::LoadFile (this=this@entry=0x7fffcc000970, _filename="worlds/sonar_demo.world", _physics="dart") at gazebo/Server.cc:395
#29 0x00007ffff76b467c in gazebo::Server::ParseArgs (this=0x7fffcc000970, _argc=_argc@entry=4, _argv=_argv@entry=0x7fffcc0008c0) at gazebo/Server.cc:333
#30 0x000000000043e3d9 in gazebo::ServerFixture::RunServer (this=0x797680, _args=std::vector of length 3, capacity 3 = {...}) at gazebo/test/ServerFixture.cc:258
#31 0x00007ffff5ef2a4a in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0
#32 0x00007ffff78e6184 in start_thread (arg=0x7fffd21c8700) at pthread_create.c:312
#33 0x00007ffff49f837d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)

Comments (0)

  1. Log in to comment