Continously changing motor rotation angle

27 views
Skip to first unread message

Richard Kelly

unread,
Nov 15, 2022, 10:12:51 AM11/15/22
to ProjectChrono
Hi all,


I am playing around with the motors in Project Chrono.


Reading the documentation on how to control motors<https://api.projectchrono.org/motors.html#rotational_motors> states there are two main approaches which are Constraint-based approach and Load-based approach. I am trying out the Constraint-based approach using chrono::ChFunction_Setpoint<https://api.projectchrono.org/classchrono_1_1_ch_function___setpoint.html>. I got this working well with a ChLinkMotorRotationSpeed motor but when I try doing something similar to a ChLinkMotorRotationAngle I get a constant rotation speed rather than setting the motor to an angle where is am using ChFunctionRotation_setpoint in place of chrono::ChFunction_Setpoint<https://api.projectchrono.org/classchrono_1_1_ch_function___setpoint.html>. Attached is my source code. Any help would be greatly appreciated. I feel like there is something simple I am doing wrong, but I am not seeing it.


Much Thanks,


Richard



This email is governed by the Terms and Conditions found in our Disclaimer<http://www.mi.mun.ca/ict/disclaimer>.
demo_MBS_motors.cpp
Reply all
Reply to author
Forward
0 new messages