tbp.monty.simulators.tacto#
tbp.monty.simulators.tacto.agents#
- class TactoFingerAgent(agent_id: str, sensor_id: str, position: Tuple[float, float, float] = (0.0, 0.0, 0.0), rotation: Tuple[float, float, float, float] = (1.0, 0.0, 0.0, 0.0), height: float = 1.5, resolution: Tuple[int, int] = (32, 48), rotation_step: float = 0.0, translation_step: float = 0.0, config: TactoSensorSpec = TactoSensorSpec(name='digit', camera={'cam0': Camera(position=[0, 0, 0.015], orientation=[90, 0, -90], yfov=60, znear=0.001, lightIDList=[0, 1, 2])}, gel=Gel(origin=[0.022, 0, 0.015], width=0.02, height=0.03, curvature=True, curvatureMax=0.005, R=0.1, countW=100, mesh=None), lights=Lights(origin=[0.005, 0, 0.015], polar=True, colors=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], intensities=[1, 1, 1], spot=False, shadow=False, coords=[[0, 0.01732, 0.01], [0, -0.01732, 0.01], [0, 0, -0.02]], xs=[0, 0, 0], rs=[0.02, 0.02, 0.02], thetas=[30, 150, 270]), noise=Noise(mean=0, std=7), force=Force(enable=True, range_force=[0, 100], max_deformation=0.005)))[source]#
Bases:
HabitatAgent
A simple tacto sensor mounted to the tip of a single finger.
With the following predefined actions:
“move_forward”: Move finger forward using translation_step
“move_backward”: Move finger backward using translation_step
“turn_left”: Turn finger left using rotation_step
“turn_right”: Turn finger right using rotation_step
- agent_id#
Unique ID used to identify this agent actions and observations
- position#
Agent initial position in meters. Default (0, 0, 0)
- rotation#
Agent initial rotation quaternion. Default (1, 0, 0, 0)
- height#
Agent height in meters. Default 0.1 (10 cm)
- rotation_step#
Rotation step in degrees for the “turn” actions
- translation_step#
Translation step in meters for the “move” actions
- config#
Tacto sensor configuration (‘OMNITACT’, ‘DIGIT’). Default ‘DIGIT’
- __init__(agent_id: str, sensor_id: str, position: Tuple[float, float, float] = (0.0, 0.0, 0.0), rotation: Tuple[float, float, float, float] = (1.0, 0.0, 0.0, 0.0), height: float = 1.5, resolution: Tuple[int, int] = (32, 48), rotation_step: float = 0.0, translation_step: float = 0.0, config: TactoSensorSpec = TactoSensorSpec(name='digit', camera={'cam0': Camera(position=[0, 0, 0.015], orientation=[90, 0, -90], yfov=60, znear=0.001, lightIDList=[0, 1, 2])}, gel=Gel(origin=[0.022, 0, 0.015], width=0.02, height=0.03, curvature=True, curvatureMax=0.005, R=0.1, countW=100, mesh=None), lights=Lights(origin=[0.005, 0, 0.015], polar=True, colors=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], intensities=[1, 1, 1], spot=False, shadow=False, coords=[[0, 0.01732, 0.01], [0, -0.01732, 0.01], [0, 0, -0.02]], xs=[0, 0, 0], rs=[0.02, 0.02, 0.02], thetas=[30, 150, 270]), noise=Noise(mean=0, std=7), force=Force(enable=True, range_force=[0, 100], max_deformation=0.005)))[source]#
tbp.monty.simulators.tacto.config#
Tacto touch sensor configuration.
See also
- class TactoSensorSpec(name: str, camera: Mapping[str, Camera], gel: Gel, lights: Lights, noise: Noise | None = None, force: Force | None = None) None [source]#
Bases:
object
Tacto sensor specifications.
- name#
Sensor name (‘omnitact’ or ‘digit’)
- camera#
Camera specifications. One camera for DIGIT, five for OmniTact
- gel#
Sensor elastomer gel configuration
- lights#
Sensor LED light configuration
- noise#
Gausian noise calibration
- force#
Elastomer force feedback specification
- __init__(name: str, camera: Mapping[str, Camera], gel: Gel, lights: Lights, noise: Noise | None = None, force: Force | None = None) None #
-
gel:
Gel
#
-
lights:
Lights
#
tbp.monty.simulators.tacto.sensors#
Tacto touch sensor implementation in habitat-sim.
See also
- class TactoSensor(sensor_id: str = <factory>, position: ~typing.Tuple[float, float, float] = (0.0, 0.0, 0.0), rotation: ~typing.Tuple[float, float, float, float] = (1.0, 0.0, 0.0, 0.0), resolution: ~typing.List[float] = <factory>, config: ~tbp.monty.simulators.tacto.config.TactoSensorSpec = TactoSensorSpec(name='digit', camera={'cam0': Camera(position=[0, 0, 0.015], orientation=[90, 0, -90], yfov=60, znear=0.001, lightIDList=[0, 1, 2])}, gel=Gel(origin=[0.022, 0, 0.015], width=0.02, height=0.03, curvature=True, curvatureMax=0.005, R=0.1, countW=100, mesh=None), lights=Lights(origin=[0.005, 0, 0.015], polar=True, colors=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], intensities=[1, 1, 1], spot=False, shadow=False, coords=[[0, 0.01732, 0.01], [0, -0.01732, 0.01], [0, 0, -0.02]], xs=[0, 0, 0], rs=[0.02, 0.02, 0.02], thetas=[30, 150, 270]), noise=Noise(mean=0, std=7), force=Force(enable=True, range_force=[0, 100], max_deformation=0.005))) None [source]#
Bases:
SensorConfig
Base class common for all tacto sensors.
Each specific sensor implementation should inherit this class and pass the appropriated configuration file (‘digit’ or ‘omnitact’)
- sensor_id#
Sensor ID unique within the sensor module. The observations made by this sensor will be prefixed by this id. i.e. “sensor_id.cam0”
- resolution#
Camera resolution (width, height). Default (32, 48)
- position#
Sensor position relative to
HabitatAgent
. Default (0, 0, 0)
- rotation#
Sensor rotation quaternion. Default (1, 0, 0, 0)
- config#
Tacto Sensor specification (DIGIT, OMNITACT)
- __init__(sensor_id: str = <factory>, position: ~typing.Tuple[float, float, float] = (0.0, 0.0, 0.0), rotation: ~typing.Tuple[float, float, float, float] = (1.0, 0.0, 0.0, 0.0), resolution: ~typing.List[float] = <factory>, config: ~tbp.monty.simulators.tacto.config.TactoSensorSpec = TactoSensorSpec(name='digit', camera={'cam0': Camera(position=[0, 0, 0.015], orientation=[90, 0, -90], yfov=60, znear=0.001, lightIDList=[0, 1, 2])}, gel=Gel(origin=[0.022, 0, 0.015], width=0.02, height=0.03, curvature=True, curvatureMax=0.005, R=0.1, countW=100, mesh=None), lights=Lights(origin=[0.005, 0, 0.015], polar=True, colors=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], intensities=[1, 1, 1], spot=False, shadow=False, coords=[[0, 0.01732, 0.01], [0, -0.01732, 0.01], [0, 0, -0.02]], xs=[0, 0, 0], rs=[0.02, 0.02, 0.02], thetas=[30, 150, 270]), noise=Noise(mean=0, std=7), force=Force(enable=True, range_force=[0, 100], max_deformation=0.005))) None #
- get_specs() List[habitat_sim.sensor.SensorSpec] [source]#
Returns List of Habitat sensor specs to be passed to habitat-sim.
- Return type:
- process_observations(sensor_obs)[source]#
Callback used to process habitat raw sensor observations.
- Parameters:
sensor_obs – Sensor raw habitat-sim observations
- Returns:
The processed observations grouped by agent_id
-
config:
TactoSensorSpec
= TactoSensorSpec(name='digit', camera={'cam0': Camera(position=[0, 0, 0.015], orientation=[90, 0, -90], yfov=60, znear=0.001, lightIDList=[0, 1, 2])}, gel=Gel(origin=[0.022, 0, 0.015], width=0.02, height=0.03, curvature=True, curvatureMax=0.005, R=0.1, countW=100, mesh=None), lights=Lights(origin=[0.005, 0, 0.015], polar=True, colors=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], intensities=[1, 1, 1], spot=False, shadow=False, coords=[[0, 0.01732, 0.01], [0, -0.01732, 0.01], [0, 0, -0.02]], xs=[0, 0, 0], rs=[0.02, 0.02, 0.02], thetas=[30, 150, 270]), noise=Noise(mean=0, std=7), force=Force(enable=True, range_force=[0, 100], max_deformation=0.005))#