ApplyTorque question

I'm trying to apply small amounts of torque in the direction a simulated pendulum is moving so that it eventually begins spinning. I expect the amplitude of each period to continue increasing, but it seems to hit a limit when the upper limit gets close to Pi/2.

I've set the joint up to have no resistance:

Code Snippet


float damping = 0.000f;
Microsoft.Robotics.PhysicalModel.
JointDriveProperties jointDrive = new JointDriveProperties(
JointDriveMode.Position,
new SpringProperties(0, damping, 0),
10000
);


The Joint is set to rotate around the Z axis of the pendulum arm:
Code Snippet

_joint.State.Connectors[1] = new EntityJointConnector(
_arm,
new Vector3(0, 1, 0),
new Vector3(0, 0, 1),
new Vector3(0f, length/2-radius/2, radius/2)
);


I apply torque around the Z axis in the direction of motion in Update:
Code Snippet

Vector3 jointAxis = _joint.State.Connectors[1].JointAxis;
double x = GetJointAngle();
double dx = x - _lastX;
float u = Math.Sign(dx) * _MaxTorque;
if (dx == 0) u = 1f;
_arm.PhysicsEntity.ApplyTorque(new Vector3(0, 0, u));
_lastX = x;


Is there friction somewhere that I am not accounting for?

Do I need to apply the torque around a different coordinate system?

I thought that the Z parameter meant "apply torque around the Z axis". Increasing _MaxTorque does not seem to make a difference until the torque can overcome gravity by itself around Pi/2 (and then the pendulum still reaches a steady angular velocity).

[2032 byte] By [AlanOursland] at [2008-2-28]
# 1
I met a similar problem in the simulator.

I'm trying to drive two links(derrived from VisualEntity) jointed with one joint.
The parent link is set as kinematic.

In my case the rotation joint-axis is [0, 1, 0] like SCARA robot arm(moving horizontal).
When I apply constant moment of a couple around the joint-axis, at first they move normally.
However after delta_angle(:=the displacement of the joint angle) surpass (+/-)pi/2, the child links start vibrating around the point delta_angle=(+/-)pi/2.

It seems that the internal sigh of torque is negated when delta_angle exceeds (+/-)pi/2.

zeromagicpoint at 2007-9-25 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...

Microsoft Robotics Studio

Site Classified