[ODE] A few questions

Umberto umbe.bax at libero.it
Fri May 28 12:31:50 MST 2004


Hi all,

I'm trying to realize a simulator of a 7 DOF serial robotic arm. The arm is 
made of 7 bodies (cylispheres) linked by 7 hinge joints (1st body is linked 
to the world).

I assembled the robot in the zero position (in which every joint angle is 
zero), but I would like the simulation to start from a different 
configuration, as the zero position is singular.
Now I set starting configuration in a very bad way: I set the speed of each 
joint, step the world and get the new value of each joint angle. Then I 
start the simulation from this configuration.
How can I set joint angles to the value I want?

After I initialized every parameter, my simulation does this:
- with the keyboard I modify end-effector desired position (in world 
cartesian coordinates) and orientation (Euler XYZ angles)
- compute the desired joint angles with inverse kinematics
- add to each joint a torque, computed with a PID controller:

for(i = 0; i < DOF; i++) jointError[i] = (desiredJointAngle[i] - 
actualJointAngle[i]);
for(i = 0; i < DOF; i++) jointSpeedError[i] = -actualAngleRate[i];
for(i = 0; i < DOF; i++) jointErrorIntegral[i] += jointError[i] * TIMESTEP;

for(i = 0; i < DOF; i++) torque[i] = kp * jointError[i] + kd * 
jointSpeedError[i] + ki * jointErrorIntegral[i];
for(i = 0; i < DOF; i++) dJointAddHingeTorque(hinge[i], torque[i]);

- then I step the world and get the joint angles, so I can update the 
control torque in the next step

for(i = 0; i < DOF; i++) actualJointAngle[i] =  dJointGetHingeAngle(hinge[i]);
for(i = 0; i < DOF; i++) actualAngleRate[i] 
=  dJointGetHingeAngleRate(hinge[i]);

The problem is that I have to set extremely high gains, otherwise the arm 
motion is nearly imperceptible.
The gains I'm using are:
kp = 1e10
kd = 1e9
ki = 1e9
The bodies are very light weighted (the most weighted body just about 10 
grams!) and there is no gravity, so I can't understand why gains need to be 
so high.
The timestep is 0.01 seconds.

I have one last question: how can I write infos on the "simulation test 
environment" window? Reading infos, generated each timestep, from the 
"drawstuff messages" window is really impossible.
Thanks, ciao


Umberto Battista
University of Genova, Italy
DIMEC - Laboratory of Design and Measurement for Automation and Robotics




More information about the ODE mailing list