Package org.robwork.sdurw_control
Class JointControllerPtr
- java.lang.Object
-
- org.robwork.sdurw_control.JointControllerPtr
-
public class JointControllerPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description JointControllerPtr()
Default constructor yielding a NULL-pointer.JointControllerPtr(long cPtr, boolean cMemoryOwn)
JointControllerPtr(JointController ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JointController
__ref__()
Dereferencing operator.void
delete()
JointController
deref()
The pointer stored in the object.boolean
equals(JointController p)
long
getControlModes()
gets the control mode mask.static long
getCPtr(JointControllerPtr obj)
JointController
getDeref()
Member access operator.Device
getModel()
get kinematic model of device that is controlledQ
getQ()
return the current position of the controlled robotQ
getQd()
return the current velocityboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
setControlMode(JointController.ControlMode mode)
sets the control mode of this JointController.void
setTargetAcc(Q vals)
sets the target acceleration
void
setTargetPos(Q vals)
sets the target joint value for the current control mode.void
setTargetVel(Q vals)
sets the target velocity
-
-
-
Constructor Detail
-
JointControllerPtr
public JointControllerPtr(long cPtr, boolean cMemoryOwn)
-
JointControllerPtr
public JointControllerPtr()
Default constructor yielding a NULL-pointer.
-
JointControllerPtr
public JointControllerPtr(JointController ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(JointControllerPtr obj)
-
delete
public void delete()
-
deref
public JointController deref()
The pointer stored in the object.
-
__ref__
public JointController __ref__()
Dereferencing operator.
-
getDeref
public JointController getDeref()
Member access operator.
-
equals
public boolean equals(JointController p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
getControlModes
public long getControlModes()
gets the control mode mask. Defines which types of control the JointController
supports
-
setControlMode
public void setControlMode(JointController.ControlMode mode)
sets the control mode of this JointController. If the mode
is unsupported an exception is thrown
-
setTargetPos
public void setTargetPos(Q vals)
sets the target joint value for the current control mode.
-
setTargetVel
public void setTargetVel(Q vals)
sets the target velocity
- Parameters:
vals
- [in] in m/s
-
setTargetAcc
public void setTargetAcc(Q vals)
sets the target acceleration
- Parameters:
vals
- [in] in m/s^2
-
getModel
public Device getModel()
get kinematic model of device that is controlled
-
getQ
public Q getQ()
return the current position of the controlled robot
-
getQd
public Q getQd()
return the current velocity
-
-