Slam
This section contains API calls for using the Occipital Core Structure sensors and Slam capabilities on Misty II Pro.
GetMap
Obtains the occupancy grid data for Misty's currently active map.To obtain a valid response from GetMap
, Misty must first have successfully generated a map. To change the currently active map, use the SetCurrentSlamMap
command.
GetCurrentSlamMap
Obtains the key for the currently active map.
GetSlamIrExposureAndGain
Obtains the current exposure and gain settings for the infrared cameras in the Occipital Structure Core depth sensor.
GetSlamVisibleExposureAndGain
Obtains the current exposure and gain settings for the fisheye camera in the Occipital Structure Core depth sensor.
GetSlamMaps
Obtains a list of keys and names for Misty's existing maps.
Example code
misty.get_slam_maps()
Parameters
GetSlamNavigationDiagnostics
Obtains diagnostic information about Misty's navigation system.
The information in the data object for this command is primarily used by the Misty Robotics engineering and support staff to troubleshoot and root-cause issues with Misty's SLAM system. The contents of this data object are likely to change without notice in future system updates.
misty.get_slam_navigation_diagnostics()
GetSlamPath
Obtain a path from Misty's current location to a specified set of X,Y coordinates. Pass the waypoints this command returns to the path parameter of FollowPath
for Misty to follow this path to the desired location.
This command is not functional with the Misty II Basic Edition.
Important! Make sure to use StartTracking
before using this command to have Misty start tracking her location, and use StopTracking
to have her stop tracking her location after she arrives at the specified location
Example code
Parameters
X (integer) - The X coordinate of the destination.
Y (integer) - The Y coordinate of the destination.
GetSlamStatus
Obtains values representing the current activity and status of Misty's SLAM system. Check these values for information about the current status of Misty's depth sensor, the SLAM system, and to see information relevant to any ongoing mapping or tracking activities.
misty.get_slam_status()
SetCurrentSlamMap
Sets a map to be Misty's currently active map for tracking and relocalization.
Example code
Parameters
Key (string) - The unique
key
of the map to make currently active. Note: This command does not work when passed the value for thename
associated with a map.
SetSlamIrExposureAndGain
Sets the exposure and gain settings for the infrared cameras in the Occipital Structure Core depth sensor.
Example code
Parameters
Exposure (double) - Exposure levels for the infrared cameras in the depth sensor (in seconds). Range:
0.001
-0.033
.Gain (integer) - Gain levels for the infrared cameras in the depth sensor (in dB). Range:
0
-3
.
SetSlamVisibleExposureAndGain
Sets the exposure and gain settings for the fisheye camera in the Occipital Structure Core depth sensor.
Example code
Parameters
Exposure (double) - Exposure levels for the fisheye camera in the depth sensor (in seconds). Range:
0.001
-0.033
Gain (integer) - Gain levels for the fisheye camera in the depth sensor (in dB). Range:
1
-8
RenameSlamMap
Renames an existing map.
Example code
Parameters
Key
(string) - The uniquekey
value of the map to rename.Name (
string) - A newname
value for the map.
ResetSlam
Resets Misty's SLAM sensors
misty.reset_slam()
StartMapping
Starts Misty mapping an area.
Misty saves each map she creates to local storage. Each map is associated with a unique key at the time of the map's creation. Map keys are formatted as date timestamps in UTC (i.e. Map_20190911_21.47.16.UTC
). To obtain a list of Misty's existing maps, use the GetSlamMaps
command.
misty.start_mapping()
StopMapping
Stops Misty from mapping the environment.
misty.stop_mapping()
DeleteSlamMap
Deletes a specified Slam map.
Example code
Parameters
Key (string) - The unique
key
value of the map to delete. Note: This command does not work when passed the value for thename
associated with a map.
StartSlamStreaming
Opens the data stream from the Occipital Structure Core depth sensor, so you can obtain image and depth data when Misty is not actively tracking or mapping.
Important! Always use StopSlamStreaming
to close the depth sensor data stream after sending commands that use Misty's Occipital Structure Core depth sensor. Using StopSlamStreaming
turns off the laser in the depth sensor and lowers Misty's power consumption.
Example code
misty.start_slam_streaming()
StopSlamStreaming
Stops Misty's streaming data from the Occipital Structure Core depth sensor.
misty.stop_slam_streaming()
StartTracking
Enables Misty to start tracking the mapped enviornment.
StopTracking
Stops Misty from tracking the mapped environment.
TakeDepthPicture
Provides the current distance of objects from Misty's Occipital Structure Core depth sensor. Note that depending on the scene being viewed, the sensor may return a large proportion of "unknown" values in the form of NaN
("not a number") values.
TakeFisheyePicture
Takes a photo using Misty's Occipital Structure Core depth sensor..
Last updated