In robotics, in oder to dimension the actuators, it is required to compute the applied torque for a required force in the final effector. One approach is to get the torque using the cinematic model of velocities that comes from an stationary analysis. Another approach is to get the torque using the Lagrangian model in stationary state, so, it reduce to the gravity term. Also, control methods compute the torque, see for instance feedforward compensation or computed torque.
You need to obtain the Jacobian matrix Ji at the desired point. Then you can include the effects the external forces, F, by simply adding JiT F to your dynamic equation
But generally you gotta add a point, wherever you supposed, which must add to the part you wanna measure and then define a torque on that point which you must define it's function on function builder on the software. Then you can measure dynamical parameters.
The problem of including forces into the Lagrangian/Hamiltonian formulation of a classical problem is a long standing one. One way to obtain the right Euler-Lagrange equation is to use a slightly generalized formulation with an appropriately chosen "Rayleigh function" . I think this is equivalent to that proposed by Philip Long above.
However, there are certain cases in which the forces can be included directly into the Lagrangian and provide you with the desired equation. Please find some references in which some simple examples are treated in the attached file. In the most general case, one may write-down a Lagrange function with fractional derivatives(!). The latter, however, requires knowledge of fractional calculus....
This is a good question. Made me realize that I never see a dynamic example or exercise with Lagrangian approach that have Moments instead of Forces.
But reviewing some info I found something that could be the answer that S. Auron were looking for:
In the case of forces, one uses the velocities (and then virtual displacements) as generalized coordinates. In the case of torque, you need to use angular velocities (virtual angles[?])
Check the first equation in this 2-pages PDF I found
@ Javier, Thank you for the discussion. my ques is How to give the external force or torque of some different generalized coordinates in lagrangian dynamic equation formulation developed with respect to another generalized coordinates in multi body dynamics?