SurfaceGripperComponent#
Fully qualified name: isaacsim::robot::surface_gripper::SurfaceGripperComponent
-
class SurfaceGripperComponent : public isaacsim::core::includes::ComponentBase<pxr::UsdPrim>#
Component class for managing Surface Gripper functionality.
This class represents a surface gripper component that can be attached to a robot to enable gripping functionality. It manages the D6 joints that act as attachment points for the gripper.
Public Functions
-
SurfaceGripperComponent() = default#
Default constructor.
-
virtual ~SurfaceGripperComponent() = default#
Virtual destructor.
- virtual void initialize( )#
Initializes the surface gripper component.
- Parameters:
prim – [in] USD prim representing the surface gripper
stage – [in] USD stage containing the prim
-
virtual void onComponentChange()#
Called when component properties change.
Updates the gripper’s configuration when component properties are modified
-
virtual void onStart()#
Called when the gripper starts.
-
virtual void onPhysicsStep(double dt)#
Called each physics step to update gripper state.
-
virtual void preTick()#
Called before each tick to prepare sensor state.
-
virtual void tick()#
Called each tick to update the gripper state.
-
virtual void onStop()#
Called when the gripper stops.
-
virtual bool setGripperStatus(GripperStatus status)#
Sets the gripper status.
- Parameters:
status – [in] New status for the gripper.
- Returns:
True if the status was changed successfully.
-
void consumePhysxActions(std::vector<PhysxAction> &outActions)#
Drains this component’s queued PhysX actions into the provided vector.
- Parameters:
outActions – [out] Destination vector where actions will be appended.
-
void consumeUsdActions(std::vector<UsdAction> &outActions)#
Drains this component’s queued USD actions into the provided vector.
- Parameters:
outActions – [out] Destination vector where actions will be appended.
-
inline GripperStatus getGripperStatus() const#
Gets the current status of the gripper.
- Returns:
Current status.
-
inline std::string getPrimPath() const#
Gets the prim path of this gripper.
- Returns:
The USD prim path as a string
-
inline std::vector<std::string> getGrippedObjects() const#
Gets the list of currently gripped objects.
- Returns:
Vector of prim paths for gripped objects
-
inline void setWriteToUsd(bool writeToUsd)#
Sets whether to write to USD or keep state in memory only.
- Parameters:
writeToUsd – [in] Whether to write to USD or keep state in memory only
-
inline bool hasPhysxActions() const#
-
inline bool hasUsdActions() const#
- inline virtual void initialize( )#
Initializes the component with USD prim and stage references.
Sets up the component’s USD context and prepares it for execution
- Parameters:
prim – [in] The USD prim to attach this component to
stage – [in] The USD stage containing the prim
- Post:
Component is initialized with valid USD prim and stage references
- Post:
mDoStart is set to true, indicating the component is ready to start
-
inline virtual void onPhysicsStep(float dt)#
Called during each physics simulation step.
Override this to implement physics-based behavior
- Parameters:
dt – [in] Time step size in seconds
-
inline virtual void onRenderEvent()#
Called for each rendered frame.
Override this to implement render-specific behavior or visual updates
- inline virtual void updateTimestamp(
- double timeSeconds,
- double dt,
- int64_t timeNano,
Updates the component’s internal timing information.
Maintains synchronized timing state across the component
- Parameters:
timeSeconds – [in] Current simulation time in seconds
dt – [in] Time step size in seconds
timeNano – [in] Current simulation time in nanoseconds
-
inline pxr::UsdPrim &getPrim()#
Retrieves the component’s USD prim.
- Returns:
Reference to the component’s USD prim
-
inline bool getEnabled()#
Checks if the component is enabled.
- Returns:
true if the component is enabled, false otherwise
-
inline uint64_t getSequenceNumber()#
Gets the component’s sequence number.
- Returns:
The component’s sequence number
Public Members
-
bool mDoStart#
Flag indicating whether onStart should be called.
Protected Attributes
-
usdrt::UsdStageRefPtr m_usdrtStage#
Runtime USD stage reference.
-
double m_timeSeconds#
Current simulation time in seconds.
-
int64_t m_timeNanoSeconds#
Current simulation time in nanoseconds.
-
double m_timeDelta#
Time delta for current tick in seconds.
-
uint64_t m_sequenceNumber#
Component sequence number for ordering/identification.
-
bool m_enabled#
Component enabled state flag.
-
SurfaceGripperComponent() = default#