SurfaceGripperManager#
Fully qualified name: isaacsim::robot::surface_gripper::SurfaceGripperManager
-
class SurfaceGripperManager : public isaacsim::core::includes::PrimManagerBase<SurfaceGripperComponent>#
Manager class for handling surface grippers in a scene.
This class manages all surface gripper components in a USD scene, providing functionality to control and monitor gripper states. It processes physics steps to update gripper behaviors.
Public Functions
-
inline SurfaceGripperManager(omni::physx::IPhysx *physXInterface)#
Constructs a new SurfaceGripperManager.
- Parameters:
physXInterface – [in] Pointer to the PhysX interface used for physics simulation
-
inline ~SurfaceGripperManager()#
Destructor for SurfaceGripperManager.
-
virtual std::vector<std::string> getComponentIsAVector() const#
Returns a vector of supported component types.
- Returns:
Vector of strings representing supported component types
-
virtual void onStop()#
Handles the stop event for all managed grippers.
-
virtual void onComponentAdd(const pxr::UsdPrim &prim)#
Handles the addition of a new surface gripper component.
- Parameters:
prim – [in] The USD primitive representing the gripper to be added
-
virtual void onComponentChange(const pxr::UsdPrim &prim)#
Handles changes to a gripper component’s properties.
- Parameters:
prim – [in] The USD primitive whose properties have changed
-
void onPhysicsStep(const double &dt)#
Called for each physics step to update all grippers.
- Parameters:
dt – [in] The time step in seconds
-
virtual void onStart()#
Called when the simulation starts.
-
virtual void tick(double dt)#
Tick function called each frame.
- Parameters:
dt – [in] The time step in seconds
- bool setGripperStatus( )#
Sets the status of a specific gripper.
- Parameters:
primPath – [in] The USD path of the gripper to control
status – [in] The new status to set (“Open” or “Closed”)
- Returns:
True if the status was set successfully, false otherwise
-
std::string getGripperStatus(const std::string &primPath)#
Gets the status of a specific gripper.
- Parameters:
primPath – [in] The USD path of the gripper
- Returns:
The current status of the gripper or empty string if not found
-
std::vector<std::string> getAllGrippers() const#
Gets all grippers currently managed by this manager.
- Returns:
A vector of prim paths representing all grippers
-
SurfaceGripperComponent *getGripper(const std::string &primPath)#
Gets a specific gripper component by its path.
- Parameters:
primPath – [in] The USD path of the gripper
- Returns:
Pointer to the gripper component if found, nullptr otherwise
-
SurfaceGripperComponent *getGripper(const pxr::UsdPrim &prim)#
Gets a specific gripper component by its USD prim.
- Parameters:
prim – [in] The USD prim of the gripper
- Returns:
Pointer to the gripper component if found, nullptr otherwise
-
virtual void initialize(const pxr::UsdStageWeakPtr stage)#
Initializes the application with a USD stage.
Sets up the stage reference and creates the notice listener
- Parameters:
stage – [in] Weak pointer to the USD stage to be managed
- Post:
Application is initialized with the stage and notice listener
-
inline virtual void initComponents()#
Initializes components from the current stage.
Scans the USD stage for prims matching component types and creates corresponding components. Uses the USD runtime API for efficient traversal.
-
inline virtual void onPhysicsStep(float dt)#
Updates components during physics simulation steps.
Override this to implement physics-specific component updates
- Parameters:
dt – [in] Physics time step in seconds
-
inline virtual void onComponentRemove(const pxr::SdfPath &primPath)#
Removes components associated with a prim and its descendants.
Safely removes components when their corresponding prims are deleted from the stage. Uses a mutex to ensure thread-safe component removal.
- Thread Safety
This method is thread-safe
- Parameters:
primPath – [in] Path to the prim being removed
-
inline virtual void deleteAllComponents()#
Removes all components and performs cleanup.
Thread-safe method to remove all components and release their resources
- Thread Safety
This method is thread-safe
Protected Attributes
-
std::unordered_map<std::string, std::unique_ptr<SurfaceGripperComponent>> m_components#
Map of component paths to their corresponding component instances.
-
std::unique_ptr<PrimManagerUsdNoticeListener> m_noticeListener#
USD notice listener for stage changes.
-
double m_timeSeconds = 0#
Current simulation time in seconds.
-
int64_t m_timeNanoSeconds = 0#
Current simulation time in nanoseconds.
-
double m_timeDelta = 0#
Time delta for current tick in seconds.
-
inline SurfaceGripperManager(omni::physx::IPhysx *physXInterface)#