#include <CscEntityReflexion.h>
Static Public Member Functions | |
| static bool & | autoCloseStreamEnabled () |
Processes "reflection" for an entity (identified by its serial number). Entity thinking process can be described as 2 main loops : 1) capture / detect / focus & notify 2) AI with genetical algorithms
| conscience_core::ai::CscEntityReflexion::CscEntityReflexion | ( | ptr< CscEntityReflexionParameters > | parameters, |
| CscEnvironmentSimulator & | globalEnvironmentSimulator | ||
| ) |
Reflection starts when this constructor is called. Which means that instance initializes, entity is imported in simulator(s), and threads start
|
virtual |
| void conscience_core::ai::CscEntityReflexion::addAdditionalEntityStatusFlag | ( | CscEntityStatusFlagsList | flag | ) |
This will add a new additional flag (in addition to last entity status flags from real entity)
| void conscience_core::ai::CscEntityReflexion::addCustomData | ( | const map< string, void * > & | customData | ) |
assign any user defined data to this entity
| void conscience_core::ai::CscEntityReflexion::addLiveEnvironmentUpdateListener | ( | LiveEnvironmentUpdateListener | listener | ) |
| void conscience_core::ai::CscEntityReflexion::addVideoSource | ( | ptr< CscEntityVideoSource > | videoSource | ) |
Adds a secondary video source for this entity reflexion. Primary video source is given in entity reflexion paramters
| void conscience_core::ai::CscEntityReflexion::answerDecision | ( | const string & | decisionUid, |
| bool | accept | ||
| ) |
|
static |
Default: true If true, reflexions will automatically close their stream consumption when idle (no detector enabled)
| void conscience_core::ai::CscEntityReflexion::clearLidarCartography | ( | ) |
| void conscience_core::ai::CscEntityReflexion::clearPublicAIDataForSubject | ( | const string & | subject | ) |
| void conscience_core::ai::CscEntityReflexion::clearStringDetectorResult | ( | ) |
| void conscience_core::ai::CscEntityReflexion::consumeVideoSource | ( | const optional< string > & | id = {}, |
| bool | reopenEvenIfAlreadyOpened = true |
||
| ) |
Closes currently opened stream, if any, and then open a new capture stream based on video source configured in parameters
| id | id of the video source to be consumed. If empty, primary video source will be consumed |
| reopenEvenIfAlreadyOpened | if true, captureEngine will be reopened on source. If false, captureEngine will be opened only if not already opened |
| void conscience_core::ai::CscEntityReflexion::fireLiveEnvironmentUpdate | ( | ) |
| float * conscience_core::ai::CscEntityReflexion::geAIObjectivesStatus | ( | ) | const |
| CscEntityReflexionActivity conscience_core::ai::CscEntityReflexion::getActivitySummary | ( | ) |
| const CscSimulationWorld * conscience_core::ai::CscEntityReflexion::getAISimulationWorld | ( | ) | const |
| CscEntityStatusFlags conscience_core::ai::CscEntityReflexion::getAllEntityStatusFlags | ( | ) | const |
returns last known entity status flags (Only supported for real entities at the moment) and additional flags
| CscCaptureEngine * conscience_core::ai::CscEntityReflexion::getCaptureEngine | ( | const optional< string > & | videoSourceId = {} | ) | const |
Gets capture engine for given videoSourceId or null if capture engine not found for requested video source
| videoSourceId | id of the video source of the capture engine. If empty, primary source will be used |
| CscPlaceCartography * conscience_core::ai::CscEntityReflexion::getCartography | ( | ) | const |
| map< string, void * > conscience_core::ai::CscEntityReflexion::getCustomData | ( | ) | const |
| void * conscience_core::ai::CscEntityReflexion::getCustomDataValue | ( | const string & | key | ) | const |
| ptr< CscEntityReflexionDetectionParameters > conscience_core::ai::CscEntityReflexion::getDetectionParameters | ( | ) |
|
inline |
| ptr< CscEntityClient > conscience_core::ai::CscEntityReflexion::getEntityClient | ( | ) | const |
| ptr< CscEntityIdentity > conscience_core::ai::CscEntityReflexion::getEntityIdentity | ( | ) | const |
| const CscEntityModel * conscience_core::ai::CscEntityReflexion::getEntityModel | ( | ) | const |
| const string & conscience_core::ai::CscEntityReflexion::getEntityModelId | ( | ) | const |
| string conscience_core::ai::CscEntityReflexion::getEntityType | ( | const CscEntityModel & | model | ) | const |
| const FocusParameter * conscience_core::ai::CscEntityReflexion::getFocusParameter | ( | ) |
| CscEnvironmentSimulator & conscience_core::ai::CscEntityReflexion::getGlobalEnvironmentSimulator | ( | ) |
| optional< ptr< DetectionResult > > conscience_core::ai::CscEntityReflexion::getLastDetectionResult | ( | ) |
| CscLidarEngine * conscience_core::ai::CscEntityReflexion::getLidarEngine | ( | ) |
| vector< ptr< HumanDecision > > conscience_core::ai::CscEntityReflexion::getOngoingDecisions | ( | ) |
| ptr< const CscEntityReflexionParameters > conscience_core::ai::CscEntityReflexion::getParameters | ( | ) | const |
| CscEntityPositionManager * conscience_core::ai::CscEntityReflexion::getPositionManager | ( | ) | const |
| map< string, ptr< CscPublicAIData > > conscience_core::ai::CscEntityReflexion::getPublicAIDataForSubject | ( | const string & | subject | ) |
| CscSequencesProcessor * conscience_core::ai::CscEntityReflexion::getSequenceProcessor | ( | ) | const |
| const string & conscience_core::ai::CscEntityReflexion::getSerialNumber | ( | ) | const |
| ptr< CscEntityReflexion > conscience_core::ai::CscEntityReflexion::getSharedPtr | ( | ) | const |
| CscSlamEngine * conscience_core::ai::CscEntityReflexion::getSlamEngine | ( | ) |
| optional< string > conscience_core::ai::CscEntityReflexion::getStringDetectorResult | ( | ) |
| ptr< CscEntityVideoSource > conscience_core::ai::CscEntityReflexion::getVideoSource | ( | const optional< string > & | id = {} | ) | const |
| id | id of the video source. If empty, primary source will be used |
| const vector< ptr< CscEntityVideoSource > > & conscience_core::ai::CscEntityReflexion::getVideoSources | ( | ) | const |
| bool conscience_core::ai::CscEntityReflexion::hasStatusFlag | ( | const vector< CscEntityStatusFlagsList > & | statuses | ) | const |
| bool conscience_core::ai::CscEntityReflexion::hasStatusFlag | ( | CscEntityStatusFlagsList | status | ) | const |
| void conscience_core::ai::CscEntityReflexion::ifNotStopped | ( | const function< void()> & | action | ) |
| void conscience_core::ai::CscEntityReflexion::ifRunning | ( | function< void()> | action | ) |
Thread safe method to run an action if and only if this entity reflexion is alive and running. Be sure to keep this action as short as possible because it locks entity reflexion loop
Thread safe method to run an action if and only if this entity reflexion is alive and running
| bool conscience_core::ai::CscEntityReflexion::isLidarEngineActivated | ( | ) |
| bool conscience_core::ai::CscEntityReflexion::isLidarEngineInitialized | ( | ) |
| bool conscience_core::ai::CscEntityReflexion::isSimulated | ( | ) | const |
This method determines whether the reflection entity is simulated or real. A simulated entity is only available within the simulator and has no repercussions in the real world. On the other hand, a real entity exists outside the simulator; it is its digital twin that is displayed within the simulator.
| void conscience_core::ai::CscEntityReflexion::loadCartographyFromPoints | ( | const vector< const CscPoint3d * > & | points | ) |
| void conscience_core::ai::CscEntityReflexion::onSequenceToBeSentToRealEntity | ( | SequenceProcessorSendSequenceListener | listener | ) |
| CscSequence * conscience_core::ai::CscEntityReflexion::processKnowledgeItem | ( | CscKnowledgeItem * | knowledgeItem, |
| CscState * | initialState | ||
| ) |
| knowledgeItem | will be DELETED after use |
| void conscience_core::ai::CscEntityReflexion::purgeAIObjectives | ( | ) |
| void conscience_core::ai::CscEntityReflexion::removeAdditionalEntityStatusFlag | ( | CscEntityStatusFlagsList | flag | ) |
| void conscience_core::ai::CscEntityReflexion::removeObjectivesByAITypes | ( | knowledge::CscArtificialIntelligenceType | type | ) |
| void conscience_core::ai::CscEntityReflexion::removeVideoSource | ( | ptr< CscEntityVideoSource > | videoSource | ) |
Removes a video source.
| void conscience_core::ai::CscEntityReflexion::resetParameters | ( | ptr< CscEntityReflexionParameters > | parameters | ) |
Sets parameters for this entity reflexion. WARNING: consumeVideoSource() must be called to take in account video source changes
| void conscience_core::ai::CscEntityReflexion::resetToInitialState | ( | ) |
| void conscience_core::ai::CscEntityReflexion::restoreCartography | ( | optional< fs::path > | cartographyDirMaybe = {} | ) |
| cartographyDirMaybe | if empty, will load latest from FS (default directory), otherwise will try to open carto folder if directory, or points csv file if file |
| void conscience_core::ai::CscEntityReflexion::sendSequenceToRealRobot | ( | CscSequence * | sequence | ) | const |
| sequence | will NOT be deleted by this method |
| void conscience_core::ai::CscEntityReflexion::setDetectionParameters | ( | ptr< CscEntityReflexionDetectionParameters > | detectionParameters | ) |
| void conscience_core::ai::CscEntityReflexion::setEntityClient | ( | ptr< CscEntityClient > | entityClient | ) |
| void conscience_core::ai::CscEntityReflexion::setFocusParameter | ( | const FocusParameter * | focusParam | ) |
| void conscience_core::ai::CscEntityReflexion::setLastEntityStatusFlags | ( | const string & | lastEntityStatusFlags | ) |
Only a string containing CscEntityStatusFlagsList or empty string are supported at the moment coming from the entity
| void conscience_core::ai::CscEntityReflexion::setScene | ( | CscWorldPlace * | place | ) |
| void conscience_core::ai::CscEntityReflexion::setSensorValues | ( | const string & | sensorName, |
| const map< string, double > & | values | ||
| ) |
| void conscience_core::ai::CscEntityReflexion::setSlamCartographyActivated | ( | bool | enable | ) |
| void conscience_core::ai::CscEntityReflexion::setSlamLocalizationActivated | ( | bool | enable, |
| CscPoint3dOriented * | position = nullptr |
||
| ) |
| position | force initial position |
| void conscience_core::ai::CscEntityReflexion::setVideoSource | ( | ptr< CscEntityVideoSource > | videoSource, |
| bool | consumeIfClosedOrSourceChanged = false |
||
| ) |
Sets video source for this entity reflexion. WARNING: consumeVideoSource() must be called to take in account (or consumeIfClosedOrSourceChanged should be true)
| videoSource | new video source to be used as main source |
| consumeIfClosedOrSourceChanged | if true, will open video stream if not opened (or reopen if source changed) |
| void conscience_core::ai::CscEntityReflexion::startAutonomousExploration | ( | ) |
| void conscience_core::ai::CscEntityReflexion::startCaptureRecordingToFile | ( | const fs::path & | outputPath, |
| const optional< string > & | videoSourceId = {} |
||
| ) |
| void conscience_core::ai::CscEntityReflexion::startLastPeriodCaptureRecordingToFile | ( | short | durationSeconds, |
| const fs::path & | outputPath | ||
| ) |
| void conscience_core::ai::CscEntityReflexion::startLidarEngineEntity | ( | ) |
| void conscience_core::ai::CscEntityReflexion::startLidarEngineLocalDevice | ( | string | devicePath, |
| double * | currentState | ||
| ) |
| void conscience_core::ai::CscEntityReflexion::stopAndRelease | ( | bool | removeFromEnvironment = true | ) |
| removeFromEnvironment | pass false if entity has already been removed from environment simulator |
| void conscience_core::ai::CscEntityReflexion::stopAndSaveLidarCartography | ( | ) |
| void conscience_core::ai::CscEntityReflexion::stopAutonomousExploration | ( | ) |
| void conscience_core::ai::CscEntityReflexion::stopCaptureRecordingToFile | ( | ) |
| optional< fs::path > conscience_core::ai::CscEntityReflexion::stopLastPeriodCaptureRecordingToFile | ( | ) |
| void conscience_core::ai::CscEntityReflexion::stopLidarEngine | ( | ) |
| void conscience_core::ai::CscEntityReflexion::unwatchAlerts | ( | vector< CscAlertType > | alertsToBeUnwatched | ) |
| bool conscience_core::ai::CscEntityReflexion::useGnssPositioning | ( | ) | const |
This method determines if the entity use a gnss positioning. It's use for determine the position send in sequence result.
| void conscience_core::ai::CscEntityReflexion::vocalPhoneCallTest | ( | const vector< string > & | phoneNumbers, |
| const map< string, string > & | additionalParams | ||
| ) |