diff --git a/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/WaitForPerson.java b/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/WaitForPerson.java index 1da3233..357fc62 100644 --- a/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/WaitForPerson.java +++ b/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/WaitForPerson.java @@ -23,23 +23,33 @@ /** * Use this state to wait until a person is recognized in front of the robot. - * + * The person should stand in a cone in front of the robot defined by #_MAX_DIST and #_MAX_ANGLE + * This skill loops till the robot recognized a person in front. *
- * options: - * (optional) #_TIMEOUT(in ms) -> enable timeout after x ms - * (optional) #_MAX_DIST(meter) -> max Person Distance - * (optional) #_MAX_ANGLE(rad) -> max Person Angle (in both directions) + * + * Options: + * #_TIMEOUT: [long] Optional (default: -1) + * -> enable timeout after x ms. -1 means not time out + * #_MAX_DIST: [double] Optional (default: 2.0) + * -> max person distance in meter + * #_MAX_ANGLE: [double] Optional (default: 0.4) +* -> max Person Angle in radiant(in both directions) * - * slots: - * PersonDataSlot: [PersonData] [Write] -> saves the found person to this slot + * Slots: + * PersonDataSlot: [PersonData] [Write] + * -> saves the found person to this slot * - * possible return states are: - * success -> person found - * success.timeout -> timeout - * fatal -> a hard error occurred e.g. Slot communication error + * ExitTokens: + * success: -> person found + * success.timeout: -> timeout + * fatal: -> a hard error occurred e.g. Slot communication error * - * this skill loops till the robot recognized a person in front. - * Default is no timeout. + * Sensors: + * PersonSensor: [PersonDataList] + * -> Used to detect people + * PositionSensor: [PositionData] + * -> Used to read the current robot position + * ** * diff --git a/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/oneshot/SearchPeople.java b/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/oneshot/SearchPeople.java index c118882..8518044 100644 --- a/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/oneshot/SearchPeople.java +++ b/bonsai_skills/src/main/java/de/unibi/citec/clf/bonsai/skills/personPerception/oneshot/SearchPeople.java @@ -56,8 +56,6 @@ * Slots: * PersonDataListSlot: [PersonDataList] [Write] * -> All found persons in a list - * PositionDataSlot: [PositionData] [Read] - * -> the robot position to calculate relative angle, and setting the modified yaw in positional part of personData. * * ExitTokens: * success.people: There has been at least one person perceived in the given timeout interval satisfying the optional given angle and distance parameters. @@ -66,8 +64,12 @@ * error: There has been an exception while writing to slot or calling the actuator. * * Sensors: - * PersonSensor: [PersonDataList] - * -> Read in currently seen persons + * PositionSensor: [PositionData] + * -> Used to read the current robot position + * + * Actuators: + * PeopleActuator: [DetectPeopleActuator] + * -> Used to detect people * * * @@ -120,9 +122,7 @@ public void configure(ISkillConfigurator configurator) { search_timeout = configurator.requestOptionalInt(KEY_TIMEOUT, (int) search_timeout); actuator_timeout = configurator.requestOptionalInt(KEY_ACTUATOR_TIMEOUT, (int) actuator_timeout); - if (search_timeout > 0) { - tokenSuccessNoPeople = configurator.requestExitToken(ExitStatus.SUCCESS().withProcessingStatus("noPeople")); - } + tokenSuccessNoPeople = configurator.requestExitToken(ExitStatus.SUCCESS().withProcessingStatus("noPeople")); tokenSuccessPeople = configurator.requestExitToken(ExitStatus.SUCCESS().withProcessingStatus("people")); tokenError = configurator.requestExitToken(ExitStatus.ERROR()); @@ -220,8 +220,8 @@ public ExitToken execute() { //continue; } if (localPersonPos.getDistance(new Point2D(0.0, 0.0, LengthUnit.METER), LengthUnit.MILLIMETER) > searchRadius) { - logger.info("search distance is: " + searchRadius + ". person to far away: " - + localPersonPos.getDistance(new Point2D(0.0, 0.0, LengthUnit.METER), LengthUnit.MILLIMETER)); + logger.info("search distance is: " + searchRadius + "mm. person to far away: " + + localPersonPos.getDistance(new Point2D(0.0, 0.0, LengthUnit.METER), LengthUnit.MILLIMETER) + " mm."); continue; }