How to make the joint to rotation in reverse direction?

Typically: "How do I... ", "How can I... " questions
Post Reply
suri
Posts: 42
Joined: 07 Apr 2020, 17:24

How to make the joint to rotation in reverse direction?

Post by suri »

Hey,

I need to make joint to rotate in reverse direction, any documentation or API function(regulary API). I went through I did not find any API so.

Any solution

Thanks

suri
Posts: 42
Joined: 07 Apr 2020, 17:24

Re: How to make the joint to rotation in reverse direction?

Post by suri »

Sloved. Thank you

shreyas7738
Posts: 19
Joined: 30 Dec 2020, 15:32

Re: How to make the joint to rotation in reverse direction?

Post by shreyas7738 »

Can you share how you solved it?

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How to make the joint to rotation in reverse direction?

Post by coppelia »

If your joint is in force/torque mode, the motor enabled, then simply do:

Code: Select all

sim.setJointTargetVelocity(jointHandle,vel) -- forward

sim.setJointTargetVelocity(jointHandle,-vel) -- reverse
Cheers

shreyas7738
Posts: 19
Joined: 30 Dec 2020, 15:32

Re: How to make the joint to rotation in reverse direction?

Post by shreyas7738 »

For revolute joint,if I put 10,will it be 10 rad/s or 10 degree/s?

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: How to make the joint to rotation in reverse direction?

Post by coppelia »

the API uses rad, the GUI uses degrees!

Cheers

Post Reply