How to handle blocked joint actuators?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

How to handle blocked joint actuators?

Postby pHySiQuE » Wed Nov 27, 2013 5:30 am

Do you have any suggestions how to handle the situation when a joint motor is blocked? I"d like to define a maximum force and detect when that force is exceeded, so I can disable the motor:
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Wed Nov 27, 2013 10:40 am

you need to set the friction limit along the degree of freedom of motion.

what king of joint is that?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby pHySiQuE » Wed Nov 27, 2013 12:28 pm

It's a slider. I only use sliders, hinges, and ball joints.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Wed Nov 27, 2013 1:25 pm

did you subclassed from the main CustomSlider?
is so lcan you let see the you use.
basially you need to do something like the hinge.

teh hinge has soem impelmnetaion of that, I can add the same to the slider.

but let me see how you are doing moving teh lsiet part.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby pHySiQuE » Wed Nov 27, 2013 1:27 pm

I just use the CustomSliderActuator with no changes.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Wed Nov 27, 2013 1:41 pm

oh is the actuator, that make it simpler.
I had no added because I did need so fart by that one key featuire of actuators. in fact is also a key featire of haptic devices.
is the max prsion that teh actuiator can apply. I can add that righ away. I will also test wi the forklift demo.

it will be SetMaxForce(float Value).
the whe the joint will me but if can only apply that max force, in you case when if forc down that ostacle will resi teh motion and teh joint wuill somple there there.
I can also ass a fntion that let you read if te hmax force so that you can stop teh motor, when tio hot teh limit.


stand by.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Wed Nov 27, 2013 1:49 pm

Ok if you sync to svn, I added a hack that quicklly force the friction limit to +- 1000.

now the jorklift demo can not lift himself, which is what shuold happens.
this should make your joint also stops when it hit the obstacle, see if that works, please.

after that we add the inteface to control that funtionality, that can be used as the power of the actuator.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby pHySiQuE » Wed Nov 27, 2013 3:13 pm

Thank you, it works perfectly. This is good enough to ship. I'll just leave it like this and maybe add some more advanced control later.

I added the same code to the hinge actuator, and it worked perfectly.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Wed Nov 27, 2013 3:55 pm

that's part of the problem I get. you always run with the quickest solution and never wait for the correct update.

I give you quick things for you to test, and you go on assuming this is the fix, you build funtionality,
later when I add the final change the moment you update, your code brake unnoticed to you,
and you get your users bitching about the physicas library.

i can not leave that hard coded constant there, I have to make it an option and set the default force to an infinite value,
It is the end user job to set it to the value they want.
as soon as I do that your code will brake, and there we go again back to the beginning.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Wed Nov 27, 2013 8:32 pm

Ok I added the interface functions, for controlling that, see careful becaus eth defuel is 1e10 (10 millioen tiem stronger)

you need to call SetMaxForcePower(dFloat force);
after you make create the joint, you cna try 1000 lie kthe hack
that mean it will apply a force of about 100 kg down, you can probably set it to a lower value.
for example you can set to say 3 times the weight of the platform.

the interpretaion is adding a strong of weak motor to the serve that open or close the door.
you can do real game play stuff like jamming doors by placing heavy or light obtacles in the way

it doe no make moch sence for a door, but stuff like elavators,
a strong motor can leift some object, and a weak motor will make the joint fail, so you can jam elevatior by placing a heaving object.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby pHySiQuE » Thu Nov 28, 2013 12:35 am

Nice. Don't forget to add this to the hinge at some point. :)
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Thu Nov 28, 2013 5:41 am

hinges, slider, or any free motion joint do not need do not need that because they do not have active moving parts, they are passive.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to handle blocked joint actuators?

Postby Sweenie » Thu Nov 28, 2013 10:33 am

I think pHySiQuE meant the HingeActuator but I can see that you added the same functions to the HingeActuator and UniversialActuator at the same time you added it to the SliderActuator.
Sweenie
 
Posts: 503
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: How to handle blocked joint actuators?

Postby JoeJ » Thu Nov 28, 2013 12:00 pm

After the Update i get those warnings and errors - if i remove joint lib from my project, anything is fine.
My preprocessoer defines are
PTW32_STATIC_LIB
DG_USE_NORMAL_PRIORITY_THREAD
_NEWTON_USE_LIB
_NEWTON_STATIC_LIB

Any idea what's wrong?


Code: Select all
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CustomControllerConvexCastPreFilter::CustomControllerConvexCastPreFilter(struct NewtonBody const * const)" (__imp_??0CustomControllerConvexCastPreFilter@@QAE@QBUNewtonBody@@@Z)   C:\dev\pengII\pengII\CustomVehicleControllerManager.obj
...

warning C4005: 'MIN_JOINT_PIN_LENGTH' : macro redefinition   c:\dev\newton-dynamics-read-only\corelibrary_300\source\physics\dgconstraint.h
warning C4273: 'Custom6DOF::~Custom6DOF' : inconsistent dll linkage   c:\dev\newton-dynamics-read-only\packages\dcustomjoints\custom6dof.cpp
warning C4273: 'Custom6DOF::CalculateBasisAndJointAngle' : inconsistent dll linkage   c:\dev\newton-dynamics-read-only\packages\dcustomjoints\custom6dof.cpp
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: How to handle blocked joint actuators?

Postby Julio Jerez » Thu Nov 28, 2013 2:07 pm

no I do not know what that is, It build fine here.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest