University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Grabbing Moving Objects | 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
Grabbing Moving Objects
August 30, 2016
7:11 am
Avatar
Member
Members
Forum Posts: 8
Member Since:
August 30, 2016
sp_UserOfflineSmall Offline

Hello,

i'm currently trying to grab moving objects on a Conveyor belt with a command looking like this:

 

<sbm:reach sbm:action="pick-up" target="object_XY" sbm:reach-finish="false"/>

 

After this I'm reacting to successfull grabs using the "pawn-attached" event. However I'm having the problem that sometimes the grab seemes to fail and no event is triggered at all. This problem appears randomly but consistenly. This means, that when I start the application and the first grab fails, every following attempt will fail too, until I restart the application and vice versa for successfull grabs.

The application needs to work on a CAVE system, which runs the application on several node systems. Therefore I somehow have to make sure that the grab doesn't fail on each system, so is there a possible way to prevent grabs from failing in this constellation?

 

Greetings

Heiko

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

The reach may fail if the character is unable to reach the object. Does it look like that is the case?

September 1, 2016
1:21 am
Avatar
Member
Members
Forum Posts: 8
Member Since:
August 30, 2016
sp_UserOfflineSmall Offline

Yeah kind of. The agent reaches for the object and the hand is following the object's movement. His palm is then resting on the object until it gets out of his reach again (After this it looks like he is trying to reach the object, which is too far away now). Theoretically he should be able to grab the cube, because his hand is litterally already grabbing it.

However this problem occurs randomly as stated above. So the same constellation for the initial object position, object movement speed, object movement direction and agent position can succeed in one run and fail in another run. I also tried different setups, with different object positions (nearer or further to the agent) and different object movement speeds. As a result the probability of the problem to occur seem to change (although I can't tell that for sure), but it still was happening once in a while.

Maybe finding a sweet spot for the object when the grab is performed could solve this problem but I couldn't find a way to locate it without randomly trying different setups.

September 6, 2016
10:20 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Can you send me a video to better understand the issue?

Ari

September 7, 2016
1:58 am
Avatar
Member
Members
Forum Posts: 8
Member Since:
August 30, 2016
sp_UserOfflineSmall Offline

Sure, the following link shows how the agent should work, in a case where the error hasn't occured:

 

https://gigamove.rz.rwth-aachen.de/d/id/tTcdHGoPa6Gwae?15&id=tTcdHGoPa6Gwae

 

This video shows exactly the same application (nothing has changed to the previous video) but this time the agent is not working:

 

https://gigamove.rz.rwth-aachen.de/d/id/dtiXdzAmQFuSLB?29&id=dtiXdzAmQFuSLB

September 7, 2016
12:12 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Looks like an interesting application.

First, it looks like the hand isn't grabbing a cube. Did you try setting the collision shape of the grabbed pawn like this:

 

mypawn.setVec3Attribute("collisionShapeScale", .1, .1, .1)

mypawn.setStringAttribute("collisionShape", "box")

 

You should see the fingers wrap around the object. 

Can you see if that makes a difference?

Ari

September 9, 2016
3:46 am
Avatar
Member
Members
Forum Posts: 8
Member Since:
August 30, 2016
sp_UserOfflineSmall Offline

I already did that in the video, I think it's just difficult to recognize the hand's grab movement in this constellation.

 

However I found a way to work around the bug now. When the first grab fails I added the following command before sending the command for the following grab:

 

<sbm:reach sbm:handle="HANDLE_NAME_OF_PREVIOUS_GRAB" sbm:action="pick-up" sbm:reach-finish="true" />

 

to abort the previous grab. As a result I get a strange behavior for the first three or four cubes, but after this the agent starts working like shown in the first video.

September 9, 2016
4:58 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Ok, looks like an imperfect solution.

 

Are you saying that you are using more than one handle for the grab? You should be using the same handle name for all of them.

September 13, 2016
12:18 am
Avatar
Member
Members
Forum Posts: 8
Member Since:
August 30, 2016
sp_UserOfflineSmall Offline

Ah ok, I thought the handle should be sth. like an unique ID to identify the handle command.

 

I tried using the same handle for every grab command now, but I'm getting the bug back again after this.

September 16, 2016
10:41 am
Avatar
Admin
Forum Posts: 52
Member Since:
August 8, 2012
sp_UserOfflineSmall Offline

Hi,
I think the reason why sometimes reach would fail is due to the fact the objects are moving. The reach controller will check whether the target object is too far away when performing the grab and the pawn won't be attached if so.

And somehow this fail attachments cause problems for subsequent reaching for a new target. This explains why the reaching would work normally again once you reset it with 'reach-finish'. 

To help test and fix this problem, can you provide me the setup script for the scene ? I would hope to replicate this problem with moving objects and trace the messages from reach controller.

Andrew

September 21, 2016
3:08 am
Avatar
Member
Members
Forum Posts: 8
Member Since:
August 30, 2016
sp_UserOfflineSmall Offline

Hi Andrew,

we are using SmartBody integrated into our VR Toolkit (https://sourceforge.net/projects/vistavrtoolkit/). Therefore it's not able for me to provide a simple setup script.

A brief description of the setup could look like this:

I'm creating SmartBodyPawns with a SHAPE_BOX collision shape and a scale of 0.1. I place them a little bit in front of the agent and on a position on the far right. After creation I'm moving them every frame to the left and when they get near the Agent (checking the position every frame) I tell the Agent to grab it with a command like this:

<sbm:reach sbm:action="pick-up" target="object_XY" sbm:reach-finish="false"/>

Then I'm reacting and the OnPawnAttached-event, which is only triggered once in a while.

 

Greetings

Heiko

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