Skip to content

Commit

Permalink
update person perception documentation (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
dholzmann authored Nov 21, 2024
1 parent 881dd88 commit e331d5f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <pre>
* 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
*
* </pre>
*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
*
* </pre>
*
Expand Down Expand Up @@ -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());

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit e331d5f

Please sign in to comment.