Specify target joint angle to move to in Python


#1

Is there a way to specify what angle I want a joint to move to, the same way you can do it for XYZ coordinates?

e.g for XYZ in pyhton it is:

dll.SetPlaybackBufferCmd.argtypes = [POINTER(PlaybackBufferCmd)]
playbackCmd = PlaybackBufferCmd()
playbackCmd.x = 250
dll.SetPlaybackBufferCmd(byref(playbackCmd))

How do I do this for joints? something like:

playbackCmd.joint1Angle = 45

???

Thanks!


#2

Hi ,
you can refer to the demo from our official website ( http://www.dobot.cc/download-center/dobot-magician.html )


Or the related information from blookly or script from Dobot Studio .


#3

Hi!
Does this apply to Dobot v1?

Thanks


#4

Hi ,
You can refer to the link below ( http://www.dobot.cc/download-center/dobot-arm-v1.html )


#5

Hi again,

Yes I’ve looked there, that is where got the code for my initial post. It does not say anything about joint values as far as I can see, could you show me some example code for specifying target joint angles in python?

thanks


#6

In the API and developing examples PDF it shows how to do it for target coordinate values:

it does not say how to do it for target joint angles.


#7

dtype.SetPTPCmd(4,ang1,ang2,ang3,ang4,1) works for target joint angle in python.


#8

Awesome! Is there a similar method in the interface to get the current angles of the 4 joints? Sorry, I’ve been having trouble figuring this out. Thanks