Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by cbethax · Dec 05, 2015 at 06:18 PM · jointstorqueangularvelocity

How to accurately transfer torque?

I've been stuck on the following problem for 2 days.
I have the following scenario: http://i.imgur.com/tgrYtye.png

  • Red gear that has a motor with ratio 1

  • Blue gear that receives the torque (ratio 0.5 relative to red)

  • Green gear that is attached to blue gear (ratio 0.5 relative to blue)

  • White wheel (roller) that is attached to the platform and moves with it

  • Black gear that is attached to the roller and to the green gear with an invisible belt (ratio 0.33 relative to roller, ratio 1 relative to green)


For a simpler environment, we are going to ignore friction (except on the roller).
There are two conditions:
- Red gear has to be rotated by applying physics torque
- Transferring torque through collision is forbidden (it won't be accurate with high torque and the simulation will die fast)


I'm not sure how exactly AddTorque(p) works. If:
r = position vector
F = force vector
T = Torque vector
then:
- if p = F. Then is r equal to the length of the unity gameobject taken from the Renderer/Collider?
- it's not possible that p = r and F = unit vector, because I won't be able to specify direction.
- if p = T, then r is an unit vector. But I've tested it, and objects with larger radius rotate slower, which makes it unlikely (unless my tests were not accurate).


It's not that important for our problem though. Continuing with it.
We are going to assume that the pitch is the same for all gears. So:

If I were to rotate the red gear with 10Nm, then:

  • Blue gear should rotate with 5Nm

  • Green gear should rotate with 2.5Nm

  • Black gear should rotate with 2.5Nm

  • Roller should rotate with 7.5Nm

RPM is irrelevant in this scenario.
I know that it's the wrong end of the chain of where usually the motor is, but ignore that.


One of the first things I tried was Configurable Joints, but they give no option to pass ratio, so in this case, they will all be considered as equal-sized gears.

What I tried was make a script that passes the torque along. I thought it won't be that hard. Well, it is, and with my limited physics expertise (currently learning), I feel like I hit a brick wall.

One thing is certain, I need to lock them all in place, like this:
blueGear.angularVelocity = redGear.angularVelocity * -0.5f;

Equalizing them with torque will make an unsynced mess.
If they were all freely floating, it's okay, but the roller has additional weight (the rectangular platform + the hinged gears), and friction with the plane. Angular drag will also disrupt the sync.


Problem one: I need to lock the angular velocity in the reverse order. So if I were to suddenly stop the roller (or the blue gear), red gear should feel the same velocity reduction.

Problem two: Resistance on each object should affect the motor. Passing angularVelocity does not apply it's own force, but is rather duplicating it, and therefore the only energy loss it's experiencing is what the red gear is experiencing (in this case angular drag).

Problem Three: If I were to lock them suddenly, they should all experience velocity increase/decrease.
- If I accelerate the red gear, and lock them all, the roller should slide a little, before regaining traction.
- If the platform is going downhill, and the red gear is stationary, if I lock them, the roller should have a sudden decrease of velocity (Which will cause a slid).


Solution One: Applying Torque with the opposite force vector from end to start.
Problem: To accurately account for the reverse torque, I have to get all the child objects, mass, drag, angular drag, all joints that have axial lock, block, etc. I might as well write my own physics engine.

Solution Two: Take the configurable joint, and add 'ratio' to it.
Problem: Unity is not open source, and I don't see an option to make my own configurable joint. Really, the lack of 'ratio' and 'reversed' (red and blue gear rotate in opposite direction) in the configurable joint is the only thing that is causing this headache.


Is it a trivial problem, or am I trying to do something that is way above my physics knowledge?

On the other hand, have I reached the Unity's capacity? Should I not use Unity's physics for anything more complex than falling cubes?
I don't want to use Torque3D or UE4, since I like Unity's GUI the most, and I do not know C++.
I'd really like to use Unity for my project, but I feel like I hit one of Unity's weaknesses - trying to work with low-level stuff outside of the tools it provides.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Komizart · Nov 20, 2017 at 04:30 PM 0
Share

Hi. Did you find answer? I'm thinking on this problem too

avatar image Komizart Komizart · Dec 07, 2017 at 01:08 PM 0
Share

maybe you'll find answer here http://digitalopus.ca/site/pd-controllers/

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Do I understand Time.deltaTime? 2 Answers

Apply force and torque on different collider enter 0 Answers

Clamping velocity and angular velocity at the same time? 0 Answers

eliminating angular velocity when clamp value hit? 0 Answers

Restricting angularVelocity on one particular direction 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges