Joint motors?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Joint motors?

Postby JohnSmith » Wed Mar 29, 2017 5:19 pm

Hello,

I want to have a motorized hinge joint. I have setup the joint and parent and child objects and the joint. When Newton runs the objects do fall and are jointed so I think I have everything setup correctly so far.

But I want the hinge to be powered so it turns slowly and forces the parent and child objects to move.

What options do I have to do this in Newton?

Thanks.
JohnSmith
 
Posts: 4
Joined: Wed Mar 29, 2017 5:15 pm

Re: Joint motors?

Postby Julio Jerez » Wed Mar 29, 2017 6:26 pm

use dCustomHingeActuator instead of plain dCustomHinge

the you can control it with function void SetTargetAngle(dFloat angle)
which works as a precise robotic actuator.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Joint motors?

Postby JohnSmith » Wed Mar 29, 2017 7:03 pm

I am using the older v2.36 pascal headers and do not see dCustomHingeActuator. In fact there is no "actuator" text found in the wntire header translation.

Same for the newer v3.03 pascal translation.

Are the actuators not included/possible with the pascal translations?
JohnSmith
 
Posts: 4
Joined: Wed Mar 29, 2017 5:15 pm

Re: Joint motors?

Postby Julio Jerez » Thu Mar 30, 2017 4:51 pm

I do not remember if that joint is in 3.03
I assume 3.03 is the newton version,

if you are on 3.03 converting to 3.13 is a matter of recompiling, there are very few changes.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Joint motors?

Postby JohnSmith » Thu Mar 30, 2017 5:12 pm

Bummer. The latest delphi header seems to be for 3.03.

Maybe Stuart will be kind enough to update it to support 3.13 and actuators. I will send him a PM.
JohnSmith
 
Posts: 4
Joined: Wed Mar 29, 2017 5:15 pm

Re: Joint motors?

Postby Dave Gravel » Fri Mar 31, 2017 12:26 am

I think this is the most recent version in the forum.
viewtopic.php?f=9&t=7395&hilit=pascal+header&start=15

If i'm not wrong I think you have only the MatrixMass function to rename for get it work correctly.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Joint motors?

Postby Stucuk » Fri Mar 31, 2017 11:22 am

Updated today. Note that i have not tested it.

- https://pastebin.com/2vdegAwf
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Joint motors?

Postby Dave Gravel » Fri Mar 31, 2017 1:58 pm

Stucuk : thanks for the updated file.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Joint motors?

Postby JohnSmith » Sat Apr 01, 2017 2:12 am

Thanks for the quick update!

But, as before there is no dCustomHingeActuator (or any mention of "actuator") in the header?

So I still cannot create a motorized joint in Newton/Delphi?
JohnSmith
 
Posts: 4
Joined: Wed Mar 29, 2017 5:15 pm

Re: Joint motors?

Postby d.l.i.w » Sat Apr 01, 2017 4:33 am

Of course you can, but you have to do it yourself.

dCustomHingeActuator is part of the dCustomJoints package and not in the core Newton library itself.

So you need to either port these classes to Pascal or put the C++ code into a library with a pure C interface, so it can be used with Pascal.
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: Joint motors?

Postby Stucuk » Sat Apr 01, 2017 5:29 am

Basically the dCustomJoints is using standard newton stuff. Its just helper classes. So you can as d.l.i.w states port it or you can write your own joints.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 18 guests

cron