Some confusions about the objects
See original GitHub issueHello,when I read the tutorial, here are some objects I can not figure out what are they suppose to be. And as follows:
1.BowlDirty, BowlFilled
,Dirt
which is actionable and has state?
2.EggFried,EggShell,LettuceSliced,MugFilled,PotatoSliced,SoapBottleFilled,TissueBoxEmpty,TomatoSliced,ContainerFull
,what’s the actionable action suppose to be?
Sorry about the elementary questions put up here, but looking forward to your answer.Thanks a lot~
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Examples of objects subject to confusion in the recognition ...
Examples of objects subject to confusion in the recognition module. The object in the middle shows a tape roll. The same object from...
Read more >An account of objects identification confusions.
In 2 experiments, trained military observers identified vehicles in infrared (thermal) imagery that varied in distance, signal-to-noise ratio, ...
Read more >Confusion about articles before unique objects in math
Confusion about articles before unique objects in math ... I am a graduate math student, English is my second language but we have...
Read more >Understanding the structural determinants of object ...
Understanding the structural determinants of object confusion in memory: An assessment of psychophysical approaches to estimating visual similarity.
Read more >Representation of Object Orientation in Children: Evidence ...
Mirror-image confusion has typically been characterized as a tendency to confuse left-right mirror images (i.e., stimuli related by reflection across a vertical ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As long as you change the bread object’s
AnimState1
value to 2, the SimObj script will update the object type for you. Yourslice
action only needs to change theAnimState1
.Changing the mug to the
full
state works the same way as slicing bread. Any objects that are actionable have multiple animation states, and swapping to them by changing theAnimState1
int parameter will just change the model to that version. If you want to do something like make sure you bring the mug to a sink with water coming out, you will need to make new logic to reinforce that restriction yourself. For example, if you just make afill
action that requires a target mug, it will instantly turn the mug into the filled version as soon as you switch it’sAnimState1
value to 2. If you want to additionally make sure the sink is on and water is coming out, you will need to access the sink’sAnimState1
and change it so that it is in the “on” state. Then, you could make some logic that if the sink is in the “on” state and you have a mug, you can then change the mug to filled.The TissueBox, like all the other actionable objects, controls its state by changing the
AnimState1
parameter on its Animator component.Plates do not have the receptacle functionality, so by default they cannot have other objects placed on/in them.
All actionable objects have their state change functionality implemented the same way. Changing parameters on the Animator component of an actionable object will cause it to change state.
You can open up the Animator window in the Unity editor by going to Window->Animator (make sure NOT to pick Window->Animation, that is different and not what you need)
Each Animator looks like this in the Unity Editor, and when you select an object in the Hierarchy view, it’s corresponding Animator will be shown.
Click on the
Parameters
tab in the animator window to see all the object’s states. Most objects have 4 states, but really only make use of 2 of them. Note that there is a single ParameterAnimState1
which is just an int. Setting theAnimState1
parameter to 0, 1, 2 etc. will change the state to whatever object version is linked to that animation state, and when doing so the SimObj Type will update accordingly. Note that some objects only have 2 states, others have multiple.You may find it useful to go into the Unity Editor and play around with the
AnimState1
values to see what kinds of states each object has. If you have the Scene view open as well as the Animator window open in the editor, hitting Play will allow you to edit theAnimState1
value at runtime without having to do any scripting first. This is useful just to make sure you are setting an object to the state you want it to be in.In the above example you can see that the editor is in Play mode, and I’ve selected a mug. Just type into the
AnimState1
field and you can change the state of the mug as shown in this second image.Remember, you can do this programmatically using the example script linked in the other response. I will repost it here for convenience. Put this script anywhere in the
DiscreteRemoteFPSAgentController.cs
script and you will be able to access it with the same syntax as any other action. Refer to this (https://github.com/allenai/ai2thor/issues/31) for more details about the Action system implementation and syntax.the
SetInteger()
function here lets you setAnimState1
to whatever state you might need for the object. Remember that these are object specific, so to be sure you are state changing to what you want, go into the editor and double check the states at runtime.Also to bring up another point from one of your previous comments, the
Dirt
object is kind of an outlier, and does not use this Animator/Animation State logic to control it.Edit: Note that the above information no longer applies to THOR version 1.0, as different logic not tied to the animator component is used for animation based state changes
The dirt object itself is just a decal that is on the floor or on the walls/mirror of certain scenes. The dirt itself is not used to change the Bowl to BowlDirty.
To change the Bowl to DirtyBowl, or to change a DirtyBowl to a Bowl, you will need to make your own action similar to the Slice() function linked in my previous comment. You can add some additional checks to the Slice() function so that it will only succeed if the Agent has a Knife in its inventory, but by default there are no context sensitive restrictions to custom actions. You will need to create all these custom actions and any restrictions for using them yourself.