## Rotate a dummy from API

Typically: "How do I... ", "How can I... " questions
Posts: 20
Joined: 11 Sep 2022, 06:48

### Rotate a dummy from API

Hello,

I want to rotate a dummy's orientation with respect to one of its axes from Python API, and I know the angle with which I want to rotate the dummy. I have come to the SetObjectPose method, but this method requires knowing the alpha, betta, and gamma values and these are unknown to me since I cannot understand the relationships between the local rotation I want to perform and these alpha, beta, and gamma values. Is there an alternative method with which I can easily implement the rotation with respect to one of the axes of the dummy? Or is there a way to relate this rotation to the alpha, beta, and gamma values?

Cheers.

coppelia
Posts: 9762
Joined: 14 Dec 2012, 00:25

### Re: Rotate a dummy from API

Hello,

did you have a look at sim.rotateAroundAxis?

Cheers

Posts: 20
Joined: 11 Sep 2022, 06:48

### Re: Rotate a dummy from API

Thank you very much. I calculate the euler angles though, and I am now working with simxSetObjectOrientation from the Python legacy API ( I have to use the legacy one ). In its documentation, it is said that Euler angles should be inserted in array format. What does array mean in python? Is it a list or tuple?

The documentation :

Code: Select all

number returnCode=simxSetObjectOrientation(number clientID,number objectHandle,number relativeToObjectHandle,array eulerAngles,number operationMode)

Thank you

coppelia