High level sensor for search and rescue scenario
This is a multi functional component specific for Search and Rescue scenario, where the robot must be able to aid human victims. The sensor is capable of detecting any victim located within a cone in front of the robot, with a range delimited in the properties of the Blender object. The output of the sensor is a list of the robots and their positions in the simulated world. This sensor works only with the human victim object.
Additionally, the sensor provides a number of services related to the capabilities of the robot to help the nearest victim:
- Report on the condition of a victim
- Report the capabilities of the robot
- Heal a victim (if the robot has compatible capabilities with the requirements of the victim)
In the test scenarios, human victims are shown in red. When a robot approaches, if it has the adequate capabilities, it will be able to help the victims. When issued the command, the sensor will gradually change the colour of the victim to green, and its status to healthy. It will detect if a victim is in front of the robot. When instructed to heal the victim, it will change the Game Properties of the object to reduce its injured value.
You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...).
maximum distance from which it is possible to heal a victim. Even if the victim can be detected by the sensor, it can’t be healed unless its distance from the robot is less than this value.
represents a list of numbers, separated by comas, that represent the equipment capabilities of the robot. This information should be used by the operator of the robot to determine if it is capable of helping a victim or not.
Aperture angle of the radar capable of detecting the victims (in degree)
Detection distance in meter. Victims further way from the gripper than this distance will not be detected
change the delay required to heal a victim. This number is expressed as the number of tics that are ignored before taking action. A lower number will produce a lower delay
This sensor exports these datafields at each simulation step:
number of seconds in simulated time
A list of entries for each victim detected inside the cone of the sensor. Keys are victim name. The value is a dictionnary containing the coordinate of the victim, its requirements, and the severity of its injuries
Returns the properties of a component.
a dictionary of the current component’s properties
Reduce the Severity value of the nearest victim. When the value reaches ‘0’, change the Injured status of the victim to False. The service terminates when the victim is fully healed.
Returns the configurations of a component (parsed from the properties).
a dictionary of the current component’s configurations
Returns the list describing the type of injuries sustained by the victim
Returns the current data stored in the sensor.
a dictionary of the current sensor’s data
Returns the integer indicating the victim healing priority
Returns the list describing the abilities with which the robot is equipped. It must match the requirements of the victim for the robot to be able to heal it.
Modify one property on a component
The following examples show how to use this component in a Builder script:
from morse.builder import * # adds a default robot (the MORSE mascott!) robot = Morsy() # creates a new instance of the sensor searchandrescue = SearchAndRescue() # place your component at the correct location searchandrescue.translate(<x>, <y>, <z>) searchandrescue.rotate(<rx>, <ry>, <rz>) robot.append(searchandrescue) # define one or several communication interface, like 'socket' searchandrescue.add_interface(<interface>) env = Environment('empty')