
APT.all-test.MOUTBot.common.stand.soar Maven / Gradle / Ivy
#####################################
# file: stand.soar
# created: REW: 2003-05-01
##
# Encode all the situations in which an agent should move to a standing position
#
# Change history:
#
# [1] REW: 2003-05-01
# General strategy is to only terminate these operators when
# the position has changed. Position needs to be input, but for
# now we track it via ^self
# [2] Just notional for now until command fixed
# REW [2]: Remove output command until command fixed
# Let body-position default to standing
#sp {common*propose*stand*no-body-position
# (state ^name execute-mission ^top-state.self )
# ( -^body-position)
# -->
# ( ^operator +, >, = 90)
# ( ^name stand
## ^actions.stand true
# )
#}
# REW: 2003-05-23
# For test only, but it definitely works
#sp {common*propose*stand*test
# (state ^name execute-mission
# ^top-state.self )
# ( ^body-position <> stand
# -^changing-body-position)
# -->
# ( ^operator +, >, = 90)
# ( ^name stand
# ^actions.stand true
# )
#}
# REW: 2003-05-01
# [2] REW: For now, just add body-position stand
#sp {apply*stand*initialize-body-position
# (state ^operator
# ^top-state )
#( ^self
## ^io.output-link.stand.status complete
# )
#( -^body-position)
# ( ^name stand)
# -->
# (write (crlf) |Initialize body position|)
# ( ^body-position stand)
#}
sp {apply*stand
(state ^operator
^top-state )
( ^self )
( ^body-position
)
( ^name stand
^actions )
-->
(write (crlf) |Initiating move to stand |)
( ^body-position - +)
}
### Applications of execute mission for stand/kneel/lie-prone
sp {apply*top-state-operator*update-body-position
(state ^superstate nil
^operator
^top-state )
( ^self
^io.output-link.{ << stand lie-prone kneel >> }.status complete
)
( ^body-position )
( ^ )
( ^name )
-->
(write (crlf) |Feedback received...now | )
( ^body-position - +)
}
# REW: Need special prod because kneel really implemented as 'crouch'
# so we can't just copy the name
sp {apply*top-state-operator*update-body-position*crouch
(state ^superstate nil
^operator
^top-state )
( ^self
^io.output-link.crouch.status complete
)
( ^body-position )
( ^crouch )
( ^name )
-->
(write (crlf) |Feedback received...now kneeling| )
( ^body-position - kneel +)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy