set_joint_position()
  • 1 Minute to read

set_joint_position()


Article summary

Set a joints to specified angle.

Reference

Arguments

ArgumentsTypeDefault valueDescription
armstrThe arm to set the joint positions for.
jointlistList of joint names.
positionlistList of joint angles.
unitsANGLE_UNITANGLE_UNIT.DEGREESUnit for angles (DEGREES or RADIANS).
tilt_constraintboolFalseWhether to apply a tilt constraint.
use_obstaclesboolFalseWhether to use obstacles during execution.
cameraslist[]List of cameras.
update_obstaclesboolFalseWhether to update obstacles.
min_bbox_clear_obstacleslist[]List of minimum bounding boxes for clearing obstacles.
max_bbox_clear_obstacleslist[]List of maximum bounding boxes for clearing obstacles.
save_trajectoryboolFalseWhether to save the trajectory.
name_trajectorystr''Name of the trajectory.
velocity_scalingfloat0.0Scaling factor for velocity.
acceleration_scalingfloat0.0Scaling factor for acceleration.
callback_feedbackCallableNoneCallable function for feedback.
callback_feedback_asyncCallableNoneCallable function for finish.
callback_finishCallableNoneCallable function for finish.
callback_finish_asyncCallableNoneCallable function for finish .
waitboolFalseWhether to wait for user response .

Return

None

Exceptions

  • RayaInvalidCallback
  • RayaArmsException
  • RayaArmsInvalidJointName
  • RayaArmsInvalidArmOrGroupName
  • RayaArmsExternalException

See the complete list of arms exceptions

Feedbacks

  • [1] The arm is in execution of the command
  • [3] Planning of the trajectory in progress
  • [4] Updating obstacles in progress

See the complete list of arms feedbacks

Callback Arguments

callback_feedback

ArgumentTypeDescription
feedback_codeintCode for the type of feedback.
feedback_msgstrDetails regarding the feedback code (empty if no error).
armstrName of the arm.
percentagefloatPercent of movement completed until target pose is reached.

callback_finish

ArgumentTypeDescription
errorintCode for the type of error encountered (0 if no error).
error_msgstrDetails regarding the error (empty if no error).

Usage Example

... 
async def setup(self):
    self.arms: ArmsController = self.enable_controller('arms')

...
async def loop(self):
    await self.arms.set_joint_position(
        arm='left_arm',
        joint='arm_left_shoulder_RL_joint',
        position=-45.0,
        wait=True,
    )

Was this article helpful?

What's Next