Simulate a rotating object (valve) using joint

Typically: "How do I... ", "How can I... " questions
andypark
Posts: 13
Joined: 04 Jun 2015, 19:10

Simulate a rotating object (valve) using joint

Postby andypark » 24 Jun 2015, 18:35

Hi I would like to simulate a valve turning task using a humanoid robot model that I imported. I have created a joint and set it in torque/force control mode without position control loop. I intended it to be in free mode that if there is any external force rotating it, it would rotate but it does not rotate when the robot is grabbing the valve and rotating it. Can you give me an example of how to set up a passive joint in an object that can be moved by other external forces? Here is the example scene file that I am working on. https://www.dropbox.com/s/t3vjus33u6eha1w/valve_manipulation_test.ttt?dl=0

Thanks!

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

Re: Simulate a rotating object (valve) using joint

Postby coppelia » 24 Jun 2015, 23:43

Hello,

you have several problems. First, notice the warning icon next to the joint when simulation is running. You can double-click that icon for more infos. It will tell you that the joint is not dynamically enabled. Check this page to learn about dynamically enabled objects. But basically: your valve is static. Having a joint between two static objects doesn't make sense. Your valve should not be static.

Then, your joint is in position control. If you want your valve to rotate freely, uncheck also the motor enabled box. If you want your valve to rotate freely, but with a little bit of friction, keep the motor enabled, set the target velocity to 0, and set an appropriate max. force/torque. But in all cases, do not enable the control loop.

Cheers

andypark
Posts: 13
Joined: 04 Jun 2015, 19:10

Re: Simulate a rotating object (valve) using joint

Postby andypark » 25 Jun 2015, 14:52

coppelia wrote:Hello,

you have several problems. First, notice the warning icon next to the joint when simulation is running. You can double-click that icon for more infos. It will tell you that the joint is not dynamically enabled. Check this page to learn about dynamically enabled objects. But basically: your valve is static. Having a joint between two static objects doesn't make sense. Your valve should not be static.

Then, your joint is in position control. If you want your valve to rotate freely, uncheck also the motor enabled box. If you want your valve to rotate freely, but with a little bit of friction, keep the motor enabled, set the target velocity to 0, and set an appropriate max. force/torque. But in all cases, do not enable the control loop.

Cheers


Thanks a lot Coppelia, I tried what you told me and it is working now!

lucky
Posts: 1
Joined: 08 Jul 2017, 06:41

Quadricopter simulation via Matlab

Postby lucky » 17 Jul 2017, 17:02

hi,
I want to simulate a Quadcopter landing via Matlab fuzzy toolbox. when i disabled Quadcopter script and ran it,Quadcopter fell and i can't see my Matlab code result!!!in other robots when you disable the script and run it, the robot doesn't move and waits the Matlab code runs.

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

Re: Simulate a rotating object (valve) using joint

Postby coppelia » 17 Jul 2017, 21:01

The quadcopter fell because in order to stay in the air, you need to apply additional forces (e.g. with simAddForceAndTorque or simAddForce).

Cheers


Return to “General questions”

Who is online

Users browsing this forum: Google [Bot] and 13 guests