Skip to content

Commit

Permalink
Remove vel smoothing from decTrajPtFull.
Browse files Browse the repository at this point in the history
Similar to decTrajPt: this code has been moved to interpolateVel and motionControl.

Ref: 7a51706.
  • Loading branch information
gavanderhoorn committed Mar 12, 2020
1 parent 397e5bc commit 9ee7d2e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions staubli_val3_driver/val3/ros_server/decTrajPtFull.pgx
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,11 @@
// velocities[10]
for l_nIndex=0 to 9 step 1
// Velocity buffer to smooth out last traj point
nVel[1] = nVel[0]
nVel[0] = rosTrajPtMsg.jointTrajPt.nVelocity
l_nRetVal=fromBinary(rosTrajPtFMsg.body.nData[(l_nIndex*4)+56],4,"4.0l",rosTrajPtFMsg.jointTrajPtFull.nVelocities[l_nIndex])
if(l_nRetVal!=1)
x_bFlag=false
return
endIf
// Round to remove trailing decimal places from fromBinary()
rosTrajPtMsg.jointTrajPt.nVelocity = rosTrajPtMsg.jointTrajPt.nVelocity * 10000
rosTrajPtMsg.jointTrajPt.nVelocity = round(rosTrajPtMsg.jointTrajPt.nVelocity)
rosTrajPtMsg.jointTrajPt.nVelocity = rosTrajPtMsg.jointTrajPt.nVelocity / 10000
// Smooth last point in traj
if((rosTrajPtMsg.jointTrajPt.nVelocity == 0.1) and (rosTrajPtMsg.jointTrajPt.nSeq != 0))
rosTrajPtMsg.jointTrajPt.nVelocity = (nVel[0] - (nVel[1] - nVel[0]))
endIf
endFor
// accelerations[10]
Expand Down

0 comments on commit 9ee7d2e

Please sign in to comment.