Hello,
Thanks for the catch. I've added a NULL check to the UpdateCoM
function. Let me know if it doesn't work.
-nate
On Tue, 01 Mar 2005 14:45:59 +0100, Jonathan ILIAS
<jonathan.ilias@...> wrote:
> Hi,
>=20
> I'm adding sonars to my robot in a different way of Pioneer2DX and i
> found why this doesn't works... but i don't know if it is a bug or if i
> do something wrong.
>=20
> For each sonar and on the same body:
> 1) i create one RayProximity sensor (to modelize detection field)
> 2) i add one flat cylinder geom at the source of the detection field
> (sensor's visible part)
>=20
> The gazebo server crashes on step 2.
>=20
> Here is the backtrace when it hangs:
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1084227840 (LWP 1225)]
> 0x080a4e1e in dMassAdd ()
> (gdb) bt
> #0 0x080a4e1e in dMassAdd ()
> #1 0x08092341 in Body::UpdateCoM (this=3D0x8166fc0) at Body.cc:155
> #2 0x0809444e in BaseGeom::SetRelativePose (this=3D0x81cad28, pose=3D
> {pos =3D {x =3D 0, y =3D 0, z =3D 0}, rot =3D {u =3D 0.707106781=
18654757, x
> =3D 0.70710678118654746, y =3D 0, z =3D 0}}, updateCoM=3Dtrue)
> at BaseGeom.cc:266
> #3 0x08094bad in BaseGeom::SetRelativeRotation (this=3D0x81cad28, rot=3D=
{u
> =3D 1, x =3D 0, y =3D 0, z =3D 0}) at BaseGeom.cc:363
> #4 0x0809676a in CylinderGeom (this=3D0x81cad28, body=3D0x0, spaceId=3D0=
x0,
> radius=3D0.014999999999999999, length=3D0.002)
> at CylinderGeom.cc:50
> #5 0x423b302f in Miro::LoadThisSonar (this=3D0x8166ca8,
> this_sonar=3DAVANT_AVANT_GAUCHE,
> angle_direction_nominale=3D0.38397243543875248, pose=3D
> {pos =3D {x =3D 0.105, y =3D 0.02, z =3D 0.13500000000000001}, r=
ot =3D {u
> =3D 0, x =3D 0, y =3D 0, z =3D 0}}) at Miro.cc:267
> #6 0x423b3672 in Miro::LoadSonars (this=3D0x8166ca8, file=3D0x8119a10,
> node=3D0x811d778) at Miro.cc:323
> #7 0x423b1719 in Miro::Load (this=3D0x8166ca8, file=3D0x8119a10,
> node=3D0x811d778) at Miro.cc:98
> #8 0x08066f20 in World::LoadModel (this=3D0x8128a20, node=3D0x811d778,
> parent=3D0x0) at World.cc:324
> #9 0x080671ac in World::LoadModel (this=3D0x8128a20, node=3D0x8123ef8,
> parent=3D0x0) at World.cc:374
> #10 0x08066cfc in World::Load (this=3D0x8128a20, worldFile=3D0x0) at
> World.cc:244
> #11 0x080661fc in Init () at main.cc:295
> #12 0x080665bb in main (argc=3D2, argv=3D0xbffff9c4) at main.cc:406
>=20
> With more explanation:
> - when i create CylinderGeom, the constructor calls attached body
> UpdateCoM method
> - for each geom in the body, UpdateCoM gets its mass
> - the RayProximity associated Geom is not "placeable"
> - non-placeable geoms returns NULL from GetBodyMassMatrix method
> - dMassAdd is called with NULL as second parameter
>=20
> Maybe dMassAdd's second parameter should have been "0" in this case ?
>=20
> Maybe it is not a good idea to attach sensors to the main robot's body ?
>=20
> The solution that works for Pioneer2DX is to add RayProximity sensors at
> last, thus Body::UpdateCoM is never called after.
>=20
> --
> Jonathan ILIAS, assistant p=E9dagogique
> http://www.eseo.fr/~jilias/
> ESEO
> 4, rue Merlet de la Boulaye
> BP 30926 - 49009 ANGERS cedex 01 - FRANCE
> t=E9l : 02 41 86 67 60
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id=14396&opclick
> _______________________________________________
> Playerstage-gazebo mailing list
> Playerstage-gazebo@...
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
|