Hi, 

in my example below I apply an external torque to a body that is linked 
using a ChLinkLockLock with prescribed angle. If the link angle is nonzero, 
the link reaction torque differs from the applied torque. This is incorrect 
to my understanding. 

Using a ChLinkMotorRotationAngle in place of the ChLinkLockLock leads to 
the correct link reaction torque. Unfortunately the ChLinkMotorRotation* 
show a behaviour that is also unexpected to me (see 
https://groups.google.com/g/projectchrono/c/9K8gKSscqLM). 

Is there an option to implement an actuated revolute joint that yields the 
correct reaction torque?

Thank you, 
Simon

*Code:* 
ChSystemNSC system{};

auto fixed_body{chrono_types::make_shared<ChBody>()};
fixed_body->SetBodyFixed(true);
auto rotating_body{chrono_types::make_shared<ChBody>()};

auto rotation_link{chrono_types::make_shared<ChLinkLockLock>()};
rotation_link->Initialize(rotating_body, fixed_body, {});
rotation_link->Set_angleset(chrono::AngleSet::ANGLE_AXIS);
rotation_link->SetMotion_axis({0.0, 0.0, 1.0});

// Set angle
rotation_link->SetMotion_ang(chrono_types::make_shared<ChFunction_Const>(1.0));

// Apply torque to body
rotating_body->Accumulate_torque({0.0, 0.0, 10.0}, false);

system.Add(fixed_body);
system.Add(rotating_body);
system.Add(rotation_link);

system.Set_G_acc({0.0, 0.0, 0.0});

for (double time{}; time < 1.0; time += 0.01)
{
    system.DoFrameDynamics(time);

    std::cout << std::fixed << std::setprecision(3) << "Time: " << 
system.GetChTime()
              << " *** Force: " << rotation_link->Get_react_force()
              << " *** Torque: " << rotation_link->Get_react_torque()
              << " *** Link Absolute Coords: " << 
rotation_link->GetLinkAbsoluteCoords() << "\n";
}

*Output:*
...
Time: 0.970 *** Force: -0.000  -0.000  -0.000 *** Torque: 0.000  0.000 
 8.776 *** Link Absolute Coords: 0.000  0.000  0.000  1.000  0.000  0.000 
 0.000
Time: 0.980 *** Force: -0.000  -0.000  -0.000 *** Torque: 0.000  0.000 
 8.776 *** Link Absolute Coords: 0.000  0.000  0.000  1.000  0.000  0.000 
 0.000
Time: 0.990 *** Force: -0.000  -0.000  -0.000 *** Torque: 0.000  0.000 
 8.776 *** Link Absolute Coords: 0.000  0.000  0.000  1.000  0.000  0.000 
 0.000

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/ea10c1de-e6c8-4f1b-9107-aec9fea74863n%40googlegroups.com.

Reply via email to