University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Exit when enabling collision | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Exit when enabling collision
March 10, 2016
1:03 pm
Avatar
Member
Members
Forum Posts: 26
Member Since:
September 16, 2015
sp_UserOfflineSmall Offline

When enabling SmartBody collision an error is reported and the application exits.

This occurs with sbgui once an example is loaded and an external application utilizing SmartBody.

The error generated, shows only on the external application and is as follows:

ODE Error 2 Bad argument(s) in %s()

 

This is occurring in the latest linux SDK: SmartBodySDK-r6296-linux.tar.gz

Is this a known issue? and is there a resolution?

Thanks.

March 11, 2016
5:56 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I haven't seen that before, but perhaps you can send a backtrace to give me a sense of why that happens.

March 15, 2016
8:52 am
Avatar
Member
Members
Forum Posts: 26
Member Since:
September 16, 2015
sp_UserOfflineSmall Offline

Thank you. Certainly.

Stack trace:

#0 0x00007fffed5a32a8 in raise () from /usr/lib/libc.so.6
#1 0x00007fffed5a472a in abort () from /usr/lib/libc.so.6
#2 0x00007fffe82be0d5 in dDebug (num=num@entry=2, msg=msg@entry=0x7fffe83464a6 "Bad argument(s) in %s()") at error.cpp:103

#3 0x00007fffe82a701a in dxCapsule::dxCapsule (this=0x427f450, space=<optimized out>, _radius=-2, _length=-2) at capsule.cpp:52

#4 0x00007fffe82a7069 in dCreateCapsule (space=0x0, radius=-2, length=-2) at capsule.cpp:79

#5 0x00007ffff59b5536 in ODEPhysicsSim::createODERawGeometry(geomObj=0x427f310) at /home/user/sb_sdk/smartbody/src/SmartBody/sbm/ODEPhysicsSim.cpp:556

#6 0x00007ffff59b5c3c in ODECollisionSpace::addCollisionObjects
(this=0x41cc2e0, objName="mycharacter1_BV:JtPelvis") at /home/user/sb_sdk/smartbody/src/SmartBody/sbm/ODEPhysicsSim.cpp:715

#7 0x00007ffff5ad321e in
SmartBody::SBCollisionManager::addObjectToCollisionSpace
(this=0x18ccc10, geomName="mycharacter1_BV:JtPelvis") at /home/user/sb_sdk/smartbody/src/SmartBody/sb/SBCollisionManager.cpp:471

#8 0x00007ffff5ad1e18 in SmartBody::SBCollisionManager::start
(this=0x18ccc10) at /home/user/sb_sdk/smartbody/src/SmartBody/sb/SBCollisionManager.cpp:152

#9 0x00007ffff5ad0c84 in SmartBody::SBCollisionManager::setEnable
(this=0x18ccc10, enable=true) at /home/user/sb_sdk/smartbody/src/SmartBody/sb/SBCollisionManager.cpp:46

#10 0x000000000043e53c in Demo::init () at SimulationDemo.cpp:135

#11 0x0000000000422655 in Simulation::Demo (this=0x7fffffffded0,
argc=@0x7fffffffdecc: 2, argv=@0x7fffffffdec0:
0x7fffffffe078, appDefaults=@0x7fffffffdf78: 0x0)
at Demo.cpp:332

#12 0x0000000000423a54 in main (argc=2, argv=0x7fffffffe078) at
Demo.cpp:928

It looks to be related to the capsule collision shape and I tested along these lines. By changing the character collision shape to box ( character->setStringAttribute("collisionShape", "box") )
, the problem does not manifest. Of course, using this method collisions are different.

In case it is relevant, here is the output immediately surrounding the error:

SBColMan: col primitive added: mycharacter1_BV:JtRoot:1, len: 0.104127, radius: 0.026032

SBColMan: col primitive added: mycharacter1_BV:JtPelvis, len: 0.120691, radius: 0.030173

ODE Error 2 Bad argument(s) in %s()

March 18, 2016
3:31 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Looks like a capsule collision object was being created with a -2 length and a -2 radius, which is kind of odd.

Perhaps the problem is in SBCollisionManager.cpp:149 where a capsule is automatically determined by a relationship between it and other joints..? Do you see the output like this:

 

SBColMan: col primitive added: %s, len: %f, radius: %f"

 

?

 

Ari

March 22, 2016
10:10 am
Avatar
Member
Members
Forum Posts: 26
Member Since:
September 16, 2015
sp_UserOfflineSmall Offline

Thanks for the feedback.

That is also what was observed during debugging - the attempted creation of a capsule with length and radius of -2.

Yes, that output is visible but only in the custom application. The sbgui application does not print out such information.

The log is as follows (same as previous post):

SBColMan: col primitive added: mycharacter1_BV:JtRoot:1, len: 0.104127, radius: 0.026032

SBColMan: col primitive added: mycharacter1_BV:JtPelvis, len: 0.120691, radius: 0.030173

ODE Error 2 Bad argument(s) in %s()

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 69

Members: 122101

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 531

Posts: 2495